답안 #865316

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
865316 2023-10-24T07:23:06 Z Trisanu_Das Lightning Rod (NOI18_lightningrod) C++17
0 / 100
2000 ms 243472 KB
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second

 
int main(){
  int n; cin >> n;
  set<pair<int, int> > s;
  for(int i = 0; i < n; i++){
    int x, y; cin >> x >> y;
    s.insert({y, x});
  }
  int ans = 0;
  while(!s.empty()){
    pair<int, int> a = *s.rbegin();
    vector<pair<int, int> > v;
    for(auto i : s) if(abs(a.ss - i.ss) <= a.ff - i.ff) v.push_back(i);
    for(auto i : v) s.erase(i);
  }
  cout << ans << '\n';
}
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 2016 ms 190500 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 2062 ms 243472 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 2016 ms 190500 KB Time limit exceeded
2 Halted 0 ms 0 KB -