摘要:
touring computeTime Limit 1000msMemory Limit 65536KdescriptionThe best friends Mr. Li and Mr. Liu are touring in beautiful country M. M has n cities and m two-way roads in total. Each road connects two cities with fixed length.We assume that the cost of car traveling on the road is only related ... 阅读全文
摘要:
monkeyTime Limit 1000msMemory Limit 65536Kdescription Cc is a lovely monkey. It likes to play the game "catching plates". The game is as follows. There are n pegs in a line numbered from 1 to n. Cc stands on the first peg at the beginning. It is rather hard for Cc to jump from peg i to peg 阅读全文
摘要:
素数树Time Limit 1000msMemory Limit 65536KdescriptionSuppose there is a tree named A. All nodes of A have a weight v(0 #include
#include
#include
#include
#include
#include
using namespace std;
const int mm=4e6+9;
const int nn=5e4+9;
class node
{ public:bool vis,pri; int no,ma;
}f[nn];
int head[nn... 阅读全文