Submission #28306

#TimeUsernameProblemLanguageResultExecution timeMemory
28306:thinking_face: (#68)1-Color Coloring (FXCUP2_coloring)C++11
0 / 1
0 ms1120 KiB
#include "coloring.h" void ColoringSame(int N) { int s = GetColor(1); if(s == N) return; int start; for(int i = 1; i <= N; i++) { Color(i); int cur = GetColor(1); if(cur > s) { start = i; break; } } for(int i = 1; i <= N; i++) { Color(start); start++; if(start > N) start -= N; } }

Compilation message (stderr)

coloring.cpp: In function 'void ColoringSame(int)':
coloring.cpp:23:10: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
   start++;
          ^
#Verdict Execution timeMemoryGrader output
Fetching results...