답안 #710395

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
710395 2023-03-15T08:07:10 Z Darren0724 Minerals (JOI19_minerals) C++17
0 / 100
3 ms 464 KB
#include "minerals.h"
#include<bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
void Solve(int N) {
    vector<int> v(N*2+1,-1);
    vector<bitset<30001>> rec(33);
    for(int t=0;t<33;t++){
        vector<int> idx(N*2);
        iota(idx.begin(),idx.end(),1);
        shuffle(idx.begin(),idx.end(),rnd);
        int a=0;
        for(int j=0;j<N*2;j++){
            int i=idx[j];
            int b=Query(i);
            if(b==a){
                Query(i);
            }
            else{
                a=b;
                rec[t][i]=1;
            }
        }
        for(int j=0;j<N*2;j++){
            int i=idx[j];
            if(rec[t][i]==1){
                Query(i);
            }
        }
    }
    for(int i=1;i<=N*2;i++){
        bitset<30001> tmp;
        for(int j=0;j<33;j++){
            if(rec[j][i]){
                tmp|=rec[j];
            }
        }
        for(int j=i+1;j<=N*2;j++){
            if(tmp[j]==0){
                Answer(i,j);
            }
        }
    }

}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB Wrong Answer [5]
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 464 KB Wrong Answer [5]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB Wrong Answer [5]
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB Wrong Answer [5]
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB Wrong Answer [5]
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB Wrong Answer [5]
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB Wrong Answer [5]
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB Wrong Answer [5]
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Incorrect 1 ms 336 KB Wrong Answer [5]
4 Halted 0 ms 0 KB -