답안 #168133

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
168133 2019-12-11T13:20:10 Z dimash241 도서관 (JOI18_library) C++17
0 / 100
58 ms 420 KB
#include<bits/stdc++.h>

#define pb push_back 
using namespace std;
                                         
int Query(const std::vector<int>& M);
void Answer(const std::vector<int>& res);

void Solve(int n) {
	vector <int> m(n);

	m[0] = 1;
	int mx = 0, p = 0;
	for(int i = 1; i < n; i ++) {
		m[i] = 1;
		int x;
		x = Query(m);
		if (x > mx) {
			mx = x;
			p = i;
		}
		m[i] = 0;
	}
	vector < pair < int, int > > res;
	m[0] = 0;

	for (int i = 0; i < n; i ++) {
		m[p] = 1;
		m[i] = 1;
		res.pb({Query(m), i});
		m[p] = 0;
		m[i] = 0;	
	} 

	sort(res.begin(), res.end());
	vector < int > ans;
	for (int i = 0; i < n; i ++)
		ans.pb(res[i].second);

	Answer(ans);
}


// B...a
# 결과 실행 시간 메모리 Grader output
1 Incorrect 9 ms 376 KB Wrong Answer [5]
2 Incorrect 9 ms 248 KB Wrong Answer [5]
3 Incorrect 6 ms 312 KB Wrong Answer [5]
4 Incorrect 10 ms 376 KB Wrong Answer [5]
5 Incorrect 10 ms 248 KB Wrong Answer [5]
6 Incorrect 6 ms 396 KB Wrong Answer [5]
7 Incorrect 9 ms 248 KB Wrong Answer [5]
8 Incorrect 9 ms 376 KB Wrong Answer [5]
9 Incorrect 6 ms 316 KB Wrong Answer [5]
10 Incorrect 7 ms 248 KB Wrong Answer [5]
11 Incorrect 2 ms 248 KB Wrong Answer [5]
12 Incorrect 2 ms 376 KB Wrong Answer [5]
13 Incorrect 2 ms 248 KB Wrong Answer [5]
14 Incorrect 2 ms 248 KB Wrong Answer [5]
15 Incorrect 2 ms 376 KB Wrong Answer [5]
16 Incorrect 3 ms 376 KB Wrong Answer [5]
# 결과 실행 시간 메모리 Grader output
1 Incorrect 9 ms 376 KB Wrong Answer [5]
2 Incorrect 9 ms 248 KB Wrong Answer [5]
3 Incorrect 6 ms 312 KB Wrong Answer [5]
4 Incorrect 10 ms 376 KB Wrong Answer [5]
5 Incorrect 10 ms 248 KB Wrong Answer [5]
6 Incorrect 6 ms 396 KB Wrong Answer [5]
7 Incorrect 9 ms 248 KB Wrong Answer [5]
8 Incorrect 9 ms 376 KB Wrong Answer [5]
9 Incorrect 6 ms 316 KB Wrong Answer [5]
10 Incorrect 7 ms 248 KB Wrong Answer [5]
11 Incorrect 2 ms 248 KB Wrong Answer [5]
12 Incorrect 2 ms 376 KB Wrong Answer [5]
13 Incorrect 2 ms 248 KB Wrong Answer [5]
14 Incorrect 2 ms 248 KB Wrong Answer [5]
15 Incorrect 2 ms 376 KB Wrong Answer [5]
16 Incorrect 3 ms 376 KB Wrong Answer [5]
17 Incorrect 58 ms 248 KB Wrong Answer [5]
18 Incorrect 43 ms 320 KB Wrong Answer [5]
19 Incorrect 54 ms 376 KB Wrong Answer [5]
20 Incorrect 49 ms 420 KB Wrong Answer [5]
21 Incorrect 34 ms 320 KB Wrong Answer [5]
22 Incorrect 55 ms 248 KB Wrong Answer [5]
23 Incorrect 40 ms 320 KB Wrong Answer [5]
24 Incorrect 22 ms 248 KB Wrong Answer [5]
25 Incorrect 39 ms 320 KB Wrong Answer [5]
26 Incorrect 49 ms 248 KB Wrong Answer [5]
27 Incorrect 17 ms 408 KB Wrong Answer [5]
28 Incorrect 55 ms 408 KB Wrong Answer [5]
29 Incorrect 48 ms 376 KB Wrong Answer [5]
30 Incorrect 46 ms 316 KB Wrong Answer [5]