Submission #596191

#TimeUsernameProblemLanguageResultExecution timeMemory
596191Koosha_mvArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include "shoes.h" #include <bits/stdc++.h> using namespace std; #define dbgv(v) cout<<#v<<" = "; f(i,0,int(v.size())) cout<<v[i]<<" "; cout<<endl #define dbga(a,x,y) cout<<#a<<" = "; f(i,x,y) cout<<a[i]<<" "; cout<<endl #define erorp(x) cout<<#x<<"={"<<x.F<<" , "<<x.S<<"}"<<endl #define eror(x) cout<<#x<<'='<<(x)<<endl #define f_(i,a,b) for(int i=a;i>=b;i--) #define f(i,a,b) for(int i=a;i<b;i++) #define nb(x) __builtin_popcount(x) #define all(v) v.begin(),v.end() #define bit(n,k) (((n)>>(k))&1) #define Add(x,y) x=(x+y)%mod #define maxm(a,b) a=max(a,b) #define minm(a,b) a=min(a,b) #define lst(x) x[x.size()-1] #define sz(x) int(x.size()) #define mp make_pair #define ll long long #define pb push_back #define S second #define F first const int N=2505,lg=10; int n,a[N],L[N],R[N],fen[N]; ll ans; vector<int> A[N],B[N]; void add(int x,int val){ for(x++;x>0;x-=(x&-x)){ fen[x]+=val; } } int get(int x){ int res=0; for(x++;x<N;x+=(x&-x)){ res+=fen[x]; } return res; } ll count_swaps(vector<int> D) { f(i,0,N){ f(j,0,N){ f(k,0,lg){ vec[i][j].pb(k<<1); } vec[i][j].clear(); vec[i][j].shrink_to_fit(); } } return ans; }

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:46:9: error: 'vec' was not declared in this scope
   46 |         vec[i][j].pb(k<<1);
      |         ^~~
shoes.cpp:48:7: error: 'vec' was not declared in this scope
   48 |       vec[i][j].clear();
      |       ^~~