Submission #573539

#TimeUsernameProblemLanguageResultExecution timeMemory
573539NintsiChkhaidzeArt Collections (BOI22_art)C++17
70 / 100
1428 ms608 KiB
#include "art.h" #include <bits/stdc++.h> #define pb push_back using namespace std; void solve(int N) { vector <int> order; for (int i=1;i<=N;i++) order.pb(i); for (int i = 1; i <= N; i++){ vector <int> X,Y; X.clear(),Y.clear(); Y.pb(i); for (int j = 1; j < i; j++) X.pb(j),Y.pb(j); for (int j = i + 1; j <= N; j++) X.pb(j),Y.pb(j); X.pb(i); int x = publish(X),y = publish(Y); int id = (N + 1 - x + y)/2; order[id-1] = i; } answer(order); }

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