# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1004949 |
2024-06-22T04:54:43 Z |
pavement |
Tiles (BOI24_tiles) |
C++17 |
|
106 ms |
20088 KB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define pb push_back
int N, M, min_y = (int)1e9;
vector<int> try_x;
map<int, vector<int> > vec;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> N >> M;
for (int i = 1, x, y; i <= N; i++) {
cin >> x >> y;
vec[x].pb(y);
if (x != 0) {
try_x.pb(x - 1);
}
try_x.pb(x);
}
int ans = 0;
sort(try_x.begin(), try_x.end());
try_x.erase(unique(try_x.begin(), try_x.end()), try_x.end());
for (auto x : try_x) {
int prv = min_y;
for (auto y : vec[x]) {
min_y = min(min_y, y);
}
if (prv != min_y) {
if (x % 2 == 1 || min_y % 2 == 1) {
break;
}
}
if (x % 2 == 0 && min_y % 2 == 0) {
ans = x;
}
}
cout << ans << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
54 ms |
10592 KB |
Output is correct |
3 |
Incorrect |
57 ms |
10440 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
106 ms |
20088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |