結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
ty70
|
| 提出日時 | 2016-11-09 12:23:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 795 bytes |
| コンパイル時間 | 1,865 ms |
| コンパイル使用メモリ | 172,208 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 14:14:04 |
| 合計ジャッジ時間 | 2,949 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
ソースコード
#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
}
ll get_num(string s){
stringstream ss(s);
vector<int> val; val.clear();
int v;
while(ss >> v){
val.push_back(v);
} // end while
ll res = 0LL;
rep(i, val.size()){
res += (ll)val[i];
res *= 1000LL;
} // 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);
ll n_zero = get_num(zero);
ll n_one = get_num(one);
cout << (n_zero >= n_one ? "YES" : "NO") << endl;
return 0;
}
ty70