分类: 题解

48 篇文章

thumbnail
Codeforces Round 1047 (Div. 3)
链接:https://codeforces.com/contest/2137 A. Collatz Conjecture     这题读假了以为是找出全部的可能值。 算法:     模拟。 思路:     无。 关键代码: voi…
thumbnail
AtCoder Beginner Contest 422
链接:https://atcoder.jp/contests/abc422 A - Stage Clear 算法:     模拟。 思路:     无。 关键代码: void solve() { string s; cin >> s; if (s[2] >= '…
thumbnail
AtCoder Beginner Contest 421
链接:https://atcoder.jp/contests/abc421 A - Misdelivery 算法:     模拟。 思路:     无。 关键代码: void solve() { int n; cin >> n; vector<string> s(n); for (auto &x : s) cin >> x; int …
thumbnail
Codeforces Round 1039 (Div. 2)
链接:https://codeforces.com/contest/2128 A. Recycling Center 算法:     贪心、排序。 思路:     直接从最小的开始销毁。 关键代码: void solve() { ll n, c; cin >> n >> c; vector<ll> a(n); for (auto &x…
thumbnail
Codeforces Round 1046 (Div. 2)
链接:https://codeforces.com/contest/2136 A. In the Dream 算法:     找规律,模拟。 思路:     可以发现要想让结果成立,某个人不能同时赢三场,控制 [latex]1:2[/latex] ,所以 [latex]max / min[/latex] < 3 即可。 关键代码: void …
thumbnail
Codeforces Round 1045 (Div. 2)
链接:https://codeforces.com/contest/2134 A. Painting With Two Colors 算法:     找规律。 思路:     不难发现必须满足以下条件之一: [latex]b = n[/latex]: 蓝色直接把格子涂满…
thumbnail
AtCoder Beginner Contest 419
链接:https://atcoder.jp/contests/abc419 A - AtCoder Language 算法:     模拟。 思路:     无。 关键代码: void solve() { string s; cin >> s; if (s == "re…
thumbnail
AtCoder Beginner Contest 420
链接:https://atcoder.jp/contests/abc420 A - What month is it? 算法:     模拟。 思路:     无。 关键代码: void solve() { int a, b; cin >> a >&g…