結果

問題 No.138 化石のバージョン
ユーザー tntan
提出日時 2015-12-15 06:15:19
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 507 bytes
コンパイル時間 1,215 ms
コンパイル使用メモリ 69,192 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 13:41:23
合計ジャッジ時間 1,841 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<fstream>
#include<iomanip>
#include<vector>
#include<cctype>
#include<algorithm>
#include<sstream>
using namespace std;

int main()
{
	int a[3], b[3];
	char c;
	cin >> a[0] >> c >> a[1] >> c >> a[2];
	cin >> b[0] >> c >> b[1] >> c >> b[2];
	for (int i = 0; i < 3; i++)
	{
		if (a[i] == b[i])continue;
		else if (a[i]>b[i])
		{
			cout << "YES" << endl;
			return 0;
		}
		else
		{
			cout << "NO" << endl;
			return 0;
		}
	}
	cout << "YES" << endl;
	return 0;
}
0