답안 #781074

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
781074 2023-07-12T17:12:44 Z aZvezda Super Dango Maker (JOI22_dango3) C++17
7 / 100
153 ms 596 KB
#include "dango3.h"

#include <bits/stdc++.h>
using namespace std;

namespace {

int variable_example = 1;

}  // namespace

const int MAX_N = 401;
vector<int> group[MAX_N];

void Solve(int n, int m) {
	vector<int> lft = {};
	for(int i = 1; i <= n * m; i ++) { lft.push_back(i); }
	for(int i = 0; i < m; i ++) {
		vector<int> group = {};
		for(int j = 0; j < n; j ++) {
			int l = 0, r = lft.size();
			while(l < r - 1) {
				int m = (l + r) / 2ll;
				auto now = group;
				for(int k = 0; k < m; k ++) {
					now.push_back(lft[k]);
				}
				if(Query(now) >= 1) {
					r = m;
				} else {
					l = m;
				}
			}
			group.push_back(lft[l]);
			swap(lft[lft.size() - 1], lft[l]);
			lft.pop_back();
		}
		Answer(group);
	}
}

Compilation message

dango3.cpp:8:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    8 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 1 ms 352 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 340 KB Output is correct
2 Correct 5 ms 340 KB Output is correct
3 Correct 9 ms 340 KB Output is correct
4 Correct 9 ms 340 KB Output is correct
5 Correct 5 ms 340 KB Output is correct
6 Correct 5 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 70 ms 468 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 153 ms 596 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -