Submission #710397

# Submission time Handle Problem Language Result Execution time Memory
710397 2023-03-15T08:07:50 Z Darren0724 Minerals (JOI19_minerals) C++17
6 / 100
72 ms 848 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(100);
    for(int t=0;t<100;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<100;j++){
            if(rec[j][i]){
                tmp|=rec[j];
            }
        }
        for(int j=i+1;j<=N*2;j++){
            if(tmp[j]==0){
                Answer(i,j);
            }
        }
    }

}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 592 KB Output is correct
2 Correct 1 ms 592 KB Output is correct
3 Correct 4 ms 592 KB Output is correct
4 Correct 4 ms 592 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 35 ms 720 KB Output is correct
2 Correct 72 ms 720 KB Output is correct
3 Incorrect 20 ms 848 KB Wrong Answer [2]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 592 KB Output is correct
2 Correct 1 ms 592 KB Output is correct
3 Correct 4 ms 592 KB Output is correct
4 Correct 4 ms 592 KB Output is correct
5 Correct 35 ms 720 KB Output is correct
6 Correct 72 ms 720 KB Output is correct
7 Incorrect 20 ms 848 KB Wrong Answer [2]
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 592 KB Output is correct
2 Correct 1 ms 592 KB Output is correct
3 Correct 4 ms 592 KB Output is correct
4 Correct 4 ms 592 KB Output is correct
5 Correct 35 ms 720 KB Output is correct
6 Correct 72 ms 720 KB Output is correct
7 Incorrect 20 ms 848 KB Wrong Answer [2]
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 592 KB Output is correct
2 Correct 1 ms 592 KB Output is correct
3 Correct 4 ms 592 KB Output is correct
4 Correct 4 ms 592 KB Output is correct
5 Correct 35 ms 720 KB Output is correct
6 Correct 72 ms 720 KB Output is correct
7 Incorrect 20 ms 848 KB Wrong Answer [2]
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 592 KB Output is correct
2 Correct 1 ms 592 KB Output is correct
3 Correct 4 ms 592 KB Output is correct
4 Correct 4 ms 592 KB Output is correct
5 Correct 35 ms 720 KB Output is correct
6 Correct 72 ms 720 KB Output is correct
7 Incorrect 20 ms 848 KB Wrong Answer [2]
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 592 KB Output is correct
2 Correct 1 ms 592 KB Output is correct
3 Correct 4 ms 592 KB Output is correct
4 Correct 4 ms 592 KB Output is correct
5 Correct 35 ms 720 KB Output is correct
6 Correct 72 ms 720 KB Output is correct
7 Incorrect 20 ms 848 KB Wrong Answer [2]
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 592 KB Output is correct
2 Correct 1 ms 592 KB Output is correct
3 Correct 4 ms 592 KB Output is correct
4 Correct 4 ms 592 KB Output is correct
5 Correct 35 ms 720 KB Output is correct
6 Correct 72 ms 720 KB Output is correct
7 Incorrect 20 ms 848 KB Wrong Answer [2]
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 592 KB Output is correct
2 Correct 1 ms 592 KB Output is correct
3 Correct 4 ms 592 KB Output is correct
4 Correct 4 ms 592 KB Output is correct
5 Correct 35 ms 720 KB Output is correct
6 Correct 72 ms 720 KB Output is correct
7 Incorrect 20 ms 848 KB Wrong Answer [2]
8 Halted 0 ms 0 KB -