답안 #589672

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
589672 2022-07-05T06:07:42 Z LastRonin Super Dango Maker (JOI22_dango3) C++17
7 / 100
4067 ms 668 KB
#include "dango3.h"
#include <bits/stdc++.h>
#include <vector>
#define pb push_back
using namespace std;

mt19937_64 bruh(chrono::steady_clock::now().time_since_epoch().count());

namespace {

int variable_example = 1;

}  // namespace

void Solve(int N, int M) {
  	vector<int> x;
  	for(int i = 0; i < N; i++) {
  		for(int j = 0; j < M; j++) {
  			x.pb(M * i + j + 1);
  		}
  	}
  	int kek = 0;
  	vector<int> y;
  	while(kek < M) {
	  	shuffle(x.begin(), x.end(), bruh);
	  	int za = Query(x);
	  	int f = x.size();
	  	vector<int> ans;
		if(kek <= 25) {
			ans.pb(x.back());
			x.pop_back();
			for(int j = f - 2; j >= 0; j--) {
				vector<int> z;
				for(auto u : y)z.pb(u);
				int mem = x.back();
				x.pop_back();
				for(auto u : x) z.pb(u);
				int answ = Query(z);				
				if(answ == za - 2) y.pb(mem);
				else ans.pb(mem);
			}
			x = y;
			y.clear();
		}
		else {

	  	}
		kek++;
	    Answer(ans);
  	}
}

Compilation message

dango3.cpp:11:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   11 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 304 KB Output is correct
3 Correct 1 ms 304 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 300 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 340 KB Output is correct
2 Correct 31 ms 308 KB Output is correct
3 Correct 33 ms 340 KB Output is correct
4 Correct 31 ms 416 KB Output is correct
5 Correct 32 ms 340 KB Output is correct
6 Correct 29 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1550 ms 512 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4067 ms 668 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -