結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー |
![]() |
提出日時 | 2015-01-25 20:40:28 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 16 ms / 5,000 ms |
コード長 | 1,481 bytes |
コンパイル時間 | 747 ms |
コンパイル使用メモリ | 92,364 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 07:26:43 |
合計ジャッジ時間 | 1,665 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <algorithm> #include <bitset> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> #define FOR(x,a,b) for(int x=a;x<b;x++) #define FORO(x,b) for(int x=0;x<b;x++) #define REP(b) for(int x=0;x<b;x++) #define FORSIZE(x,A) for(int x=0;x<A.size();x++) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define SORT(x) sort(x.begin(),x.end()) #define RSORT(x) sort(x.rbegin(),x.rend()) #define rsort(x,n) sort(x, x+n, greater<int>()) #define REV(x) reverse(x.begin(),x.end()) using namespace std; typedef long long ll; inline int toInt(std::string s) {int v; std::istringstream sin(s);sin>>v;return v;} template<class T> inline std::string toString(T x) {std::ostringstream sout;sout<<x;return sout.str();} int main( int argc, const char* argv[] ) { int n; vector<int> l; int lev[7] = {}; int tmp; int m = 0; int m_l = 0; cin >> n; l.assign(n, 0); FORO(i, n) { cin >> tmp; lev[tmp] += 1; } FOR(i, 1, 7) { if (lev[i] >= m) { m = lev[i]; m_l = i; } } cout << m_l << endl; return 0; }