結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
piyoko_212
|
| 提出日時 | 2015-12-28 22:53:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 364 bytes |
| コンパイル時間 | 337 ms |
| コンパイル使用メモリ | 33,228 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 13:42:36 |
| 合計ジャッジ時間 | 1,540 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d.%d.%d",&a,&b,&c);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d.%d.%d",&d,&e,&f);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<algorithm>
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);
if(a>d){printf("YES\n");return 0;}
if(a<d){printf("NO\n");return 0;}
if(b>e){printf("YES\n");return 0;}
if(b<e){printf("NO\n");return 0;}
if(c>=f){printf("YES\n");return 0;}
if(c<f){printf("NO\n");return 0;}
}
piyoko_212