よじろめ覚書

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

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

ABC083A - Libra

ABC

問題:A - Libra #include <iostream> using namespace std; int main(void) { int a, b, c, d; string ret = ""; cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b >> c >> d; if (a + b > c + d) { ret = "Left"; } else if (a + b < c + d) { ret = "Right"</iostream>…

ABC082B - Two Anagrams

ABC

問題:B - Two Anagrams #include <algorithm> #include <iostream> #include <string> using namespace std; int main(void) { string s, t; cin.tie(0); ios::sync_with_stdio(false); cin >> s; cin >> t; sort (s.begin(), s.end()); sort (t.begin(), t.end()); reverse (t.begin(), </string></iostream></algorithm>…

ABC082A - Round Up the Mean

ABC

問題:A - Round Up the Mean #include <cmath> #include <iostream> using namespace std; int main(void) { int a, b; cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b; cout << (int)ceil((a + b) / 2.0) << "\n"; return 0; }</iostream></cmath>