Submission #994587

#TimeUsernameProblemLanguageResultExecution timeMemory
994587salmonPortal (BOI24_portal)C++14
1 / 100
16 ms348 KiB
#include <bits/stdc++.h> using namespace std; int N; long long int x,y; long long int b,d; long long int b1,d1; long long int h1,h2; bool flag = true; bool floog = true; vector<pair<long long int,long long int>> v; int main(){ long long int num = 0; long long int fum = 0; scanf(" %d",&N); scanf(" %lld",&x); scanf(" %lld",&y); for(int i = 0; i < N - 2; i++){ scanf(" %lld",&h1); scanf(" %lld",&h2); h1 -= x; h2 -= y; if(h1 == 0 || h2 == 0) continue; flag &= (h1==0); floog &= (h2==0); if(h1!=0){ b = h1; d = h2; d *= (b)/abs(b); b = abs(b); } if(h2!=0){ b1 = h1; d1 = h2; b1 *= (d1)/abs(d1); d1 = abs(d1); } } if(flag || floog){ printf("%d",-1); return 0; } for(pair<long long int,long long int> ii : v){ } }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:58:40: warning: variable 'ii' set but not used [-Wunused-but-set-variable]
   58 |  for(pair<long long int,long long int> ii : v){
      |                                        ^~
Main.cpp:15:16: warning: unused variable 'num' [-Wunused-variable]
   15 |  long long int num = 0;
      |                ^~~
Main.cpp:16:16: warning: unused variable 'fum' [-Wunused-variable]
   16 |  long long int fum = 0;
      |                ^~~
Main.cpp:18:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |  scanf(" %d",&N);
      |  ~~~~~^~~~~~~~~~
Main.cpp:20:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |  scanf(" %lld",&x);
      |  ~~~~~^~~~~~~~~~~~
Main.cpp:21:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |  scanf(" %lld",&y);
      |  ~~~~~^~~~~~~~~~~~
Main.cpp:24:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   24 |   scanf(" %lld",&h1);
      |   ~~~~~^~~~~~~~~~~~~
Main.cpp:25:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   25 |   scanf(" %lld",&h2);
      |   ~~~~~^~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...