链接:https://codeforces.com/contest/2155 A. El fucho 算法: 模拟。 思路: 打表。 关键代码: void miyan() { int n; cin >> n; cout << (n - 1) * 2 << endl; }…
链接:https://codeforces.com/contest/2145 A. Candies for Nephews 算法: 数学。 思路: 无。 关键代码: void miyan() { ll n; cin >> n; cout &l…
链接:https://atcoder.jp/contests/abc396 A - Triple Four 算法: 模拟。 思路: 无。 关键代码: void miyan() { int n; cin >> n; vector<int> a(n);…
链接:https://atcoder.jp/contests/abc397 A - Thermometer 算法: 模拟。 思路: 无。 关键代码: void miyan() { double x; cin >> x; if (x < 37.5) cout << 3 <…
链接:https://atcoder.jp/contests/abc429 A - Too Many Requests 算法: 模拟。 思路: 无。 关键代码: void miyan() { int n, m; cin >> n >> m; for (i…
链接:https://atcoder.jp/contests/abc398 A - Doors in the Center 算法: 模拟。 思路: 无。 关键代码: void miyan() { int n; cin >> n; if (n …
链接:https://atcoder.jp/contests/abc399 A - Hamming Distance 算法: 模拟。 思路: 无。 关键代码: void miyan() { int n; string s, t; cin >> n >> …
链接:https://atcoder.jp/contests/abc400 A - ABC400 Party 算法: 模拟。 思路: 无。 关键代码: void miyan() { int n; cin >> n; if (400 % n) cout &…
链接:https://atcoder.jp/contests/abc428 A - Grandma's Footsteps 算法: 模拟。 思路: 无。 关键代码: void miyan() { int s, a, b, x; cin >> s >> a…
链接:https://codeforces.com/contest/2160 A. MEX Partition 算法: 贪心。 思路: 无。 关键代码: void miyan() { int n; cin >> n; set<int> s; for (int i = 0; i < …