답안 #300810

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
300810 2020-09-17T13:54:56 Z IgorI 식물 비교 (IOI20_plants) C++17
0 / 100
1 ms 288 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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 288 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 1 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB Output isn't correct
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Incorrect 1 ms 256 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Incorrect 1 ms 256 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Incorrect 0 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 252 KB Output is correct
3 Incorrect 1 ms 256 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 256 KB Output is correct
2 Correct 0 ms 256 KB Output is correct
3 Incorrect 0 ms 256 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 288 KB Output is correct
3 Correct 0 ms 256 KB Output is correct
4 Correct 1 ms 256 KB Output is correct
5 Incorrect 0 ms 256 KB Output isn't correct
6 Halted 0 ms 0 KB -