제출 #864131

#제출 시각아이디문제언어결과실행 시간메모리
864131vnm06Art Collections (BOI22_art)C++17
100 / 100
1373 ms1988 KiB
#include<bits/stdc++.h> #include "art.h" using namespace std; int ans[4005]; vector<int> res; void solve(int N) { res.resize(N); vector<int> order; order.resize(N); for(int i=1; i<=N; i++) { for(int j=i;;) { order[(j-i+N)%N]=j; j++; if(j>N) j=1; if(j==i) break; } ans[i]=publish(order); } for(int i=1; i<=N; i++) { int be=ans[i], en=ans[i+1]; if(i==N) en=ans[1]; ///cout<<be<<" "<<en<<endl; if(N&1) res[N/2-(en-be)/2]=i; else res[(N-1)/2-(en-be+1)/2+1]=i; } answer(res); }

컴파일 시 표준 에러 (stderr) 메시지

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) {
      |        ~~~~~~~~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...