結果
| 問題 | 
                            No.138 化石のバージョン
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-08-11 19:12:08 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 472 bytes | 
| コンパイル時間 | 594 ms | 
| コンパイル使用メモリ | 79,948 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-07 11:01:29 | 
| 合計ジャッジ時間 | 1,620 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 26 WA * 7 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:23:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   23 |         scanf("%d.%d.%d.",&a,&b,&c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~
main.cpp:24:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   24 |         scanf("%d.%d.%d.",&d,&e,&f);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
//#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b,c,d,e,f;
	scanf("%d.%d.%d.",&a,&b,&c);
	scanf("%d.%d.%d.",&d,&e,&f);
	c+=b*10+a*100;
	f+=e*10+d*100;
	if(c>f)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	return 0;
}