よじろめ覚書

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

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

ABC116A - Right Triangle

ABC

問題:A - Right Triangle #include <algorithm> #include <iostream> using namespace std; int main(void) { int n[3]; cin.tie(0); ios::sync_with_stdio(false); cin >> n[0] >> n[1] >> n[2]; sort(n, n + 3); cout << (n[0] * n[1]) / 2 << "\n"; return 0; }</iostream></algorithm>

ABC115B - Christmas Eve Eve

ABC

問題:B - Christmas Eve Eve #include <algorithm> #include <iostream> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) int main(void) { int n, p, max_p = 0, sum = 0; cin.tie(0); ios::sync_with_stdio(false); cin >> n; REP(i, n) { cin >> p; ma</iostream></algorithm>…

ABC115A - Christmas Eve Eve Eve

ABC

問題:A - Christmas Eve Eve Eve #include <iostream> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) int main(void) { int d; cin.tie(0); ios::sync_with_stdio(false); cin >> d; cout << "Christmas"; REP(i, 25 - d) { cout << " Eve";</iostream>…

ABC114B - 754

ABC

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