Submission #1230726

#TimeUsernameProblemLanguageResultExecution timeMemory
1230726tamzidSphinx's Riddle (IOI24_sphinx)C++20
0 / 100
0 ms400 KiB
#include "sphinx.h"
#include <vector>

std::vector<int> find_colours(int N, std::vector<int> X, std::vector<int> Y) {
    std::vector<int> E(N, -1);
    int components = perform_experiment(E);
    if(components == 0)
    {
        E[0] = 1;
        int components1 = perform_experiment(E);
        if(components1 != 0)
        {
            E[1] = 1;
            E[0] = -1;
            components1 = perform_experiment(E);
            if(components1 == 1)
            {
                E[0] = 1;
            }
            else
            {
                E[0] = 0;
            }
        }
        else
        {
            E[0] = 1;
            int components1 = perform_experiment(E);
            if(components1 == 1)
            {
                E[1] = 1;
            }
            else
            {
                E[0] = 0;
                E[1] = 0; 
            }
        }
    }
    return E;
}
#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...