結果

問題 No.138 化石のバージョン
ユーザー leaf+
提出日時 2019-04-13 18:34:51
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 606 bytes
コンパイル時間 981 ms
コンパイル使用メモリ 56,284 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-15 11:17:18
合計ジャッジ時間 1,698 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;
int main() {
    int a[6] = {}, i, z, t = 0;
    string n[2], sd;
    char k = '.';
    cin >> n[0] >> n[1];
    for (z = 0; z < 2; z++) {
        for (i = 0; i < n[z].length(); i++) {
            if (n[z][i] == k) {
                a[t] = stoi(sd); t += 1; sd = "";
            } else {
                sd += n[z][i];
            }
        }
        a[t] = stoi(sd); t += 1; sd = "";
    }
    if ((a[0] >= a[3]) && (a[1] >=a[4]) && (a[2] >= a[5])) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
    return 0;
}
0