結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2015-01-29 23:34:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 797 bytes |
コンパイル時間 | 882 ms |
コンパイル使用メモリ | 82,388 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-23 04:10:38 |
合計ジャッジ時間 | 1,864 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 WA * 4 |
ソースコード
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <iostream> #include <map> #include <list> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <vector> #include <algorithm> #include <utility> #include <queue> #include <iomanip> #define INF 1050000000 #define SIZE 300 #define MOD 1000000007 using namespace std; int main() { char s1[100], s2[100]; int a, b, c; int x, y; int i = 0; cin >> s1 >> s2; while (s1[i] != '\0') { if (s1[i] == '.') s1[i] = ' '; i++; } while (s2[i] != '\0') { if (s1[i] == '.') s1[i] = ' '; i++; } sscanf(s1, "%d%d%d", &a, &b, &c); x = a * 100 + b * 10 + c; sscanf(s2, "%d%d%d", &a, &b, &c); y = a * 100 + b * 10 + c; if (x >= y) cout << "YES" << endl; else cout << "NO" << endl; return (0); }