Submission #937467

# Submission time Handle Problem Language Result Execution time Memory
937467 2024-03-04T06:19:31 Z Darren0724 Chameleon's Love (JOI20_chameleon) C++17
4 / 100
17 ms 488 KB
#include "chameleon.h"
#include <bits/stdc++.h>
using namespace std;

void Solve(int n) {
	vector<int> v;
	for(int i=1;i<=n*2;i++){
		v.push_back(i);
	}
	while(v.size()){
		int sz=v.size();
		int l=0,r=sz;
		while(r-l>1){
			int m=(l+r)>>1;
			int a=Query(vector(v.begin(),v.begin()+m));
			int b=Query(vector(v.begin()+1,v.begin()+m));
			if(a-b==0){
				r=m;
			}
			else{
				l=m;
			}
		}
		int a=v[0],b=v[l];
		v.erase(v.begin()+l);
		v.erase(v.begin());
		Answer(a,b);
	}
	
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 16 ms 344 KB Output is correct
4 Correct 17 ms 344 KB Output is correct
5 Correct 17 ms 472 KB Output is correct
6 Correct 16 ms 344 KB Output is correct
7 Correct 16 ms 484 KB Output is correct
8 Correct 17 ms 488 KB Output is correct
9 Correct 17 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 16 ms 344 KB Output is correct
4 Correct 17 ms 344 KB Output is correct
5 Correct 17 ms 472 KB Output is correct
6 Correct 16 ms 344 KB Output is correct
7 Correct 16 ms 484 KB Output is correct
8 Correct 17 ms 488 KB Output is correct
9 Correct 17 ms 344 KB Output is correct
10 Correct 0 ms 344 KB Output is correct
11 Incorrect 0 ms 344 KB Wrong Answer [6]
12 Halted 0 ms 0 KB -