結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-03-14 10:14:30 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 380 bytes |
| コンパイル時間 | 276 ms |
| コンパイル使用メモリ | 26,880 KB |
| 実行使用メモリ | 7,328 KB |
| 最終ジャッジ日時 | 2025-03-14 10:14:32 |
| 合計ジャッジ時間 | 1,518 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d.%d.%d%d.%d.%d", &a[0], &b[0], &c[0], &a[1], &b[1], &c[1]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main()
{
int a[2], b[2], c[2];
scanf("%d.%d.%d%d.%d.%d", &a[0], &b[0], &c[0], &a[1], &b[1], &c[1]);
if (a[0] > a[1]){
printf("YES\n");
}else if (a[0] < a[1]){
printf("NO\n");
}else if (b[0] > b[1]){
printf("YES\n");
}else if (b[0] < b[1]){
printf("NO\n");
}else if (c[0] > c[1]){
printf("YES\n");
}else{
printf("NO\n");
return 0;
}
}
sasa