結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2019-10-29 19:45:07 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,061 bytes |
コンパイル時間 | 1,259 ms |
コンパイル使用メモリ | 160,224 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-14 21:35:15 |
合計ジャッジ時間 | 2,534 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 12 |
ソースコード
/* No.138 化石のバージョン https://yukicoder.me/problems/no/138 */ #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); // A.B.C string first, second; cin >> first; cin >> second; if (first == second) { cout << "YES" << endl; return 0; } else { if (first[0] > second[0]) { cout << "YES" << endl; } else if (first[0] < second[0]) { cout << "NO" << endl; } else { // A is same if (first[2] > second[2]) { cout << "YES" << endl; } else if (first[2] > second[2]) { cout << "NO" << endl; } else { // B is same if (first[4] > second[4]) { cout << "YES" << endl; } else if (first[4] > second[4]) { cout << "NO" << endl; } else { // C is same } } } } return 0; }