結果
| 問題 | 
                            No.138 化石のバージョン
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2017-07-16 21:02:45 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 407 bytes | 
| コンパイル時間 | 495 ms | 
| コンパイル使用メモリ | 58,336 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-08 04:30:00 | 
| 合計ジャッジ時間 | 1,777 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 23 WA * 10 | 
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
    string a, b;
    cin >> a >> b;
    for(int i=0; i<a.length(); i++){
        if(b[i] < a[i]){
            cout << "YES" << endl;
            return 0;
        }
        else if(b[i] > a[i]) {
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "NO" << endl;
    return 0;
}