結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2019-10-29 19:52:14 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,180 bytes |
コンパイル時間 | 1,328 ms |
コンパイル使用メモリ | 159,860 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-14 21:35:33 |
合計ジャッジ時間 | 2,401 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 8 |
ソースコード
/* 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; int f[3] = { (int)first[0], (int)first[2], (int)first[4], }; int s[3] = { (int)second[0], (int)second[2], (int)second[4], }; if (first == second) { cout << "YES" << endl; } else { if (f[0] > s[0]) { cout << "YES" << endl; } else if (f[0] < s[0]) { cout << "NO" << endl; } else { // A is same if (f[1] > s[1]) { cout << "YES" << endl; } else if (f[1] < s[1]) { cout << "NO" << endl; } else { // B is same if (f[2] > s[2]) { cout << "YES" << endl; } else if (f[2] < s[2]) { cout << "NO" << endl; } else { // C is same } } } } return 0; }