結果

問題 No.138 化石のバージョン
ユーザー ふう
提出日時 2015-01-29 23:36:28
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 805 bytes
コンパイル時間 812 ms
コンパイル使用メモリ 81,540 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-23 04:11:26
合計ジャッジ時間 2,416 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <map>
#include <list>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <iomanip>
#define INF 1050000000
#define SIZE 300
#define MOD 1000000007

using namespace std;


int main()
{
	char s1[100], s2[100];
	int a, b, c;
	int x, y;
	int i = 0;

	cin >> s1 >> s2;

	while (s1[i] != '\0') {
		if (s1[i] == '.') s1[i] = ' ';
		i++;
	}
	i = 0;
	while (s2[i] != '\0') {
		if (s2[i] == '.') s2[i] = ' ';
		i++;
	}
	sscanf(s1, "%d%d%d", &a, &b, &c);
	x = a * 100 + b * 10 + c;
	sscanf(s2, "%d%d%d", &a, &b, &c);
	y = a * 100 + b * 10 + c;

	if (x >= y) cout << "YES" << endl;
	else	cout << "NO" << endl;
	return (0);
}

0