# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
200514 | 2020-02-07T03:25:38 Z | arnold518 | 라멘 (JOI14_ramen) | C++14 | 5 ms | 376 KB |
#include "ramen.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; int N; void Ramen(int _N) { int i, j; N=_N; vector<int> A, B; for(i=0; i+1<N; i+=2) { int t=Compare(i, i+1); if(t==1) A.push_back(i), B.push_back(i+1); else B.push_back(i), A.push_back(i+1); } if(N%2) A.push_back(N-1), B.push_back(N-1); int X=A[0]; for(i=1; i<A.size(); i++) { int t=Compare(X, A[i]); if(t==-1) X=A[i]; } int Y=B[0]; for(i=1; i<B.size(); i++) { int t=Compare(Y, B[i]); if(t==1) Y=A[i]; } Answer(Y, X); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 248 KB | Output is correct |
2 | Correct | 5 ms | 256 KB | Output is correct |
3 | Runtime error | 5 ms | 256 KB | Execution failed because the return code was nonzero |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 376 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 248 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |