結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2015-02-01 20:06:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 439 bytes |
コンパイル時間 | 759 ms |
コンパイル使用メモリ | 59,608 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-29 13:00:43 |
合計ジャッジ時間 | 1,916 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
#include <iostream> #include <algorithm> #include <sstream> #include <cstdio> using namespace std; int main(int argc, char *argv[]) { int N, K; string s; getline(cin, s); int a, b, c; sscanf(s.c_str(), "%d.%d.%d", &a, &b, &c); getline(cin, s); int d, e, f; sscanf(s.c_str(), "%d.%d.%d", &d, &e, &f); bool old = d < a || d == a && (e < b || e == b && f <= c); string ans = old ? "YES" : "NO"; cout << ans << endl; return 0; }