Submission #703626

#TimeUsernameProblemLanguageResultExecution timeMemory
703626KiprasArt Collections (BOI22_art)C++17
0 / 100
1 ms208 KiB
#include <bits/stdc++.h> #include "art.h" typedef long long ll; using namespace std; void solve(int n){ vector<ll> actual; vector<ll> offsets; //get all the offsets for(int i = 0; i < n; i++){ vector<int> temp; for(int x = 0; x < n; x++){ temp.push_back((i+x)%n); } offsets.push_back(publish(temp)); } for(int i = 0; i < n; i++){ ll y = (offsets[i]+offsets[(i+1)%n]-2*n+2)/2; ll number = n-(offsets[i]-y); actual.push_back(number); } reverse(actual.begin(), actual.end()); vector<int> result; for(auto i : actual){ result.push_back(i); } answer(result); }

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...