結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
prog470
|
| 提出日時 | 2016-09-13 14:00:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 731 bytes |
| コンパイル時間 | 538 ms |
| コンパイル使用メモリ | 68,576 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 04:47:08 |
| 合計ジャッジ時間 | 1,572 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 11 |
コンパイルメッセージ
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]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#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] * 100000000 + B[0] * 1000 + C[0];
n2 = A[1] * 100000000 + B[1] * 1000 + C[1];
if (n1 >= n2) flag = true;
if (flag) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
prog470