제출 #1038148

#제출 시각아이디문제언어결과실행 시간메모리
1038148serifefedartarArt Collections (BOI22_art)C++17
35 / 100
142 ms432 KiB
#include <bits/stdc++.h> #include "art.h" using namespace std; #define fast ios::sync_with_stdio(0);cin.tie(0); typedef long long ll; #define f first #define s second #define LOGN 20 const ll MOD = 1e9 + 7; const ll MAXN = 1e6 + 100; void solve(int N) { vector<int> X; for (int i = 1; i <= N; i++) X.push_back(i); int base = publish(X); sort(X.begin(), X.end(), [&](int A, int B) { vector<int> Y; for (int i = 1; i <= N; i++) Y.push_back(i); Y[A-1] = B; Y[B-1] = A; int q = publish(Y); if (A < B) return q > base; else return q < base; }); answer(X); }

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