提出 #1038622
ソースコード 拡げる
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
//#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define PB push_back
#define MP make_pair
#define FST first
#define SND second
#define SZ(a) (signed)((a).size())
#define EACH(i, c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORT(c) sort((c).begin(), (c).end())
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
const int MOD = 1000000007;
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
signed main(void) {
ios::sync_with_stdio(false);
cout.setf(ios::fixed, ios::floatfield);
cout.precision(10);
cin.tie(0);
REP(i,200){
VVI a(50,VI(30));
REP(j,30){
REP(k,50){
cin >> a[k][j];
}
}
VI ans(50,0);
REP(k,50){
vector<PII> t;
REP(j,4){
t.PB(MP(0,j));
}
REP(j,30){
t[a[k][j]].first++;
}
SORT(t);
ans[k] = t.back().second;
}
vector<PII> una;
REP(j,30){
una.PB(MP(0,j));
}
REP(j,30){
REP(k,50){
if(a[k][j] == ans[j]){
una[k].first--;
}
}
}
SORT(una);
REP(k,50){
vector<PII> t;
REP(j,4){
t.PB(MP(0,j));
}
REP(j,10){
t[a[k][una[j].second]].first+=2;
}
REP(j,10){
t[a[k][una[j+10].second]].first+=1;
}
SORT(t);
cout << t.back().second << endl;
}
}
return 0;
}
提出情報
ジャッジ結果
| セット名 |
All |
| 得点 / 配点 |
0 / 100 |
| 結果 |
|
| セット名 |
テストケース |
| All |
1.txt, 10.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt |
| ケース名 |
結果 |
実行時間 |
メモリ |
| 1.txt |
RE |
111 ms |
256 KiB |
| 10.txt |
RE |
111 ms |
256 KiB |
| 2.txt |
RE |
112 ms |
256 KiB |
| 3.txt |
RE |
112 ms |
256 KiB |
| 4.txt |
RE |
111 ms |
256 KiB |
| 5.txt |
RE |
110 ms |
256 KiB |
| 6.txt |
RE |
111 ms |
256 KiB |
| 7.txt |
RE |
111 ms |
256 KiB |
| 8.txt |
RE |
111 ms |
256 KiB |
| 9.txt |
RE |
111 ms |
256 KiB |