最短路 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 65817 Accepted Submission(s): 28794 Problem Description 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt.但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最…
Meeting Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1656 Accepted Submission(s): 515 Problem Description Bessie and her friend Elsie decide to have a meeting. However, after Farmer Joh…
Wow! Such City! 题意:题面很难理解,幸亏给出了提示,敲了一发板子过了.给出x数组y数组和z数组的求法,并给出x.y的前几项,然后直接利用所给条件构造出z数组再构造出C数组即可,Cij表示i点到j点的路长,然后再跑个dij就可以求出0点到其他点的最短路,然后将这些最短路对M取余求所有取余值的最小值.需要注意的是Cij=Z(i*n+j),也就是X.Y.Z数组都要开到(n-1)*n+n.理解了其实也就是水题了,题意这样东扯西扯真是迷.. const int N=1e6+1000;…
Tree Ming and Hong are playing a simple game called nim game. They have nn piles of stones numbered 11 to nn ,the ii-th pile of stones has a_iai stones. There are n - 1n−1 bidirectional roads in total. For any two piles, there is a unique path from…
Travel There are nn planets in the MOT galaxy, and each planet has a unique number from 1 \sim n1∼n. Each planet is connected to other planets through some transmission channels. There are mm transmission channels in the galaxy. Each transmission cha…