Submission #604418

#TimeUsernameProblemLanguageResultExecution timeMemory
604418krit3379Event Hopping (BOI22_events)C++17
0 / 100
53 ms2264 KiB
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #define N 100005 int s[N],e[N]; int main(){ int n,q,i,a,b; scanf("%d %d",&n,&q); for(i=1;i<=n;i++){ scanf("%d %d",&s[i],&e[i]); } while(q--){ scanf("%d %d",&a,&b); if(s[b]<=e[a]&&e[a]<=e[b])printf("1\n"); else printf("impossible\n"); } return 0; }

Compilation message (stderr)

events.cpp: In function 'int main()':
events.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf("%d %d",&n,&q);
      |     ~~~~~^~~~~~~~~~~~~~~
events.cpp:13:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |         scanf("%d %d",&s[i],&e[i]);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~
events.cpp:16:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |         scanf("%d %d",&a,&b);
      |         ~~~~~^~~~~~~~~~~~~~~
#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...