链接:https://www.nowcoder.com/acm/contest/125/A来源:牛客网 Tony and Macle are good friends. One day they joined a birthday party together. Fortunately, they got the opportunity to have dinner with the princess, but only one person had the chance. So they de…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6464 免费送气球 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 264 Accepted Submission(s): 53 Problem Description 又到了GDUT一年一度的程序设计竞赛校赛的时间啦.同学们只要参加校赛,…
简单数学题 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 580 Accepted Submission(s): 257 Problem Description 已知 F(n)=∑i=1n(i×∑j=inCij) 求 F(n) mod 1000000007 Input 多组输入,每组输入占一行,包含一个整数n(1 <= n <…
免费送气球 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 581 Accepted Submission(s): 130 Problem Description 又到了GDUT一年一度的程序设计竞赛校赛的时间啦.同学们只要参加校赛,并且每解出一道题目就可以免费获得由ACM协会和集训队送出的气球一个.听到这个消息,JMC也想参加免费…
超级无敌简单题 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 570 Accepted Submission(s): 274 Problem Description 通常来说,题面短的题目一般都比较难,所以我要把题面写得很长很长.通常来说,题面短的题目一般都比较难,所以我要把题面写得很长很长.通常来说,题面短的题目一般都比较难,所…
人类史上最大最好的希望事件 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1198 Accepted Submission(s): 337 Problem Description 作为CNCS的半壁江山,狗哥常常在宇宙中心邵阳眺望黄浦江,夜晚的星空总是迷人,有时候还能见到彗星滑落. 狗哥是幸运的,他在两秒钟内看到了十七颗彗星划过天…
思路:矩阵快速幂.推一下初始矩阵就好了 #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mp make_pair #define pb push_back using namespace std; LL gcd(LL a,LL b){return b?gcd(b,a%b):a;} LL lcm(LL a,LL b){return a/gcd(a,b)*b;} LL p…