Submission #300807

# Submission time Handle Problem Language Result Execution time Memory
300807 2020-09-17T13:52:26 Z IgorI Comparing Plants (IOI20_plants) C++17
0 / 100
1 ms 256 KB
#include <bits/stdc++.h>

using namespace std;

int n, k;
vector<int> r;

void init(int _k, vector<int> _r)
{
    n = _r.size();
    r = _r;
    k = _k;
}

int compare_plants(int x, int y)
{
    if ((x + 1) % n == y)
    {
        if (r[x]) return 1;
        else return -1;
    }
    if ((y + 1) % n == x)
    {
        if (r[y]) return -1;
        else return 1;
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -