Submission #1257580

#TimeUsernameProblemLanguageResultExecution timeMemory
1257580nerrrminSphinx's Riddle (IOI24_sphinx)C++20
18 / 100
4 ms412 KiB
#include "sphinx.h"
#include<bits/stdc++.h>
#define pb push_back
using namespace std;
const int maxn = 255;
int n;

int same[maxn];
std::vector<int> find_colours(int N, std::vector<int> X, std::vector<int> Y)
{
    n = N;


    std::vector<int> e(N, -1);

    for (int i = 0; i < n-1; ++ i)
    {
        vector < int > g;
        int pre = 0, post = 0;
        for (int j = 0; j < i; ++ j)
        {
            g.pb(n);
            pre = 1;
        }
        g.pb(-1);
        g.pb(-1);
        for (int j = i+2; j < n; ++ j)
        {
            g.pb(n);
            post = 1;
        }
        int fb = perform_experiment(g);
        if(fb == pre + post + 1)same[i+1] = 1;
        else same[i+1] = 0;
    }

    vector< int > res;
    res.pb(0);
    int curr = 0;
    for (int i = 1; i < n; ++ i)
    {
        if(same[i])res.pb(curr);
        else
        {
            curr ++;
            res.pb(curr);
        }
    }

    return res;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...