Submission #269289

# Submission time Handle Problem Language Result Execution time Memory
269289 2020-08-17T06:15:20 Z 최은수(#5097) Chameleon's Love (JOI20_chameleon) C++17
0 / 100
1 ms 384 KB
#include"chameleon.h"
#include<iostream>
#include<vector>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18;

void Solve(int N)
{
    int n=N;
    vector<int>pr(n*2+1,0);
    for(int i=n*2;i>0;i--)
    {
        int s=i+1,e=n*2+1;
        while(s<e)
        {
            int m=s+(e-s)/2;
            {
                vector<int>qv;
                qv.eb(i);
                for(int j=s;j<=m;j++)
                    qv.eb(j);
                int exp=m-s+1;
                for(int j=s;j<=m;j++)
                    if(pr[j]!=0&&pr[j]<=m)
                        exp--;
                if(Query(qv)==exp)
                    e=m;
                else
                    s=m+1;
            }
        }
        cout<<i<<' '<<s<<endl;
        if(s!=n*2+1)
            pr[i]=s,Answer(i,s);
    }
    return;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Line [name=secret] equals to "4 5", 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 "4 5", 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 "4 5", 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 "4 5", 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 "4 5", doesn't correspond to pattern "[A-Za-z0-9]{1,100}"
2 Halted 0 ms 0 KB -