摘要:
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 阅读全文
摘要:
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", 阅读全文