Submission #208396

#TimeUsernameProblemLanguageResultExecution timeMemory
208396ArKCaGeppetto (COCI15_geppetto)C++17
0 / 80
12 ms376 KiB
#include<bits/stdc++.h> #define pb push_back #define fri(a) freopen(a,"r",stdin); #define fro(a) freopen(a,"w",stdout); using namespace std; int n,m,a,b,ans; vector<int>v[30]; void fun(int x,int y){ ans++; // printf("%d\n", x); if(y==(n+1)) return ; int flag=0; for(int i=y;i<=n;i++){ flag=0; for(int j=0;j<v[i].size();j++){ if(((1<<v[i][j])&x)!=0){ flag=1; } } if(flag==0) fun(x^(1<<i),i+1); } } int main(){ //fri("in.txt"); //fro("out.txt"); cin>>n>>m;/**/ for(int i=0;i<m;i++){ scanf("%lld %lld",&a,&b); v[a].pb(b); v[b].pb(a); } fun(0,1); cout<<ans<<endl; }

Compilation message (stderr)

geppetto.cpp: In function 'void fun(int, int)':
geppetto.cpp:17:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j=0;j<v[i].size();j++){
               ~^~~~~~~~~~~~
geppetto.cpp: In function 'int main()':
geppetto.cpp:31:26: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
   scanf("%lld %lld",&a,&b);
                     ~~   ^
geppetto.cpp:31:26: warning: format '%lld' expects argument of type 'long long int*', but argument 3 has type 'int*' [-Wformat=]
geppetto.cpp:31:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld %lld",&a,&b);
   ~~~~~^~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...