2013年3月22日

Ignatius and the Princess II(STL)

摘要: Ignatius and the Princess IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3163Accepted Submission(s): 1883Problem DescriptionNow our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty P 阅读全文

posted @ 2013-03-22 16:54 铁树银花 阅读(276) 评论(0) 推荐(0) 编辑

STL之next_permutation——求全排列

摘要: next_permutation功能:将[first, last)范围内的排列重组为字典序更大的下一个新排列。permutation正是“排列”之意。调用形式:next_permutation(first, last),其中,first是指向排列头元素的指针,last是指向排列末元素再下一位的指针,两者给出排列范围:[first, last).函数所在头文件:<algorithm>例子: 1 #include <iostream> 2 #include <algorithm> 3 using namespace std; 4 5 int main() 6 { 阅读全文

posted @ 2013-03-22 16:37 铁树银花 阅读(250) 评论(0) 推荐(0) 编辑

Codeforces Round #174 (Div. 2) Cows and Primitive Roots(数论)

摘要: Cows and Primitive Rootstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe cows have just learned what a primitive root is! Given a prime p, a primitive root is an integer x (1 ≤ x < p) such that none of integers x - 1, x2 - 1, ..., xp - 2 -  阅读全文

posted @ 2013-03-22 13:46 铁树银花 阅读(325) 评论(0) 推荐(0) 编辑

导航