結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
mosmos_21
|
| 提出日時 | 2016-10-05 23:53:44 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 263 bytes |
| コンパイル時間 | 204 ms |
| コンパイル使用メモリ | 21,376 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-21 17:33:05 |
| 合計ジャッジ時間 | 2,945 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 7 WA * 3 RE * 12 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
main.c:5:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | for(;i<n;i++) scanf("%d", &h[i]);
| ^~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(){
int n, h[10000],l[6]={0},ml=1,m,i=0;
scanf("%d",&n);
for(;i<n;i++) scanf("%d", &h[i]);
for(;i;i--)l[h[i-1]-1]++;
m=h[0];
for(;i<6;i++)
if(l[i]>=m){
m=l[i];
ml=i+1;
}
printf("%d\n",ml);
return 0;
}
mosmos_21