結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
nanophoto12
|
| 提出日時 | 2016-01-09 00:11:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 1,267 bytes |
| コンパイル時間 | 806 ms |
| コンパイル使用メモリ | 88,484 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-29 13:45:55 |
| 合計ジャッジ時間 | 1,872 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
ソースコード
#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <limits>
using namespace std;
#define FOR(x,y) for(int x = 0;x < (y);x++)
#define LLI long long int
#define FORR(x,arr) for(auto& x:arr)
#define ALL(a) (a.begin()),(a.end())
#define _L(x) cout<<(x)<<endl
struct Element{
LLI Value;
vector<int> R;
};
vector<int> ToNumeric(string text)
{
vector<int> v(3);
int j = 0;
for(int i = 0;i < text.length();i++)
{
if(text[i] == '.')
{
j++;
}
else
{
v[j] *= 10;
v[j] += text[i]-'0';
}
}
return v;
}
int main()
{
string source, target;
cin >> source;
cin >> target;
auto sourceN = ToNumeric(source);
auto targetN =ToNumeric(target);
for(int i = 0;i < 3;i++)
{
if(sourceN[i] > targetN[i])
{
cout << "YES" << endl;
return 0;
}
if(sourceN[i] < targetN[i])
{
cout << "NO" << endl;
return 0;
}
}
cout << "YES" << endl;
return 0;
return 0;
}
nanophoto12