結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2016-09-24 11:18:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 534 bytes |
コンパイル時間 | 1,773 ms |
コンパイル使用メモリ | 171,220 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 14:10:43 |
合計ジャッジ時間 | 2,953 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){string S;vector<int> str;while( getline( cin, S, '.' ) ){istringstream ss( S );int a;while ( ss >> a ){str.push_back( a );}}if( str[0] < str[3] ){cout << "NO" << endl;return 0;}else if( str[0] == str[3] ){if( str[1] < str[4] ){cout << "NO" << endl;return 0;}else if( str[1] == str[4] ){if( str[2] < str[5] ){cout << "NO" << endl;return 0;}}}cout << "YES" << endl;return 0;}