Submission #154054

# Submission time Handle Problem Language Result Execution time Memory
154054 2019-09-18T03:57:40 Z combi1k1 라멘 (JOI14_ramen) C++14
0 / 100
2 ms 380 KB
#include "ramen.h"

void Ramen(int n)   {
    int L = -1;
    int R = -1;
    for(int i = 0 ; i < n ; i += 2) {
        int x = i;
        int y = i + 1;
        if (y >= n) y = x;
        else    {
            if (Compare(x,y) < 0)
                x = i + 1,
                y = i;
        }
        if (L < 0)  {
            L = x;
            R = y;
        }
        else    {
            if (Compare(L,x) < 0)   L = x;
            if (Compare(R,x) > 0)   R = x;
        }
    }
    Answer(R,L);
}
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 380 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 376 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 376 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -