| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1355035 | rokijadesmoki | Swords (NOI23_swords) | C++20 | 1094 ms | 1224 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
int a[n], b[n];
for (int i = 0; i < n; ++i) {
cin >> a[i] >> b[i];
}
vector<bool> is_useful(n, true);
for (int i = 0; i < n; ++i) {
if (!is_useful[i]) continue;
for (int j = i + 1; j < n; ++j) {
if (!is_useful[j]) continue;
if (a[i] >= a[j] && b[i] >= b[j]) {
is_useful[j] = false;
}
else if (a[i] <= a[j] && b[i] <= b[j]) {
is_useful[i] = false;
break;
}
}
}
int useful = 0;
for (bool u: is_useful) {
if (u) ++useful;
}
cout << useful;
return 0;
}| # | 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... | ||||
