Submission #1220876

#TimeUsernameProblemLanguageResultExecution timeMemory
1220876TrumlingAmusement Park (CEOI19_amusementpark)C++20
Compilation error
0 ms0 KiB
//Trumling © //Αφόδευε υψηλά και ηγνάντει #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define F first #define S second #define enter cout<<'\n'; #define INF 99999999999999999 #define MOD 998244353 #define all(x) x.begin(),x.end() bool ar[33554440]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); ll n,m; cin>>n>>m; pair<ll,ll> arr[m]; for(int i=0;i<m;i++) { cin>>arr[i].F>>arr[i].S; g[arr[i].F][arr[i].S]=1; } ll ans=0; vector<ll>v; for(int i=1;i<=n;i++) v.pb(i); do { ll curr=0; ll id=0; for(int i=0;i<m;i++) if(v[arr[i].F-1] < v[arr[i].S-1]) { curr++; id+=(1<<i); } // cout<<curr<<','<<id<<' '; if(!ar[id]) { ar[id]=1; ans+=curr; } } while (next_permutation(all(v))); cout<<ans; }

Compilation message (stderr)

amusementpark.cpp: In function 'int main()':
amusementpark.cpp:27:9: error: 'g' was not declared in this scope
   27 |         g[arr[i].F][arr[i].S]=1;
      |         ^