結果
問題 | No.138 化石のバージョン |
ユーザー |
|
提出日時 | 2017-08-29 02:09:01 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 712 bytes |
コンパイル時間 | 676 ms |
コンパイル使用メモリ | 72,308 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 14:31:25 |
合計ジャッジ時間 | 1,828 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:25:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 25 | scanf("%d.%d.%d",&a,&b,&c); | ~~~~~^~~~~~~~~~~~~~~~~~~~~ main.cpp:26:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 26 | scanf("%d.%d.%d",&a1,&b1,&c1); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream>#include <string>#include <vector>#include <algorithm>#include <map>#include <set>#include <queue>#include <stack>#include <cmath>#include <cstdlib>#include <sstream>#include <cstdio>#include <iterator>#define N 1000#define re(i,n) for(int i=0;i<(n);i++)#define rep(i,a,b) for(int i=(a);i<(b);i++)#define fe(i,n,f) for_each(i,n,f)using namespace std;typedef long long ll;int main(void){int a,b,c,a1,b1,c1;scanf("%d.%d.%d",&a,&b,&c);scanf("%d.%d.%d",&a1,&b1,&c1);if(a>a1)goto y;else if(a<a1)goto n;if(b>b1)goto y;else if(b<b1)goto n;if(c>c1)goto y;else if(c<c1)goto n;else goto y;y:;cout<<"YES"<<endl;return 0;n:;cout<<"NO"<<endl;return 0;}