Submission #250156

# Submission time Handle Problem Language Result Execution time Memory
250156 2020-07-17T05:17:41 Z jamielim Minerals (JOI19_minerals) C++14
6 / 100
7 ms 384 KB
#include "minerals.h"
#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define SZ(x) (int)x.size()

void Solve(int N) {
	int done[2*N+1];memset(done,0,sizeof(done));
	for(int i=1;i<=2*N;i++){
		if(done[i])continue;
		int p=Query(i);
		for(int j=1;j<=2*N;j++){
			if(i==j||done[j])continue;
			int cur=Query(j);
			if(cur==p){
				done[i]=1;done[j]=1;
				Answer(i,j);
				Query(j);
				break;
			}
			Query(j);
		}
	}
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 384 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Incorrect 7 ms 384 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Incorrect 7 ms 384 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Incorrect 7 ms 384 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Incorrect 7 ms 384 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Incorrect 7 ms 384 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Incorrect 7 ms 384 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Incorrect 7 ms 384 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -