Submission #604418

# Submission time Handle Problem Language Result Execution time Memory
604418 2022-07-25T06:11:32 Z krit3379 Event Hopping (BOI22_events) C++17
0 / 100
53 ms 2264 KB
#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

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 time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 53 ms 2264 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -