Submission #268974

# Submission time Handle Problem Language Result Execution time Memory
268974 2020-08-17T04:31:45 Z 반딧불(#5114) Chameleon's Love (JOI20_chameleon) C++17
0 / 100
1 ms 384 KB
#include <bits/stdc++.h>
#include "chameleon.h"

using namespace std;

int n;
bool chk[1002];

vector<int> range(int l, int r){
    vector<int> ret;
    for(int i=l; i<=r; i++) ret.push_back(i);
    return ret;
}

void Solve(int N){
    n = N;
    for(int i=1; i<=2*n; i++){
        if(chk[i]) continue;
        int l = i+1, r = 2*n, ans = 2*n;
        while(l<=r){
            int m = (l+r)>>1;
            int q1 = Query(range(i, m)), q2 = Query(range(i+1, m));
            printf("%d %d - %d %d\n", i, m, q1, q2);
            if(q1==q2) ans = m, r = m-1;
            else l = m+1;
        }
        Answer(i, ans);
        chk[ans] = 1;
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Line [name=secret] equals to "1 3 - 2 1", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 384 KB Line [name=secret] equals to "1 3 - 2 1", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 384 KB Line [name=secret] equals to "1 3 - 2 1", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Line [name=secret] equals to "1 3 - 2 1", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Line [name=secret] equals to "1 3 - 2 1", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -