結果

問題 No.138 化石のバージョン
ユーザー cwwcww
提出日時 2016-09-24 14:00:21
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 686 bytes
コンパイル時間 1,523 ms
コンパイル使用メモリ 170,700 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-17 21:38:37
合計ジャッジ時間 2,538 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27 WA * 1 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 ) )
	{
		size_t pos = 0;
		string tmp;
		for( size_t i = pos; i < S.size(); i++ )
		{
			pos = S.find_first_of( '.' , pos );
			tmp = S.substr( i, i + pos );
			str.push_back( stoi(tmp) );
			i += pos;
		}
	}
	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;
}
0