# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1034008 | 2024-07-25T08:38:44 Z | 김은성(#10970) | Tiles (BOI24_tiles) | C++17 | 31 ms | 5064 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; for(i=1; i<n; i++){ scanf("%d %d", &x, &y); while(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++){ 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 | 344 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 | 344 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 | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 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 | Correct | 31 ms | 5064 KB | Output is correct |
2 | Correct | 16 ms | 3276 KB | Output is correct |
3 | Incorrect | 0 ms | 348 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |