Submission #88633

#TimeUsernameProblemLanguageResultExecution timeMemory
88633asifthegreatGeppetto (COCI15_geppetto)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int ans; int n,m; vector<int>subset; bitset<2000000>vis; int parent[2000000]; map<pair<int,int>,int>mp; void go(int i) { if(i == n+1){ for(int i = 0; i < size;i++){ for(int j = 0; j < size;j++){ if(i == j)continue; if(mp[{subset[i],subset[j]}]){ ans--;return; } } } return; } if(i > 10000){ cout << "sed lyf\n";exit(0); } go(i+1); subset.push_back(i); go(i+1); subset.pop_back(); } int main() { scanf("%d%d",&n,&m); for(int i = 0; i <= n;i++)parent[i] = i; int a,b; ans = 1<<(n-1); //set<pair<int,int>>st; for(int i = 1; i <= m;i++){ scanf("%d%d",&a,&b); mp[{a,b}]++; } cout << ans << endl; return 0; }

Compilation message (stderr)

geppetto.cpp: In function 'void go(int)':
geppetto.cpp:15:28: error: 'size' was not declared in this scope
         for(int i = 0; i < size;i++){
                            ^~~~
geppetto.cpp:15:28: note: suggested alternative: 'dysize'
         for(int i = 0; i < size;i++){
                            ^~~~
                            dysize
geppetto.cpp: In function 'int main()':
geppetto.cpp:36:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d",&n,&m);
     ~~~~~^~~~~~~~~~~~~~
geppetto.cpp:42:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d",&a,&b);
         ~~~~~^~~~~~~~~~~~~~