Submission #18868

#TimeUsernameProblemLanguageResultExecution timeMemory
18868choyi0521라멘 (JOI14_ramen)C++14
0 / 100
0 ms1124 KiB
#include "ramen.h" void Ramen(int N) { int l, r; if (N % 2) l = r = N - 1; for (int i = 1; i < N; i += 2) { int x=i-1, y=i; if (Compare(x, y) == 1) x ^= y ^= x ^= y; if (Compare(l,x) == 1) l = x; if (Compare(y,r) == 1) r = y; } Answer(l, r); }

Compilation message (stderr)

ramen.cpp: In function 'void Ramen(int)':
ramen.cpp:9:14: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized]
   if (Compare(y,r) == 1) r = y;
              ^
ramen.cpp:8:14: warning: 'l' may be used uninitialized in this function [-Wmaybe-uninitialized]
   if (Compare(l,x) == 1) l = x;
              ^

#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...