結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-01-29 23:35:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 386 bytes |
| コンパイル時間 | 374 ms |
| コンパイル使用メモリ | 33,920 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 12:52:48 |
| 合計ジャッジ時間 | 1,527 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:28: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | int a[3],b[3];scanf("%d.%d.%d%d.%d.%d",&a[0],&a[1],&a[2],&b[0],&b[1],&b[2]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
//namaega184
int main(){
int a[3],b[3];scanf("%d.%d.%d%d.%d.%d",&a[0],&a[1],&a[2],&b[0],&b[1],&b[2]);
bool f=1;
for(int i=0;i<3;i++){
if(a[i]<b[i]){
printf("NO\n");
return 0;
}
else if(a[i]>b[i]){
printf("YES\n");
return 0;
}
}
printf("YES\n");
return 0;
}
184