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"…
比赛链接:传送门 跌跌撞撞6题摸银. 封榜后两题,把手上的题做完了还算舒服.就是罚时有点高. 开出了一道奇奇怪怪的题(K),然后ccpcf银应该比区域赛银要难吧,反正很开心qwq. Problem A. Mischievous Problem Setter 00:14 (-2) Solved by Dancepted 良心签到题.WA2吃乳猪. 代码: #include <iostream> #include <cmath> #include <map> #includ…
A:签到题,正常模拟即可. #include<bits/stdc++.h> using namespace std; ; struct node{ int id, time; }; node a[maxn]; bool cmp(const node &a, const node &b){ if(a.id^b.id) return a.id < b.id; else return a.time < b.time; } int main() { std::ios::sy…
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…
2018 German Collegiate Programming Contest (GCPC 18) Attack on Alpha-Zet 建树,求lca 代码: #include <algorithm> #include <iterator> #include <iostream> #include <cstring> #include <cstdlib> #include <iomanip> #include <bit…
layout: post title: 2018 German Collegiate Programming Contest (GCPC 18) author: "luowentaoaa" catalog: true tags: mathjax: true - codeforces 传送门 付队博客 C.Coolest Ski Route (记忆化搜索) 题意 给出一个有向图,求出一个权值最长的链, 题解 暴力dfs会超时,所以直接储存每个起点能走到的最远距离 #include<…
题解右转队伍wiki https://acm.ecnu.edu.cn/wiki/index.php?title=2017_China_Collegiate_Programming_Contest_Final_(CCPC_2017)…