結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
mine691
|
| 提出日時 | 2019-01-01 21:12:26 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 5,000 ms |
| コード長 | 298 bytes |
| コンパイル時間 | 504 ms |
| コンパイル使用メモリ | 63,360 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 02:19:23 |
| 合計ジャッジ時間 | 1,986 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
7 | main(){
| ^~~~
ソースコード
#include<iostream>
using namespace std;
int n;
int c[10];
main(){
cin >> n;
for(int i = 0; i < n; ++i){
int a;
cin >> a;
c[a]++;
}
int ans = 0, p = 0;
for(int i = 0; i < 7; ++i){
if(c[i] >= p)ans = i, p = c[i];
}
cout << ans << endl;
}
mine691