結果

問題 No.138 化石のバージョン
ユーザー kuisiba
提出日時 2016-04-04 03:28:39
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 451 ms
コンパイル使用メモリ 56,552 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-02 13:07:36
合計ジャッジ時間 1,568 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int func(string s) {
    for (int i = 0; i < 2; ++i) {
        size_t a = s.find('.');
        s.erase(s.begin() + a);
    }
    return stoi(s);
}

int main() {
    string s1, s2;
    cin >> s1 >> s2;
    int num1, num2;
    num1 = func(s1);
    num2 = func(s2);

    if (num1 >= num2) cout << "YES" << endl;
    else cout << "NO" << endl;
    return 0;
}
0