結果
| 問題 | 
                            No.138 化石のバージョン
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kaito_tateyama
                         | 
                    
| 提出日時 | 2017-08-10 06:56:15 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 642 bytes | 
| コンパイル時間 | 586 ms | 
| コンパイル使用メモリ | 64,992 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-12 01:57:26 | 
| 合計ジャッジ時間 | 1,604 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 19 WA * 14 | 
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
using namespace std;
//split(string,区切り文字)
vector<string> split(const string& i, char del) {
    istringstream stream(i);
    string field;
    vector<string> result;
    while (getline(stream, field, del)) {
      result.push_back(field);
    }
    return result;
}
int sp(const string&i, int num){
    int a = stoi(split(i,'.')[num]);
    return a;
}
int main(){
  string m,n;
  cin >> m >> n;
  if (sp(m,0) >= sp(n,0) && sp(m,1) >= sp(n,1) && sp(m,2) >= sp(n,2)) {
    cout << "YES" << "\n";
  }else{
    cout << "NO" << "\n";
  }
  return 0;
}
            
            
            
        
            
kaito_tateyama