# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
236052 | 2020-05-31T03:44:55 Z | hhs2u | 라멘 (JOI14_ramen) | C++17 | 5 ms | 384 KB |
#include "ramen.h" void Ramen(int N) { int a[222],b[222],cnt=0; int mx,mn; for(int i=0;i<N;i+=2) { if(i==N-1) a[cnt]=i,b[cnt]=i; else { if(Compare(i,i+1)==1) a[cnt]=i,b[cnt]=i+1; else b[cnt]=i,a[cnt]=i+1; } cnt++; } mx=a[0],mn=b[0]; for(int i=1;i<cnt;i++) { if(Compare(a[i],mx)==1) mx=a[i]; } for(int i=1;i<cnt;i++) { if(Compare(mn,b[i])==1) mn=b[i]; } Answer(mn,mx); return; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 256 KB | Output is correct |
2 | Correct | 4 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 256 KB | Output is correct |
4 | Correct | 5 ms | 256 KB | Output is correct |
5 | Correct | 4 ms | 256 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 256 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 4 ms | 256 KB | Output is correct |
4 | Correct | 5 ms | 384 KB | Output is correct |
5 | Correct | 4 ms | 256 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 256 KB | Output is correct |
2 | Correct | 5 ms | 256 KB | Output is correct |
3 | Correct | 4 ms | 256 KB | Output is correct |
4 | Correct | 5 ms | 256 KB | Output is correct |
5 | Correct | 4 ms | 256 KB | Output is correct |