Submission #865105

#TimeUsernameProblemLanguageResultExecution timeMemory
8651058pete8Art Collections (BOI22_art)C++17
Compilation error
0 ms0 KiB
#include<iostream> #include<stack> #include<map> #include<vector> #include<string> #include<unordered_map> #include <queue> #include<cstring> #include<limits.h> #include<cmath> #include<set> #include<algorithm> #include<bitset> #include "art.h" using namespace std; #define ll long long #define f first #define endl "\n" #define s second #define pii pair<int,int> #define ppii pair<pii,pii> #define vi vector<int> #define pb push_back //#define p push #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define F(n) for(int i=0;i<n;i++) #define lb lower_bound #define ub upper_bound #define fastio ios::sync_with_stdio(false);cin.tie(NULL); using namespace std; #define int long long const int mxn=1e5; void solve(int N){ vector<int>a; vector<int>ans(N); for(int i=1;i<=N;i++){ vector<int>v; int j=i; for(;j<=N;j++)v.pb(j); for(j=1;j<i;j++)v.pb(j); a.pb(publish(v)); if(i>1){ int pos=((a[a.size()-2]-a[a.size()-1])-1+N)/2; ans[pos]=i-1; } } int pos=((a[a.size()-1]-a[0])-1+N)/2; ans[pos]=N; answer(ans); }

Compilation message (stderr)

art.cpp: In function 'void solve(long long int)':
art.cpp:42:22: error: could not convert 'v' from 'vector<long long int>' to 'vector<int>'
   42 |         a.pb(publish(v));
      |                      ^
      |                      |
      |                      vector<long long int>
art.cpp:50:12: error: could not convert 'ans' from 'vector<long long int>' to 'vector<int>'
   50 |     answer(ans);
      |            ^~~
      |            |
      |            vector<long long int>
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) {
      |        ~~~~~~~~~^~~~