よじろめ覚書

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

2019-12-03から1日間の記事一覧

ABC109A - ABC333

ABC

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

ABC108B - Ruined Square

ABC

問題:B - Ruined Square #include <iostream> using namespace std; int main(void) { int x1, x2, y1, y2, a, b; cin.tie(0); ios::sync_with_stdio(false); cin >> x1 >> x2 >> y1 >> y2; a = y1 - x1; b = y2 - x2; cout << y1 - b << " " << y2 + a << " " << x1 </iostream>…

ABC108A - Pair

ABC

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

ABC107B - Grid Compression

ABC

問題:B - Grid Compression #include <iostream> #include <string> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) int main(void) { int h, w; string a[100]; bool col[100] = {false}, row[100] = {false}; cin.tie(0); ios::sync_with_stdio(fal</string></iostream>…