제출 #646005

#제출 시각아이디문제언어결과실행 시간메모리
646005GaLzArt Collections (BOI22_art)C++17
0 / 100
0 ms208 KiB
#include <bits/stdc++.h> #include "art.h" using namespace std; typedef long long ll; typedef pair<ll, ll> pll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<ll> vll; const ll mod=1e9+7; const ll maxn=2e5+5; const int INF=1e8; #define ok ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define fi first #define se second #define pb push_back #define ub upper_bound #define lb lower_bound #define endl '\n' int ls, cur; void solve(int n) { vi arr(n), ans(n); for(int i=0; i<n; i++) arr[i]=i+1; int ls=publish(arr); for(int i=n; i>1; i--) { for(int j=0; j<n; j++) { arr[i]+=n-2; arr[i]%=n; arr[i]++; } int cur=publish(arr); ans[(cur-ls+n+1)/2-1]=i; ls=cur; } for(int i=0; i<n; i++) { if(!ans[i]) ans[i]=1; } answer(ans); }

컴파일 시 표준 에러 (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...