# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
140583 | khrbuddy03 | 사냥꾼 (KOI13_hunter) | C++14 | 63 ms | 4728 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> point;
const int inf = 1e5 + 9;
int dist(point& p1, point& p2) {
return abs(p1.first - p2.first) + abs(p1.second - p2.second);
}
point gun[inf];
point ani[inf];
int main() {
#if DEBUG
// //freopen("input.txt", "r", stdin);
#endif
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int m, n, l; cin >> m >> n >> l;
for (int i = 0; i < m; i++) cin >> gun[i].first;
for (int i = 0; i < n; i++) cin >> ani[i].first >> ani[i].second;
sort(gun, gun + m);
sort(ani, ani + n);
int ans = 0;
int pos = 0;
for (int i = 0; i < n; i++) {
while (gun[pos].first <= ani[i].first && pos < m) pos++;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |