結果
| 問題 | 
                            No.138 化石のバージョン
                             | 
                    
| コンテスト | |
| ユーザー | 
                             prog470
                         | 
                    
| 提出日時 | 2016-09-13 14:01:32 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 735 bytes | 
| コンパイル時間 | 539 ms | 
| コンパイル使用メモリ | 68,904 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-11-17 04:47:11 | 
| 合計ジャッジ時間 | 1,471 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 23 WA * 10 | 
コンパイルメッセージ
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] * 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;
}
            
            
            
        
            
prog470