結果

問題 No.138 化石のバージョン
ユーザー KUSAKA GenKUSAKA Gen
提出日時 2018-02-26 21:32:53
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 599 bytes
コンパイル時間 576 ms
コンパイル使用メモリ 56,276 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-03 17:16:31
合計ジャッジ時間 1,593 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 WA -
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 1 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 1 ms
5,376 KB
testcase_24 AC 1 ms
5,376 KB
testcase_25 AC 1 ms
5,376 KB
testcase_26 AC 1 ms
5,376 KB
testcase_27 AC 1 ms
5,376 KB
testcase_28 AC 2 ms
5,376 KB
testcase_29 AC 2 ms
5,376 KB
testcase_30 AC 1 ms
5,376 KB
testcase_31 AC 1 ms
5,376 KB
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 2 ms
5,376 KB
testcase_34 AC 2 ms
5,376 KB
testcase_35 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main()
{
	string S0, S1;
	double s0, s1;
	cin >> S0 >> S1;

	s0 = stod(S0.substr(0, S0.rfind('.')));
	s1 = stod(S1.substr(0, S1.rfind('.')));

	if(s1 > s0)
	{
		cout << "NO" << endl;
		return 0;
	}
	else if(s1 < s0)
	{
		cout << "YES" << endl;
		return 0;
	}
	else
	{
		s0 = stod(S0.substr(S0.find('.') + 1, S0.length() - S0.find('.') + 1));
		s1 = stod(S1.substr(S1.find('.') + 1, S1.length() - S1.find('.') + 1));

		if(s1 > s0)
		{
			cout << "NO" << endl;
			return 0;
		}
		else
		{
			cout << "YES" << endl;
			return 0;
		}
	}
}
0