# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
486361 | 2021-11-11T11:51:21 Z | leinad2 | 라멘 (JOI14_ramen) | C++17 | 1 ms | 204 KB |
#include "ramen.h" #include<bits/stdc++.h> using namespace std; void Ramen(int N) { vector<int>A, B; for(int i=0;i<N;i+=2) { if(i==N-1) { A.push_back(i); B.push_back(i); } else { if(Compare(i, i+1)==1)B.push_back(i),A.push_back(i+1); else A.push_back(i),B.push_back(i+1); } } int mx=A[0]; for(int i=1;i<A.size();i++) { if(Compare(A[i], mx)==-1)mx=A[i]; } int mn=B[0]; for(int i=1;i<B.size();i++) { if(Compare(B[i], mn)==1)mn=B[i]; } Answer(mx, mn); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |