結果
| 問題 | No.21 平均の差 |
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-06-24 18:52:10 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 327 bytes |
| 記録 | |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 39,192 KB |
| 実行使用メモリ | 10,048 KB |
| 最終ジャッジ日時 | 2026-09-09 23:18:58 |
| 合計ジャッジ時間 | 1,100 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 |
コンパイルメッセージ
main.cpp:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
ソースコード
#include<stdio.h>
main(){
int N,K;
scanf("%d%d",&N,&K);
int min = 0x7fffffff;
int max = 0x80000000;
printf("%d\n%d",min,max);
for(int i = 0;i < N;i++){
int tmp;
scanf("%d",&tmp);
if(tmp > max){max = tmp;}
else if(tmp < min){min = tmp;}
}
printf("%d\n",max-min);
}
Bantako