結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2017-09-29 09:14:16 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 567 bytes |
コンパイル時間 | 550 ms |
コンパイル使用メモリ | 65,412 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-29 14:32:58 |
合計ジャッジ時間 | 1,721 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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",&aa,&bb,&cc); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<iostream> #include<queue> #include<cstdio> #include<utility> #include<algorithm> #include<cmath> using namespace std; int main(){ int a,b,c,aa,bb,cc; scanf("%d.%d.%d",&a,&b,&c); scanf("%d.%d.%d",&aa,&bb,&cc); if(aa<a){ cout<<"YES"<<endl;return 0; }else if(aa>a){ cout<<"NO"<<endl;return 0; }else{ if(bb<b){ cout<<"YES"<<endl;return 0; }else if(bb>b){ cout<<"NO"<<endl;return 0; }else{ if(cc<c){ cout<<"YES"<<endl;return 0; }else if(cc>c){ cout<<"NO"<<endl;return 0; }else{ cout<<"YES"<<endl;return 0; } } } }