답안 #799814

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
799814 2023-08-01T05:02:13 Z 반딧불(#10081) 카멜레온의 사랑 (JOI20_chameleon) C++17
4 / 100
13 ms 336 KB
#include "chameleon.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int n;
int prf[1002];

void Solve(int N){
    n = N;
    vector<int> prfVec, L, R;
    for(int i=1; i<=n+n; i++){
        prfVec.push_back(i);
        prf[i] = Query(prfVec);
        if(prf[i-1] != prf[i]) L.push_back(i);
        else R.push_back(i);
    }
    for(int idx: L){
        int S = 0, E = n-1, A = n-1;
        while(S<=E){
            int M = (S+E)/2;
            vector<int> vec (1, idx);
            for(int i=0; i<=M; i++) vec.push_back(R[i]);
            if(Query(vec) < (int)vec.size()) A = M, E = M-1;
            else S = M+1;
        }
        Answer(idx, R[A]);
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 13 ms 208 KB Output is correct
4 Correct 12 ms 328 KB Output is correct
5 Correct 12 ms 328 KB Output is correct
6 Correct 13 ms 320 KB Output is correct
7 Correct 13 ms 324 KB Output is correct
8 Correct 13 ms 336 KB Output is correct
9 Correct 13 ms 328 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Wrong Answer [1]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 13 ms 208 KB Output is correct
4 Correct 12 ms 328 KB Output is correct
5 Correct 12 ms 328 KB Output is correct
6 Correct 13 ms 320 KB Output is correct
7 Correct 13 ms 324 KB Output is correct
8 Correct 13 ms 336 KB Output is correct
9 Correct 13 ms 328 KB Output is correct
10 Correct 0 ms 208 KB Output is correct
11 Incorrect 0 ms 208 KB Wrong Answer [6]
12 Halted 0 ms 0 KB -