結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー |
![]() |
提出日時 | 2015-12-25 04:01:57 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 17 ms / 5,000 ms |
コード長 | 323 bytes |
コンパイル時間 | 1,307 ms |
コンパイル使用メモリ | 159,084 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 07:46:09 |
合計ジャッジ時間 | 2,327 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> check(6); int x; for(int i = 0; i < n; i++){ cin >> x; check[x-1]++; } int ans = 1; x = check[0]; for(int i = 1; i < 6; i++){ if(x <= check[i]){ ans = i + 1; x = check[i]; } } cout << ans << endl; return 0; }