結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-26 21:21:54 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 504 bytes |
| コンパイル時間 | 662 ms |
| コンパイル使用メモリ | 56,448 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-24 19:37:20 |
| 合計ジャッジ時間 | 1,938 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 10 |
ソースコード
#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;
}
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;
}
cout << "YES" << endl;
return 0;
}