Submission #165616

#TimeUsernameProblemLanguageResultExecution timeMemory
165616beso123Geppetto (COCI15_geppetto)C++14
80 / 80
824 ms544 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int ans=0; int n,m; map<int,int> mp[100]; main(){ cin>>n>>m; for(int k=1;k<=m;k++){ int a,b; cin>>a>>b; mp[a][b]=1; mp[b][a]=1; } int N=1<<(n); for(int k=0;k<=N;k++){ bitset<22> b=k; int ind=1; for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ if(b[i]==b[j] && b[i]==1){ if(mp[i+1][j+1]==1){ ind=0; break; } } } } if(ind) ans++; } cout<<ans-1; return 0; }

Compilation message (stderr)

geppetto.cpp:7:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main(){
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...