結果

問題 No.138 化石のバージョン
ユーザー hiyori
提出日時 2017-08-06 08:15:35
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 390 bytes
コンパイル時間 528 ms
コンパイル使用メモリ 63,872 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-11 22:40:16
合計ジャッジ時間 1,554 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
using namespace std;

int main()
{
    string s1,s2;
    cin >> s1 >> s2;
    int flag=1;
    for(int i=0; i<s1.length()-2; i+=2) {
        if(s1[i] > s2[i]) { break; }
        else if(s1[i]==s2[i]) { continue; }
        else { flag=0; break;}
    }
    if(flag==0) { cout << "NO" << endl; }
    else if(flag==1) { cout << "YES" << endl;}
    return 0;
}
0