[ABC184F] Programming Contest题解】的更多相关文章

题目在这里>_< 发现这场比赛在网上没有完整的题解,甚至连题目代码都没人贴出来(大概是因为题目太水了吧...).所以宝宝就来写个题解,也就当作成长记录了233333 A. Window 题意很简单,给出n组x,y,求x*y的值 #include <cstdio> #include <algorithm> using namespace std; int main() { int n; long long x,y; scanf("%d",&n)…
[题目链接] A - Who Is The Winner 模拟. #include <bits/stdc++.h> using namespace std; int T; int n; struct X { string name; int num; int ti; }s[10010]; bool cmp(X&a,X&b){ if(a.num != b.num) return a.num > b.num; return a.ti < b.ti; } int main…
[题目链接] 这场比赛题面英文都好长... ... A - Zero or One 模拟. #include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a != b && a!=c) { cout <<"A"; return 0; } if(b != a && b!=c) { cou…
[题目链接] A - Streets of Working Lanterns - 2 首先将每一个括号匹配串进行一次缩减,即串内能匹配掉的就匹配掉,每个串会变成连续的$y$个右括号+连续$z$个左括号. 我们把缩减后的串分成四类: 第一类:只有左括号 第二类:左右括号都有,且$z$大于等于$y$ 第三类:左右括号都有,且$z$小于$y$ 第四类:只有右括号 类与类之间肯定是按第$1$,$2$,$3$,$4$类的顺序放置. 第一类内部和第四类内部可以随便放.第二类的放置顺序也很容易想. 问题出在第…
[题目链接] A - Watching TV 模拟.统计一下哪个数字最多即可. #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 10; int T, n; char s[maxn]; int a[maxn]; int main() { scanf("%d", &T); while(T --) { scanf("%d", &n); memset(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…
Programming Contest Ranking . 题目描述 Heilongjiang Programming Contest will end successfully! And your task is programming contest ranking. The following rules rankings: 1. A problem is solved when it is accepted by the judges. 2. Teams are ranked accor…
KYOCERA Programming Contest 2021(AtCoder Beginner Contest 200) 题解 哦淦我已经菜到被ABC吊打了. A - Century 首先把当前年份减去\(1\),对应的世纪也减去\(1\),然后我们就发现第\(0\)到\(99\)年对应第\(0\)世纪,第\(100\)到\(199\)年对应第\(1\)世纪,以此类推. 答案就是\(\lfloor \frac {N-1} {100} \rfloor\).这里\(\lfloor x \rflo…
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来判断,但…
2016 Sichuan Province Programming Contest 代码 2016 Sichuan Province Programming Contest A. Nearest Neighbor Search \(dx\)根据\(x_0\)与\([x_1, x_2]\)位置考虑. \(dx.dy.dz\)单独考虑. B. Odd Discount 做法一:对于两个不同优惠\((i,j)\),所有方案中与两个优惠商品交集为奇数,即同时取到两种优惠的个数为\(2^{n-2}\)种.…