Submission #764563

#TimeUsernameProblemLanguageResultExecution timeMemory
764563pere_gilLogičari (COCI21_logicari)C++14
10 / 110
15 ms1440 KiB
#include "bits/stdc++.h" using namespace std; #define ll long long #define gcd(a,b) __gcd(a,b) #define lcm(a,b) a*b/gcd(a,b) #define ii pair<int,int> #define vi vector<int> #define all(x) x.begin(),x.end() int main(){ int n; scanf("%d",&n); int u,v; for(int i=0;i<n;i++) scanf("%d %d",&u,&v); if(n==2) printf("2\n"); else if(n%4) printf("-1\n"); else printf("%d\n",n/2); return 0; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |  int n; scanf("%d",&n);
      |         ~~~~~^~~~~~~~~
Main.cpp:14:28: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |  for(int i=0;i<n;i++) scanf("%d %d",&u,&v);
      |                       ~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...