답안 #1029726

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1029726 2024-07-21T08:36:18 Z vjudge1 Languages (IOI10_languages) C++17
0 / 100
4735 ms 262144 KB
#include"lang.h"
#include"grader.h"
#include<bits/stdc++.h>
#define cir(i,a,b) for(int i=a;i<b;++i)
using namespace std;

using ulint=unsigned long long;

map<vector<int>,unordered_set<int>> crsap;

void excerpt(int*a){
    const auto len=100;
    unordered_map<int,int> prob;
    cir(i,0,len-1){
        for(auto&x:crsap[{a[i],a[i+1]}]) ++prob[x];
    }
    cir(i,0,len-2){
        for(auto&x:crsap[{a[i],a[i+1],a[i+2]}]) prob[x]+=2;
    }
    cir(i,0,len-3){
        for(auto&x:crsap[{a[i],a[i+1],a[i+2],a[i+3]}]) prob[x]+=4;
    }
    cir(i,0,len-4){
        for(auto&x:crsap[{a[i],a[i+1],a[i+2],a[i+3],a[i+4]}]) prob[x]+=8;
    }
    pair<int,int> hx={-1,-1};
    for(auto&[ax,bx]:prob) hx=max(hx,{bx,-ax});
    const auto ql=language(-hx.second);
    cir(i,0,len-1){
        crsap[{a[i],a[i+1]}].insert(ql);
    }
    cir(i,0,len-2){
        crsap[{a[i],a[i+1],a[i+2]}].insert(ql);
    }
    cir(i,0,len-3){
        crsap[{a[i],a[i+1],a[i+2],a[i+3]}].insert(ql);
    }
    cir(i,0,len-4){
        crsap[{a[i],a[i+1],a[i+2],a[i+3],a[i+4]}].insert(ql);
    }
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 4735 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 3816 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -