답안 #843914

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
843914 2023-09-04T16:53:55 Z 42kangaroo Art Collections (BOI22_art) C++17
0 / 100
0 ms 344 KB
//
// Created by 42kangaroo on 04/09/2023.
//
#include "bits/stdc++.h"
#include "art.h"

using namespace std;

void solve(int n) {
	deque<int> o(n);
	std::iota(o.begin(), o.end(),1);
	vector<int> re(n);
	for (int i = 0; i < n; ++i) {
		re[i] = publish(vector<int>(o.begin(), o.end()));
		o.push_back(o.front());
		o.pop_front();
	}
	vector<int> res(n);
	std::iota(res.begin(), res.end(),1);
	std::sort(res.begin(), res.end(), [&](int l, int r) {return re[l - 1] < re[r - 1];});
	answer(res);
}

Compilation message

interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   36 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -