제출 #1335778

#제출 시각아이디문제언어결과실행 시간메모리
1335778monaxiaLanguages (IOI10_languages)C++20
0 / 100
10091 ms344 KiB
#include <bits/stdc++.h>

// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define pb push_back
#define ppb pop_back
#define fr first
#define sc second
#define all(v) v.begin(), v.end()
#define vektor vector

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;

constexpr ull Mod = 1e9 + 7;
constexpr ull sqr = 708;
constexpr ld EPS = 1e-12L;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll random(ll l, ll r) {if (l > r) return -1; return uniform_int_distribution<ll>(l, r)(rng);}

#include "grader.h"

int a[101][101], mark[100];

// int language(int L){return random(0, 55);}

void excerpt(int e[100]){
    sort(e, e + 100);
    
    for(int i = 0; i < 56; ++ i){
        int cnt = 0;
        for(int j = 0; j < 100; ++ j){
            if(a[i][j] == e[j]) ++ cnt;
        }
        
        if(cnt == 100){
            language(i);
            return;
        }
    }
    
    int num = 0;
    mark[0] = 1;
    
    while(mark[num]) num = random(0, 55);
    
    int ans = language(num);
    
    mark[ans] = 1;
    
    for(int j = 0; j < 100; ++ j) a[ans][j] = e[j];
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...