よじろめ覚書

私の理解度重視のソースコードです。

2020-01-24から1日間の記事一覧

ABC146B - ROT N

ABC

問題:B - ROT N #include <iostream> #include <string> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) int main(void) { int n; string s; cin.tie(0); ios::sync_with_stdio(false); cin >> n; cin >> s; REP(i, s.length()) { s[i] = (n + (s[i] </string></iostream>…

ABC146A - Can't Wait for Holiday

ABC

問題:A - Can't Wait for Holiday #include <algorithm> #include <iostream> #include <iterator> #include <string> #include <vector> using namespace std; #define ALL(c) (c).begin(), (c).end() int main(void) { const vector<string> WEEKDAY = {"SUN", "MON", "TUE", "WED" , "THU", "FRI", "SAT"}; strin</string></vector></string></iterator></iostream></algorithm>…

ABC145B - Echo

ABC

問題:B - Echo #include <iostream> #include <string> using namespace std; int main(void) { int n; string s; cin.tie(0); ios::sync_with_stdio(false); cin >> n; cin >> s; cout << (n % 2 == 0 && s.substr(0, n / 2) == s.substr(n / 2, n)? "Yes" : "No") << "\n"; </string></iostream>…

ABC145A - Circle

ABC

問題:A - Circle #include <iostream> using namespace std; int main(void) { int r; cin.tie(0); ios::sync_with_stdio(false); cin >> r; cout << r * r << "\n"; return 0; }</iostream>

ABC144B - 81

ABC

問題:B - 81 #include <iostream> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) int main(void) { int n; bool flg = false; cin.tie(0); ios::sync_with_stdio(false); cin >> n; FOR(i, 1, 9 + 1) { FOR(j, 1, 9 + 1) { if (i * j =</iostream>…