結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2015-08-05 12:52:46 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 5,000 ms |
| コード長 | 163 bytes |
| コンパイル時間 | 115 ms |
| コンパイル使用メモリ | 22,784 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 07:38:18 |
| 合計ジャッジ時間 | 993 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:4:6: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
main.cpp:5:17: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | while(n--){scanf("%d",&i);l[i]++;}
| ~~~~~^~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int l[7]={},n,i;
scanf("%d",&n);
while(n--){scanf("%d",&i);l[i]++;}
i=0;n=7;
while(n--)l[n]>l[i]&&(i=n);
printf("%d",i);
return 0;
}
testestest