結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-01-29 23:24:49 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 318 bytes |
| コンパイル時間 | 336 ms |
| コンパイル使用メモリ | 34,164 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-23 04:06:18 |
| 合計ジャッジ時間 | 1,402 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 14 |
コンパイルメッセージ
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]);
for(int i=0;i<3;i++){
if(a[i]<b[i]){
printf("NO\n");
return 0;
}
}
printf("YES\n");
return 0;
}
184