Submission #5354

#TimeUsernameProblemLanguageResultExecution timeMemory
5354ainta라멘 (JOI14_ramen)C++98
0 / 100
0 ms1124 KiB
#include "ramen.h" bool v1[410], v2[410]; void Ramen(int N) { int i, t, p, c, r1, r2; while (1){ t = -1; c = 0; for (i = 0; i < N; i++){ if (!v1[i]){ c++; r1 = i; if (t == -1) t = i; else{ p = Compare(t, i); if (p == 1) v1[i] = true, v2[t] = true; else v2[i] = true, v1[t] = true; t = -1; } } } if (c == 1)break; } while (1){ t = -1; c = 0; for (i = 0; i < N; i++){ if (!v2[i]){ c++; r2 = i; if (t == -1) t = i; else{ p = Compare(t, i); if (p == 1) v2[t] = true; else v2[i] = true; t = -1; } } } if (c == 1)break; } Answer(r1, r2); }

Compilation message (stderr)

ramen.cpp: In function 'void Ramen(int)':
ramen.cpp:41:16: warning: 'r2' may be used uninitialized in this function [-Wmaybe-uninitialized]
  Answer(r1, r2);
                ^
ramen.cpp:41:16: warning: 'r1' may be used uninitialized in this function [-Wmaybe-uninitialized]

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