链接:https://codeforces.com/contest/2149 A. Be Positive 算法: 数学。 思路: 无。 关键代码: void miyan() { int n; cin >> n; vector<int> a(n); for (auto &x : …
链接:https://atcoder.jp/contests/abc404 A - Not Found 算法: 模拟。 思路: 无。 关键代码: void miyan() { string s; cin >> s; vector<int> cnt(…
链接:https://atcoder.jp/contests/abc424 A - Isosceles 算法: 模拟。 思路: 无。 关键代码: void miyan() { int a, b, c; cin >> a >> b …
链接:https://codeforces.com/contest/2147 A. Shortest Increasing Path 算法: 找规律。 思路: 答案只有 [latex]-1[/latex] [latex]2[/latex] [latex]…
链接:https://atcoder.jp/contests/abc405 A - Is it rated? 算法: 模拟。 思路: 无。 关键代码: void miyan() { int r, c; cin >> r >> c; if (c == 1)…
链接:https://codeforces.com/contest/2144 A. Cut the Array 算法: 模拟。 思路: 无。 关键代码: void miyan() { int n; cin >> n; vector<in…
链接:https://atcoder.jp/contests/abc423 A - Scary Fee 算法: 模拟。 思路: 无。 关键代码: void miyan() { ll x, c; cin >> x >> c; cout << l…
链接:https://codeforces.com/contest/2148 A. Sublime Sequence 算法: 模拟。 思路: 无。 关键代码: void miyan() { int x, n; cin >> x >> n; if (n &…
链接:https://atcoder.jp/contests/abc414 A - Streamer Takahashi 算法: 模拟。 思路: 无。 关键代码: void miyan() { int n, l, r; cin >> n >> l >> r; ll ans = 0; while (n--) { int x, y; c…
链接:https://codeforces.com/contest/2140 A. Shift Sort 算法: 贪心。 思路: 手玩几组样例后发现每次只能将一个 [latex]1[/latex] 换到正确位置,直接找有几个 [latex]1[/late…