답안 #1029597

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1029597 2024-07-21T05:09:08 Z mansur Super Dango Maker (JOI22_dango3) C++17
22 / 100
503 ms 908 KB
#include "dango3.h"
#include<bits/stdc++.h>

using namespace std;

#define rall(s) s.rbegin() s.rend()
#define all(s) s.begin(), s.end()
#define sz(s) (int)s.size()
#define s second
#define f first

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

mt19937_64 rng(1733107);

void Solve(int n, int m) {
	vector<int> s;
	for (int i = 1; i <= n * m; i++) s.push_back(i);
	shuffle(all(s), rng);
	for (int i = 1; i < m; i++) {
		vector<int> ans = {s.back()};
		s.pop_back();
		while (sz(ans) < n) {
			int x = s.back();
			s.pop_back();
			if (Query(s) == m - i) ans.push_back(x);
			else {
				reverse(all(s));
				s.push_back(x);
				reverse(all(s));
			}
        }
        Answer(ans);
	}     
	Answer(s);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 348 KB Output is correct
2 Correct 4 ms 508 KB Output is correct
3 Correct 6 ms 348 KB Output is correct
4 Correct 4 ms 348 KB Output is correct
5 Correct 3 ms 508 KB Output is correct
6 Correct 3 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 130 ms 348 KB Output is correct
2 Correct 108 ms 344 KB Output is correct
3 Correct 129 ms 348 KB Output is correct
4 Correct 125 ms 564 KB Output is correct
5 Correct 111 ms 344 KB Output is correct
6 Correct 115 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 503 ms 908 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -