답안 #412807

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
412807 2021-05-27T15:30:02 Z b00n0rp Languages (IOI10_languages) C++17
0 / 100
232 ms 9056 KB
#include <bits/stdc++.h>
using namespace std;

#include "grader.h"
#include "lang.h"

typedef long double LD;
typedef long long ll;
#define int ll
#define pb push_back
#define mp make_pair
#define REP(i,n) for (int i = 0; i < n; i++)
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define REPD(i,n) for (int i = n-1; i >= 0; i--)
#define FORD(i,a,b) for (int i = a; i >= b; i--)
#define remax(a,b) a = max(a,b)
#define remin(a,b) a = min(a,b)
#define all(v) v.begin(),v.end()
typedef map<int,int> mii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii> vpii;
#define F first
#define S second
#define PQ(type) priority_queue<type>
#define PQD(type) priority_queue<type,vector<type>,greater<type> >
#define WL(t) while(t --)
#define SZ(x) ((int)(x).size())
#define runtime() ((double)clock() / CLOCKS_PER_SEC)
#define inrange(i,a,b) ((i>=min(a,b)) && (i<=max(a,b)))

int cnt[57][65537];
int tot[57];

void excerpt(signed *E){
	int l = 0;
	pii f = {0,1};
	REP(i,56){
		int num = 0;
		int den = tot[i];
		REP(j,100){
			num += j*cnt[i][E[j]];
		}
		if(f.F*den < num*f.S){
			f = {num,den};
			l = i;
		}
	}
	int lang = language(l);
	tot[lang] += 100;
	REP(i,100) cnt[lang][E[i]]+=i;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 232 ms 8980 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 232 ms 9056 KB Output isn't correct - 29.65%