よじろめ覚書

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

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

ABC094B - Toll Gates

ABC

問題:B - Toll Gates #include <algorithm> #include <iostream> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) int main(void) { int n, m, x, a, left = 0, right = 0; cin.tie(0); ios::sync_with_stdio(false); cin >> n >> m >> x; REP(i, m) { ci</iostream></algorithm>…

ABC094A - Cats and Dogs

ABC

問題:A - Cats and Dogs #include <iostream> using namespace std; int main(void) { int a, b, x; cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b >> x; cout << (a <= x && x <= a + b? "YES" : "NO") << "\n"; return 0; }</iostream>

ABC093B - Small and Large Integers

ABC

問題:B - Small and Large Integers #include <algorithm> #include <iostream> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) int main(void) { int a, b, k; cin.tie(0); ios::sync_with_stdio(false); cin >> a >> b >> k; FOR(i, a, min(b, a </iostream></algorithm>…

ABC093A - abc of ABC

ABC

問題:A - abc of ABC #include <iostream> #include <string> using namespace std; int main(void) { string s; cin.tie(0); ios::sync_with_stdio(false); cin >> s; cout << (s[0] != s[1] && s[1] != s[2] && s[2] != s[0]? "Yes" : "No") << "\n"; return 0; }</string></iostream>