結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
ty70
|
| 提出日時 | 2016-11-09 12:21:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 790 bytes |
| コンパイル時間 | 1,436 ms |
| コンパイル使用メモリ | 172,440 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-25 05:27:06 |
| 合計ジャッジ時間 | 2,334 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 WA * 1 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define ALL(A) A.begin(), A.end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
void replace_dot(string& s){
int n = s.length();
rep (i, n){
if (s[i] == '.') s[i] = ' ';
} // end rep
}
int get_num(string s){
stringstream ss(s);
vector<int> val; val.clear();
int v;
while(ss >> v){
val.push_back(v);
} // end while
int res = 0;
rep(i, val.size()){
res += val[i];
res *= 100;
} // end rep
return res;
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
string zero; cin >> zero;
string one; cin >> one;
replace_dot(zero);
replace_dot(one);
int n_zero = get_num(zero);
int n_one = get_num(one);
cout << (n_zero >= n_one ? "YES" : "NO") << endl;
return 0;
}
ty70