답안 #636391

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
636391 2022-08-29T05:27:08 Z Darren0724 Art Collections (BOI22_art) C++17
0 / 100
0 ms 208 KB
#include<bits/stdc++.h>
using namespace std;
int publish(vector<int>);
void answer(vector<int>);
void solve(int n){
  vector<int> rec(n+2);
  for(int i=1;i<=n;i++){
    vector<int> v;
    for(int j=i;j<=n;j++){
      v.push_back(j);
    }
    for(int j=1;j<i;j++){
      v.push_back(j);
    }
    rec[i]=publish(v);
  }
  vector<int> ans(n);
  for(int i=1;i<=n;i++){
    int k=rec[i+1]-rec[i];
    k=2*(n-1)-k;
    k/=2;
    k--;
    ans[k]=i;
  }
  answer(ans);
}

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 208 KB Output is correct
2 Incorrect 0 ms 208 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Not correct
3 Halted 0 ms 0 KB -