2018 China Collegiate Programming Contest Final (CCPC-Final 2018)-K - Mr. Panda and Kakin-中国剩余定理+同余定理 [Problem Description] \[ 求解x^{2^{30}+3}=c\pmod n \] 其中\(n=p\cdot q\),\(p\)为小于\(x\)的最大素数,\(q\)为大于\(x\)的最小素数,\(x\)为\([10^5,10^9]\)内随机选择的数.\(0< c<n\).…
Problem A. Mischievous Problem Setter 签到. #include <bits/stdc++.h> using namespace std; #define ll long long #define N 100010 #define pii pair <int, int> #define x first #define y second int t, n, m; pii a[N]; int main() { scanf("%d"…
2016 China Collegiate Programming Contest Final Table of Contents 2016 China Collegiate Programming Contest FinalProblem A:Problem J:Problem H: Problem A: 题意:喝咖啡,每三杯就又可以有免费一杯,求最少花费: 分析:贪心: #include <bits/stdc++.h> using namespace std; const int inf…
Secrete Master Plan Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 429 Accepted Submission(s): 244 Problem Description Master Mind KongMing gave Fei Zhang a secrete master plan stashed in a…
Game Rooms Time Limit: 4000/4000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Submit Status Your company has just constructed a new skyscraper, but you just noticed a terrible problem: there is only space to put one game room on each…