結果

問題 No.138 化石のバージョン
ユーザー koyumeishikoyumeishi
提出日時 2015-01-30 16:28:50
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 869 bytes
コンパイル時間 1,760 ms
コンパイル使用メモリ 74,924 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-05 08:22:18
合計ジャッジ時間 2,082 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,384 KB
testcase_12 WA -
testcase_13 AC 2 ms
4,384 KB
testcase_14 WA -
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 2 ms
4,384 KB
testcase_25 AC 2 ms
4,384 KB
testcase_26 AC 2 ms
4,384 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 AC 2 ms
4,380 KB
testcase_29 WA -
testcase_30 AC 1 ms
4,380 KB
testcase_31 WA -
testcase_32 AC 2 ms
4,376 KB
testcase_33 WA -
testcase_34 AC 1 ms
4,380 KB
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
#include <set>
using namespace std;

struct ver{
	string a;
	string b;
	string c;

	ver(char* aa, char* bb, char* cc){
		a = string(aa);
		b = string(bb);
		c = string(cc);
	}

	bool operator==(const ver &x){
		if(a != x.a) return false;
		if(b != x.b) return false;
		if(c != x.c) return false;
		return true;
	}

	bool operator<(const ver &x){
		if(a<x.a) return true;
		else if(a>x.a) return false;
		else if(b<x.b) return true;
		else if(b>x.b) return false;
		else if(c<x.c) return true;
		else return false;
	}

};

int main(){

	char a[10],b[10],c[10];
	scanf("%s.%s.%s", a,b,c);
	ver x(a,b,c);

	scanf("%s.%s.%s", a,b,c);
	ver y(a,b,c);

	cout << ((y<x || y==x) ? "YES":"NO") << endl;

	return 0;
}
0