Submission #677971

#TimeUsernameProblemLanguageResultExecution timeMemory
677971NK_Art Collections (BOI22_art)C++17
0 / 100
0 ms208 KiB
#include <bits/stdc++.h> #include "art.h" using namespace std; void solve(int N) { vector<int> A(N); iota(begin(A), end(A), 1); vector<int> R; for(int i = 0; i < N; i++) { rotate(begin(A), begin(A) + 1, end(A)); R.push_back(publish(A)); } vector<pair<int, int>> P; for(int i = 0; i < N; i++) { int dif = R[i] - R[(i+1) % N]; P.push_back(make_pair(dif, i)); } sort(begin(P), end(P)); vector<int> ans; for(auto p : P) ans.push_back(p.second); answer(ans); }

Compilation message (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...