답안 #551735

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
551735 2022-04-21T12:01:55 Z kshitij_sodani Super Dango Maker (JOI22_dango3) C++17
100 / 100
4246 ms 912 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long llo;
#define a first
#define b second
#define pb push_back
#define endl '\n'

#include "dango3.h"


namespace {
int variable_example = 1;
}  

vector<int> pre[30];
int vis[100001];
int ind[100001];
void Solve(int n,int m){
	for(int i=1;i<=n*m;i++){
		int low=0;
		for(int j=19;j>=0;j--){
			if(low+(1<<j)<=m){
				vector<int> cur;
				
				for(int ii=1;ii<=n*m;ii++){
					if(ii==i){
						continue;
					}
					if(ii<i){
						if(ind[ii]==(low+(1<<j))){
							continue;
						}
					}
					cur.pb(ii);
				}
				if(Query(cur)==m-1){

				}
				else{
					low+=(1<<j);
				}
			}
		}
		pre[low+1].pb(i);
		//cout<<i<<":"<<low+1<<endl;
		ind[i]=low+1;
	}
	for(int j=1;j<=m;j++){
		Answer(pre[j]);
	}
}

Compilation message

dango3.cpp:13:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   13 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 312 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 34 ms 308 KB Output is correct
2 Correct 33 ms 372 KB Output is correct
3 Correct 33 ms 384 KB Output is correct
4 Correct 31 ms 380 KB Output is correct
5 Correct 33 ms 380 KB Output is correct
6 Correct 33 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1036 ms 592 KB Output is correct
2 Correct 1004 ms 496 KB Output is correct
3 Correct 997 ms 720 KB Output is correct
4 Correct 995 ms 540 KB Output is correct
5 Correct 979 ms 616 KB Output is correct
6 Correct 985 ms 596 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4082 ms 912 KB Output is correct
2 Correct 4246 ms 620 KB Output is correct
3 Correct 4140 ms 672 KB Output is correct
4 Correct 4193 ms 688 KB Output is correct
5 Correct 4094 ms 676 KB Output is correct
6 Correct 4040 ms 612 KB Output is correct