よじろめ覚書

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

2019-11-26から1日間の記事一覧

ABC106A - Garden

ABC

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

ABC105B - Cakes and Donuts

ABC

問題:B - Cakes and Donuts #include <iostream> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) int main(void) { int n; bool flg = false; cin.tie(0); ios::sync_with_stdio(false); cin >> n; REP(i, n / 4 + 1) { REP(j, n / 7 + 1) { </iostream>…

ABC105A - AtCoder Crackers

ABC

問題:A - AtCoder Crackers #include <iostream> using namespace std; int main(void) { int n, k; cin.tie(0); ios::sync_with_stdio(false); cin >> n >> k; cout << (n % k? "1" : "0") << "\n"; return 0; }</iostream>

ABC104B - AcCepted

ABC

問題:B - AcCepted #include <iostream> #include <string> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) bool getJudge(string s) { int cnt = 0; if (s[0] != 'A') { return false; } FOR(i, 1, s.length()) { if (s[i] == 'C' && (i < 2 ||</string></iostream>…