76分,2,3,4,6WA,求大佬救救

P1825 [USACO11OPEN] Corn Maze S

解决了,在 ```cpp if(tx == css[0][mp[ttx][tty] - 'A'].cx && ty == css[0][mp[ttx][tty] - 'A'].cy) {//两个坐标写完整,别偷懒!!! 万一是相同的x呢! tx = css[1][mp[ttx][tty] - 'A'].cx; ty = css[1][mp[ttx][tty] - 'A'].cy; } else if(tx == css[1][mp[ttx][tty] - 'A'].cx && ty == css[1][mp[ttx][tty] - 'A'].cy) { tx = css[0][mp[ttx][tty] - 'A'].cx; ty = css[0][mp[ttx][tty] - 'A'].cy; } ``` 这里,如果两个传送点的位置相同的话,单独判断一个x会出错,因此要x,y都判断 该错误的解决参考了Serendipity_one 的解决方案
by Luckz @ 2023-01-17 23:10:21


乐,您头像和我一样唉
by Chancylaser @ 2023-01-17 23:50:16


@[Chancylaser](/user/241817) 这么有缘,不得关注一波(doge)
by Luckz @ 2023-01-18 11:24:56


谢谢,我也遇到这个问题了
by zhaoxubing @ 2023-03-14 21:36:36


|