結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
water
|
| 提出日時 | 2020-03-08 12:27:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 794 bytes |
| コンパイル時間 | 2,441 ms |
| コンパイル使用メモリ | 173,788 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-07 00:05:45 |
| 合計ジャッジ時間 | 3,042 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 11 |
ソースコード
#include <bits/stdc++.h>
#define INF 990000000
//
using namespace std;
vector<string> split(string str, char del) {
int first = 0;
int last = str.find_first_of(del);
vector<string> result;
while (first < str.size()) {
string subStr(str, first, last - first);
result.push_back(subStr);
first = last + 1;
last = str.find_first_of(del, first);
if (last == string::npos) {
last = str.size();
}
}
return result;
}
int main() {
string s;
cin>>s;
vector<string> a=split(s,'.');
string t="";
for(int i=0;i<3;i++){
t+=a[i];
}
int beg=stoi(t);
cin>>s;
a.clear();
a=split(s,'.');
string tt="";
for(int i=0;i<3;i++){
tt+=a[i];
}
int e=stoi(t);
if(t>tt)
cout <<"YES"<<endl;
else
cout <<"NO"<<endl;
}
water