結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2015-05-31 15:44:21 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 434 bytes |
コンパイル時間 | 112 ms |
コンパイル使用メモリ | 22,272 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 12:59:33 |
合計ジャッジ時間 | 1,118 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 WA * 4 |
コンパイルメッセージ
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> int main() { int a,b,c; int d,e,f; scanf("%d.%d.%d",&a,&b,&c); scanf("%d.%d.%d",&d,&e,&f); if(d==a) { if(e==b) { if(f==c) { printf("NO"); } else if(f>c) { printf("NO"); } else if(f<c)printf("YES"); } else if(e>b) { printf("NO"); } else if(e<b) { printf("YES"); } } else if(d>a) { printf("NO"); } else if(d<a) { printf("YES"); } return 0; }