結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
prog470
|
| 提出日時 | 2016-09-13 13:49:15 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 583 bytes |
| コンパイル時間 | 769 ms |
| コンパイル使用メモリ | 68,560 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 14:09:40 |
| 合計ジャッジ時間 | 1,750 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
コンパイルメッセージ
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;
if (flag) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
prog470