結果

問題 No.138 化石のバージョン
ユーザー prog470prog470
提出日時 2016-09-13 14:01:32
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 735 bytes
コンパイル時間 532 ms
コンパイル使用メモリ 69,160 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-28 13:02:19
合計ジャッジ時間 1,447 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 WA -
testcase_06 AC 1 ms
6,944 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 WA -
testcase_09 AC 1 ms
6,940 KB
testcase_10 WA -
testcase_11 AC 1 ms
6,944 KB
testcase_12 AC 2 ms
6,940 KB
testcase_13 AC 1 ms
6,944 KB
testcase_14 AC 1 ms
6,940 KB
testcase_15 AC 1 ms
6,944 KB
testcase_16 AC 1 ms
6,940 KB
testcase_17 AC 1 ms
6,940 KB
testcase_18 AC 1 ms
6,944 KB
testcase_19 AC 2 ms
6,944 KB
testcase_20 AC 1 ms
6,940 KB
testcase_21 AC 1 ms
6,940 KB
testcase_22 AC 2 ms
6,940 KB
testcase_23 AC 1 ms
6,940 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 2 ms
6,944 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 2 ms
6,940 KB
testcase_32 WA -
testcase_33 AC 1 ms
6,944 KB
testcase_34 AC 2 ms
6,944 KB
testcase_35 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:18:42: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   18 |         for (int i = 0; i < 2; i++) scanf("%d . %d . %d", &A[i],  &B[i], &C[i]);
      |                                     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <string>
#include <stdio.h>

using namespace std;

int main() {
	int A[2], B[2], C[2];
	for (int i = 0; i < 2; i++) scanf("%d . %d . %d", &A[i],  &B[i], &C[i]);
	
	bool flag = false;
	/*
	if (A[1] < A[0]) flag = true;
	if(B[1] < B[0] && A[1] == A[0]) flag = true;
	if(C[1] <= C[0] && B[1] == B[0] && A[1] == A[0]) flag = true;
	*/

	long long n1, n2;
	n1 = A[0] * 1000000000 + B[0] * 10000 + C[0];
	n2 = A[1] * 1000000000 + B[1] * 10000 + C[1];

	if (n1 >= n2) flag = true;

	if (flag) cout << "YES" << endl;
	else cout << "NO" << endl;

	return 0;
}
0