結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2015-11-15 20:23:40 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 384 bytes |
コンパイル時間 | 691 ms |
コンパイル使用メモリ | 59,244 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 13:37:25 |
合計ジャッジ時間 | 1,867 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d.%d.%d",&a,&b,&c); | ~~~~~^~~~~~~~~~~~~~~~~~~~~ main.cpp:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d.%d.%d",&d,&e,&f); | ~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main(){ int a,b,c; int d,e,f; bool flag=false; scanf("%d.%d.%d",&a,&b,&c); scanf("%d.%d.%d",&d,&e,&f); if(a>d)flag = true; else if(a==d){ if(b>e)flag = true; else if(b==e){ if(d>f)flag = true; else if(d==f)flag = true; } } if(flag)cout << "YES" << endl; else cout << "NO" <<endl; }