50分求助,TLE#6#10~14#17~20

P4768 [NOI2018] 归程

抱歉,在 ```cpp while(q--) { v=read(),p=read(); v=(v+k*lastans-1)%n+1; p=(p+k*lastans)%(s+1); dijkstra(); Kruskal(); lastans=query(v,p); write(lastans); putchar('\n'); } ``` 里多了个 ```cpp dijkstra();Kruskal(); ``` 不过删了后成RE了
by l1247396180 @ 2022-11-12 18:03:23


cnt没清零 此帖完结
by l1247396180 @ 2022-11-12 18:05:14


|