結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-29 02:07:50 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 712 bytes |
| コンパイル時間 | 622 ms |
| コンパイル使用メモリ | 72,308 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-06 08:43:06 |
| 合計ジャッジ時間 | 1,801 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 4 |
コンパイルメッセージ
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(a>a1)goto y;
else if(a<a1)goto n;
if(a>a1)goto y;
else if(a<a1)goto n;
else goto y;
y:;
cout<<"YES"<<endl;
return 0;
n:;
cout<<"NO"<<endl;
return 0;
}