# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1034017 | 2024-07-25T08:50:11 Z | 김은성(#10970) | Tiles (BOI24_tiles) | C++17 | 30 ms | 5836 KB |
#define x first #define y second #include <bits/stdc++.h> using namespace std; int main(){ int n, xm, i, j, x, y; scanf("%d %d", &n, &xm); vector<pair<int, int> > p; p.push_back(make_pair(0, 0)); for(i=1; i<n; i++){ scanf("%d %d", &x, &y); if(p.size() >= 2 && ((p[p.size()-2].x == p[p.size()-1].x && p.back().x==x) || (p[p.size()-2].y == p[p.size()-1].y && p.back().y==y))) p.pop_back(); p.push_back(make_pair(x, y)); } int opt = 0; for(i=0; i<p.size(); i++){ //printf("x=%d y=%d\n", p[i].x, p[i].y); if(p[i].x%2==0 && p[i].y%2==0) opt= p[i].x; else break; } printf("%d\n", opt); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 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 | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 30 ms | 5836 KB | Output is correct |
2 | Correct | 16 ms | 3280 KB | Output is correct |
3 | Incorrect | 0 ms | 344 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |