该文被密码保护。 阅读全文
该文被密码保护。 阅读全文
摘要:
/*cin慢是有原因的,其实默认的时候,cin与stdin总是保持同步的,也就是说这两种方法可以混用,而不必担心文件指针混乱,同时cout和stdout也一样,两者混用不会输出顺序错乱。正因为这个兼容性的特性,导致cin有许多额外的开销,如何禁用这个特性呢?只需一个语句std::ios::sync_ 阅读全文
摘要:
/*带权并查集带权值的并查集只不过是在并查集中加入了一个value[]数组value[]可以记录很多东西,也可是类似距离这种东西,也可以是相对于根节点的状态加入了权值,相对于并查集函数有些改变*/ 1 int findfat(int x){ 2 if(fat[x]==x) return x; 3 i 阅读全文
摘要:
给出N个正整数,检测每个数是否为质数。如果是,输出"Yes",否则输出"No"。 给出N个正整数,检测每个数是否为质数。如果是,输出"Yes",否则输出"No"。 Input 第1行:一个数N,表示正整数的数量。(1 <= N <= 1000) 第2 - N + 1行:每行1个数(2 <= S[i] 阅读全文
摘要:
Problem Description CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there a 阅读全文
摘要:
Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Ouli 阅读全文
摘要:
Problem Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let 阅读全文
摘要:
Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15909 Accepted: 6728 Description A sequence of N positive integers (10 < N < 100 000), each 阅读全文