제출 #545570

#제출 시각아이디문제언어결과실행 시간메모리
545570pere_gilMemory (IOI10_memory)C++17
0 / 100
1 ms208 KiB
#include "bits/stdc++.h" #include "grader.h" #include "memory.h" using namespace std; void play() { int v[100]; memset(v,-1,sizeof v); for(int i=1;i<=50;i++){ char a=faceup(i); if(v[a]!=-1) faceup(v[a]); else{ v[a]=i; char b=faceup((i+1)%50); if(a==b) i++; } } }

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

memory.cpp: In function 'void play()':
memory.cpp:11:8: warning: array subscript has type 'char' [-Wchar-subscripts]
   11 |   if(v[a]!=-1) faceup(v[a]);
      |        ^
memory.cpp:11:25: warning: array subscript has type 'char' [-Wchar-subscripts]
   11 |   if(v[a]!=-1) faceup(v[a]);
      |                         ^
memory.cpp:13:6: warning: array subscript has type 'char' [-Wchar-subscripts]
   13 |    v[a]=i;
      |      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...