結果
問題 | No.138 化石のバージョン |
ユーザー |
|
提出日時 | 2015-03-07 03:41:03 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 289 bytes |
コンパイル時間 | 1,524 ms |
コンパイル使用メモリ | 157,852 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-29 13:06:52 |
合計ジャッジ時間 | 2,608 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d.%d.%d",&a,&b,&c); | ~~~~~^~~~~~~~~~~~~~~~~~~~~ main.cpp:9:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d.%d.%d",&d,&e,&f); | ~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>using namespace std;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(a<d||(a==d&&b<e)||(a==d&&b==e&&c<f)){cout<<"NO"<<endl;}else{cout<<"YES"<<endl;}return 0;}