| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 12890 | gs14004 | Languages (IOI10_languages) | C++98 | 1513 ms | 31596 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <map>
#include <algorithm>
#include <vector>
#include "lang.h"
#include "grader.h"
using namespace std;
struct WD{
long long t1, t2;
void init(){
t1 = t2 = 0;
}
void addwd(int p, int pos){
if(pos == 0) t1 = p;
else t2 |= (1ll << (16 * (4 - pos))) * p;
}
};
bool operator<(WD a, WD b){
return a.t1 != b.t1 ? (a.t1 > b.t1) : (a.t2 > b.t2);
}
map<WD,int> mp;
vector<WD> v,u;
const int l = 5;
void excerpt(int *E){
int cnt[105] = {};
v.clear();
for (int i=2; i<96; i++) {
WD px;
px.init();
for (int j=0; j<l; j++) {
px.addwd(E[i+j],j);
}
map<WD,int> ::iterator it = mp.lower_bound(px);
if(it != mp.end()) cnt[(*it).second]++;
v.push_back(px);
}
int mv = (int)(max_element(cnt,cnt+56) - cnt);
int t = language(mv);
for (int i=0; i<v.size(); i++) {
mp[v[i]] = t;
}
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
