結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
kaedamakun
|
| 提出日時 | 2015-05-31 15:46:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 435 bytes |
| コンパイル時間 | 400 ms |
| コンパイル使用メモリ | 22,272 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 13:18:00 |
| 合計ジャッジ時間 | 1,327 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d.%d.%d",&a,&b,&c);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d.%d.%d",&d,&e,&f);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
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(d==a)
{
if(e==b)
{
if(f==c)
{
printf("YES");
}
else if(f>c)
{
printf("NO");
}
else if(f<c)printf("YES");
}
else if(e>b)
{
printf("NO");
}
else if(e<b)
{
printf("YES");
}
}
else if(d>a)
{
printf("NO");
}
else if(d<a)
{
printf("YES");
}
return 0;
}
kaedamakun