# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
31094 | 2017-08-08T12:01:54 Z | platinant | 라멘 (JOI14_ramen) | C++14 | 0 ms | 1180 KB |
#include "ramen.h" #include <vector> using namespace std; vector<int> a,b; void Ramen(int N) { for(int i=0;i<N;i+=2){ if(i+1<N){ if(Compare(i,i+1)>0){ a.push_back(i+1); b.push_back(i); }else{ a.push_back(i); b.push_back(i+1); } }else{ a.push_back(i); b.push_back(i); } } int x=a[0],y=b[0]; for(int i=0;i<a.size()-1;i++){ if(Compare(a[i],a[i+1])>0)x=a[i+1]; if(Compare(b[i],b[i+1])<0)y=b[i+1]; } Answer(x,y); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 1180 KB | Output is correct |
2 | Correct | 0 ms | 1180 KB | Output is correct |
3 | Incorrect | 0 ms | 1180 KB | Wrong Answer [5] |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 1180 KB | Wrong Answer [5] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 1180 KB | Wrong Answer [5] |
2 | Halted | 0 ms | 0 KB | - |