제출 #474079

#제출 시각아이디문제언어결과실행 시간메모리
474079ValiAntonieMemory (IOI10_memory)C++14
100 / 100
2 ms260 KiB
#include "grader.h" #include "memory.h" #include <vector> #include <bits/stdc++.h> using namespace std; void play() { int ap[100], path[100], path2[100]; for(int i=1;i<=50;i++){ char x = faceup(i); if(ap[x] > 3) ap[x] = 0; if(path[x] > 100) path[x] = 0; if(path2[x] > 100) path2[x] = 0; ap[x]++; if(ap[x] == 1) path[int(x)] = i; else path2[int(x)] = i; } for(int i='A';i<'Z';i++){ faceup(path[i]); faceup(path2[i]); } }

컴파일 시 표준 에러 (stderr) 메시지

memory.cpp: In function 'void play()':
memory.cpp:10:15: warning: array subscript has type 'char' [-Wchar-subscripts]
   10 |         if(ap[x] > 3)
      |               ^
memory.cpp:11:16: warning: array subscript has type 'char' [-Wchar-subscripts]
   11 |             ap[x] = 0;
      |                ^
memory.cpp:12:17: warning: array subscript has type 'char' [-Wchar-subscripts]
   12 |         if(path[x] > 100)
      |                 ^
memory.cpp:13:18: warning: array subscript has type 'char' [-Wchar-subscripts]
   13 |             path[x] = 0;
      |                  ^
memory.cpp:14:18: warning: array subscript has type 'char' [-Wchar-subscripts]
   14 |         if(path2[x] > 100)
      |                  ^
memory.cpp:15:19: warning: array subscript has type 'char' [-Wchar-subscripts]
   15 |             path2[x] = 0;
      |                   ^
memory.cpp:16:12: warning: array subscript has type 'char' [-Wchar-subscripts]
   16 |         ap[x]++;
      |            ^
memory.cpp:17:15: warning: array subscript has type 'char' [-Wchar-subscripts]
   17 |         if(ap[x] == 1)
      |               ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...