| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 743148 | vjudge1 | Lightning Rod (NOI18_lightningrod) | C++17 | 2084 ms | 262144 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> v;
bool sorted(const pair<int, int> &a, const pair<int, int> &b)
{
if (a.second == b.second)
return a.first > b.first;
return a.second > b.second;
}
bool check(int x1, int x2, int y1, int y2)
{
return abs(x1 - x2) <= y1 - y2;
}
inline void read(int &x)
{
x = 0;
char ch = getchar_unlocked();
while (ch & 16)
{
x = (x << 3) + (x << 1) + (ch & 15);
ch = getchar_unlocked();
}
}
int main()
{
// bf
map<int, int> ma;
map<int, int> poled;
int n, a, b;
read(n);
for (int i = 1; i <= n; ++i)
{
read(a);
read(b);
v.push_back({a, b});
ma[i - 1] = -1;
poled[i - 1] = 0;
}
sort(v.begin(), v.end(), sorted);
for (int i = 0; i < v.size(); ++i)
{
for (int j = 0; j < v.size(); ++j)
{
if (i != j && check(v[i].first, v[j].first, v[i].second, v[j].second))
{
ma[j] = i;
}
}
}
long long sum = 0;
for (auto it = ma.begin(); it != ma.end(); ++it)
{
if (it->second == -1)
{
sum++;
poled[it->first] = 1;
}
else
{
poled[it->first] = 1;
}
}
cout << sum;
}컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
