摘要: Problem DescriptionSuppose there are M people, including you, playing a special card game. At the beginning, each player receives N cards. The pip of a card is a positive integer which is at most N*M. And there are no two cards with the same pip. During a round, each player chooses one card to compa 阅读全文
posted @ 2014-02-20 22:42 AHU_树 阅读(309) 评论(0) 推荐(0) 编辑
摘要: Description上初中的时候我们就学会了幂乘运算,可是我们却不知道对于高阶的幂乘,出结果的方法比较慢,那么你有什么更好的方法吗?Input第1行,一个整数N(1int pow_mod(int x, int y);int main(){ freopen("data.in", "r", stdin); int n; scanf("%d", &n); while(n--) { int x, y; scanf("%d %d", &x, &y); printf("%d\n", 阅读全文
posted @ 2014-02-20 17:48 AHU_树 阅读(281) 评论(0) 推荐(1) 编辑