結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2016-01-09 00:09:59 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,267 bytes |
コンパイル時間 | 595 ms |
コンパイル使用メモリ | 86,396 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 13:12:23 |
合計ジャッジ時間 | 4,752 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 RE * 28 |
ソースコード
#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[i] *= 10; v[i] += 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; }