Submission #734804

# Submission time Handle Problem Language Result Execution time Memory
734804 2023-05-03T06:07:22 Z keisuke6 Circle selection (APIO18_circle_selection) C++14
0 / 100
432 ms 1048576 KB
#pragma GCC target("avx512f")
#include <bits/stdc++.h>
using namespace std;

int main(){
  int N,K,Q;
  cin>>N>>K>>Q;
  vector<int> X(N),T(N),A(N),B(N);
  for(int i=0;i<N;i++){
    cin>>X[i]>>T[i]>>A[i]>>B[i];
    T[i]--;
  }
  while(Q--){
    int x,t;
    cin>>x>>t;
    vector<int> S(K,2e9);
    for(int i=0;i<N;i++){
      if(A[i] > t || B[i] < t) continue;
      S[T[i]] = min(S[T[i]],abs(X[i]-x));
    }
    sort(S.rbegin(),S.rend());
    cout<<(S[0] == 2e9 ? -1 : S[0])<<endl;
  }
}
# Verdict Execution time Memory Grader output
1 Runtime error 432 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 279 ms 4984 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 400 ms 660276 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 323 ms 9980 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 432 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 432 ms 1048576 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -