Submission #1120129

#TimeUsernameProblemLanguageResultExecution timeMemory
1120129vjudge1Art Collections (BOI22_art)C++17
Compilation error
0 ms0 KiB
#include "art.h" #include<bits/stdc++.h> #define pb push_back #define pf push_front #define mp make_pair #define F first #define S second #define ff first #define ss second #define str string #define ll long long #define ull unsigned ll #define ld long double #define pll pair<ll,ll> #define plll pair<pll,ll> #define pllll pair<pll,pll> #define pii pair<int,int> #define pld pair<ld,ld> #define vl vector<ll> #define vll vector<pll> #define vlll vector<plll> #define vllll vector<pllll> #define vb vector<bool> #define vi vector<int> #define vii vector<pii> #define sz(x) (ll)(x).size() #define fr front() #define tp top() #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define bk back(); #pragma GCC target( "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("Ofast,unroll-loops,fast-math,O3") using namespace std; const ld pi=acos(-1.0); const ll e5=1e5; const ll e6=1e6; const ll e9=1e9; const ll inf=1e18; const ll mod=1e9+7; const ll mod2=998244353; const ll MOD=106710087877475399; const ll N=1e6+10; const ll M=50+10; const ld eps=1e-9; mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); ll bpm(ll x,ll y,ll m){if(y==0)return 1%m;ll p=bpm(x,y/2,m); if(y%2==0)return p*p%m;else return p*p%m*x%m;} ll bp(ll x,ll y){if(y==0)return 1;ll p=bp(x,y/2); if(y%2==0)return p*p;else return p*p*x;} ll n; void solve(){ cin>>n; vl ans; set<ll> st; for(ll i=1;i<=n;i++) st.insert(i); for(ll i=1;i<=n;i++){ ll X,mn=inf; for(ll x:st){ vl v=ans; v.pb(x); for(ll y:st){ if(y!=x) v.pb(y); } ll p=publish(v); if(p<mn){ mn=p; X=x; } } ans.pb(X); st.erase(X); } answer(ans); return; } int main(/*Aldk*/){ ios_base::sync_with_stdio(false); cin.tie(NULL); //freopen("01.in", "r", stdin); //freopen("01.out ", "w", stdout); //cout<<setprecision(6)<<fixed; int test=1; //cin>>test; for(int i=1;i<=test;i++){ solve(); cout<<'\n'; } return 0; }

Compilation message (stderr)

art.cpp: In function 'void solve()':
art.cpp:65:26: error: could not convert 'v' from 'vector<long long int>' to 'vector<int>'
   65 |             ll p=publish(v);
      |                          ^
      |                          |
      |                          vector<long long int>
art.cpp:74:12: error: could not convert 'ans' from 'vector<long long int>' to 'vector<int>'
   74 |     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) {
      |        ~~~~~~~~~^~~~