2019-2020 Saint-Petersburg Open High School Programming Contest (SpbKOSHP 19) easy: ABFGHI medium-easy: CE medium: JK ?????: D Problem A. King's Inspection 签到. Problem B. Cash Gap 贪心. Problem C. Jet Trains 并查集维护 T 边连通性,对于每个连通块用 set 维护从这个连通块连向外面的 F 边.…
2020 ICPC Universidad Nacional de Colombia Programming Contest A. Approach 三分 显然答案可以三分,注意\(eps\)还有两条线平行的情况 view code #include<bits/stdc++.h> using namespace std; #pragma GCC optimize("O2") double dis2(double ox, double oy, double ex, doubl…
AtCoder diverta 2019 Programming Contest 2 看起来我也不知道是一个啥比赛. 然后就写写题解QWQ. A - Ball Distribution 有\(n\)个气球\(k\)个人,每个人至少要拿一个气球.问所有分配方案中拿走气球最多的那个人可以比最少的那个人多拿多少个. 打比赛的时候一开始没看到题,别人说输出\(n\% k\)就过了,然后我就过了. 现在重新一看题解... 应该是\(k=1\)时,答案是\(0\),否则答案是\(n-k\). #includ…
diverta 2019 Programming Contest 2 A - Ball Distribution 特判一下一个人的,否则是\(N - (K - 1) - 1\) #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putchar(' ')…
diverta 2019 Programming Contest 因为评测机的缘故--它unrated了.. A - Consecutive Integers #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putchar(' ') #define…
[AtCoder] NIKKEI Programming Contest 2019   本来看见这一场的排名的画风比较正常就来补一下题,但是完全没有发现后两题的AC人数远少于我补的上一份AtCoder. A - Subscribers   首先始终 \(max = \min(A, B)\) ,\(min\) 的话如果 \(A + B \leq N\) ,那么就是 \(0\) ,否则就是 \(A + B - N\) . int n, a, b; int main() { read(n), read…
[AtCoder] Yahoo Programming Contest 2019   很遗憾错过了一场 AtCoder .听说这场是涨分场呢,于是特意来补一下题. A - Anti-Adjacency   显然 \(K \leq \frac{N + 1}2\) int n, k; int main() { #ifdef hzhkk freopen("hkk.in", "r", stdin); #endif read(n), read(k); if (k <=…
M-SOLUTIONS Programming Contest 2020 题解 目录 M-SOLUTIONS Programming Contest 2020 题解 A - Kyu in AtCoder B - Magic 2 C - Marks D - Road to Millionaire E - M's Solution F - Air Safety 题目质量好高啊,做完感觉好难涨智商了诶.(除了某一道程序又臭又长的F) A - Kyu in AtCoder 我们可以放很多个if来判断,但…
比赛链接:传送门 本场我们队过的题感觉算法都挺简单的,不知道为啥做的时候感觉没有很顺利. 封榜后7题,罚时1015.第一次模拟赛金,虽然是北欧的区域赛,但还是有点开心的. Problem B Best Relay Team 00:49 (+2) Solved by xk 排序后简单模拟一下题意即可. xk说他要背个锅. 代码: #include <iostream> #include <cmath> #include <map> #include <algorit…
    Programming Contest Problem Types Hal Burch conducted an analysis over spring break of 1999 and made an amazing discovery: there are only 16 types of programming contest problems! Furthermore, the top several comprise almost 80% of the problems s…