結果

問題 No.138 化石のバージョン
ユーザー waterwater
提出日時 2020-03-08 12:25:12
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 786 bytes
コンパイル時間 3,175 ms
コンパイル使用メモリ 172,360 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-07 00:02:39
合計ジャッジ時間 4,534 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#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,'.');
t="";
for(int i=0;i<3;i++){
t+=a[i];
}
int e=stoi(t);

if(beg>e)
cout <<"YES"<<endl;
else
cout <<"NO"<<endl;

}




0