版本比较
P1374题解
正文
增加 3 行删除 3 行
62 行未改动6364656667686768697071724 行未改动7778798081818283848516 行未改动62 行未改动 nw.t ++; int la = nw.t % tot;if(la == 0)la = tot; int lb = nw.t % cnt;if(lb == 0)lb = cnt; nw.sx += dx[hu[la]],nw.sy += dy[hu[la]]; if(!check(nw.sx,nw.sy))nw.sx -= dx[hu[la]],nw.sy -= dy[hu[la]]; nw.mx += dx[mo[lb]],nw.my += dy[mo[lb]]; if(!check(nw.sx,nw.sy))nw.sx -= dx[hu[la]],nw.sy -= dy[hu[la]]; nw.mx += dx[mo[lb]],nw.my += dy[mo[lb]]; if(!check(nw.mx,nw.my))nw.mx -= dx[mo[lb]],nw.my -= dy[mo[lb]]; for(int i = 1;i <= 5;i ++){ int fx = nw.ax + dx[i]; int fy = nw.ay + dy[i];4 行未改动 } else nw.ti = 0; q.push((node){fx ,fy ,nw.sx ,nw.sy ,nw.mx ,nw.my ,nw.t ,nw.ti}); } } }}int main(){ cin >> n >> m >> s >> d; for(int i = 1;i <= n;i ++){16 行未改动