結果
| 問題 | No.138 化石のバージョン |
| コンテスト | |
| ユーザー |
cww
|
| 提出日時 | 2016-09-26 11:37:20 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 564 bytes |
| 記録 | |
| コンパイル時間 | 870 ms |
| コンパイル使用メモリ | 188,244 KB |
| 実行使用メモリ | 9,928 KB |
| 最終ジャッジ日時 | 2026-09-25 22:19:30 |
| 合計ジャッジ時間 | 3,136 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); i++)
int main()
{
string S;
vector<int> str;
while( getline( cin, S ) )
{
S = S + '.';
size_t pos = 0;
string tmp;
for( size_t i = pos; i < S.size(); i++ )
{
pos = S.find_first_of( '.' , i );
tmp = S.substr( i, pos - i );
str.push_back( stoi( tmp ) );
i += ( pos - i );
}
}
REP( i, 3 ){
if( str[ i ] != str[ i + 3 ] )
{
if( str[ i ] <= str[ i + 3 ] )
{
cout << "NO" << endl;
return 0;
}
}
}
cout << "YES" << endl;
return 0;
}
cww