結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-06-27 16:21:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 320 bytes |
| コンパイル時間 | 94 ms |
| コンパイル使用メモリ | 22,528 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-04 11:36:01 |
| 合計ジャッジ時間 | 947 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 19 WA * 14 |
コンパイルメッセージ
main.cpp:2:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
2 | main(){
| ^~~~
main.cpp: In function ‘int main()’:
main.cpp:4:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%d %d %d",&A[0],&A[1],&A[2]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d %d %d",&B[0],&B[1],&B[2]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
main(){
int A[3],B[3];
scanf("%d %d %d",&A[0],&A[1],&A[2]);
scanf("%d %d %d",&B[0],&B[1],&B[2]);
for(int i = 0;i < 3;i++){
if(A[i] > B[i]){
printf("YES\n");
return 0;
}else if(A[i] < B[i]){
break;
}
}
printf("NO\n");
}
Bantako