Submission #262926

#TimeUsernameProblemLanguageResultExecution timeMemory
262926dolphingarlic라멘 (JOI14_ramen)C++14
50 / 100
1 ms256 KiB
#include "ramen.h" #include <algorithm> int ord[600]; void Ramen(int N) { std::srand(69420); if (N == 1) { Answer(0, 0); return; } for (int i = 0; i < N; i++) ord[i] = i; std::random_shuffle(ord, ord + N); int lo = ord[0], hi = ord[1]; if (Compare(lo, hi) == 1) lo = ord[1], hi = ord[0]; for (int i = 2; i < N; i++) { if (Compare(lo, ord[i]) == 1) lo = ord[i]; else if (Compare(ord[i], hi) == 1) hi = ord[i]; } Answer(lo, hi); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...