Submission #372542

#TimeUsernameProblemLanguageResultExecution timeMemory
372542Christopher_RdzMemory (IOI10_memory)C++17
0 / 100
1 ms256 KiB
#include "grader.h"
#include "memory.h"

int cubeta[102];

void play() {
   char a, b;
   for (int i = 1; i <= 50; i++){
     a = faceup(i);
     if (cubeta[a] != 0){
       b = faceup(cubeta[a]);
     }else{
       cubeta[a] = i;
     }
   }
}

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:10:17: warning: array subscript has type 'char' [-Wchar-subscripts]
   10 |      if (cubeta[a] != 0){
      |                 ^
memory.cpp:11:26: warning: array subscript has type 'char' [-Wchar-subscripts]
   11 |        b = faceup(cubeta[a]);
      |                          ^
memory.cpp:13:15: warning: array subscript has type 'char' [-Wchar-subscripts]
   13 |        cubeta[a] = i;
      |               ^
memory.cpp:7:12: warning: variable 'b' set but not used [-Wunused-but-set-variable]
    7 |    char a, b;
      |            ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...