Submission #588309

#TimeUsernameProblemLanguageResultExecution timeMemory
5883091zaid1Art Collections (BOI22_art)C++17
70 / 100
1606 ms620 KiB
#include "art.h" #include <bits/stdc++.h> using namespace std; const int M = 1e4+4; void solve(int n) { vector<pair<int, int>> ans; for (int i = 1; i <= n; i++) { vector<int> a; for (int j = 1; j <= n; j++) if (j != i) a.push_back(j); a.push_back(i); int x = publish(a); vector<int> b = {i}; for (int j = 1; j <= n; j++) if (j != i) b.push_back(j); int y = publish(b); ans.push_back({x-y, i}); } sort(ans.rbegin(), ans.rend()); vector<int> v; for (auto [a, b]:ans) v.push_back(b); answer(v); }

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