제출 #956031

#제출 시각아이디문제언어결과실행 시간메모리
956031emad234Memory (IOI10_memory)C++17
100 / 100
2 ms600 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> #define ll long long #define F first #define S second #define pii pair<ll, ll> const ll mod = 1e9 + 7; const ll mxN = 1e7 + 5; using namespace std; void play() { int vis[300] = {}; int i = 1; while(i <= 50){ char a = faceup(i); if(vis[a]){ faceup(vis[a]); i++; continue; } vis[a] = i; i++; char b = faceup(i); if(vis[b] && b != a){ faceup(i); faceup(vis[b]); } vis[b] = i; i++; } }

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

memory.cpp: In function 'void play()':
memory.cpp:16:11: warning: array subscript has type 'char' [-Wchar-subscripts]
   16 |    if(vis[a]){
      |           ^
memory.cpp:17:18: warning: array subscript has type 'char' [-Wchar-subscripts]
   17 |       faceup(vis[a]);
      |                  ^
memory.cpp:21:8: warning: array subscript has type 'char' [-Wchar-subscripts]
   21 |    vis[a] = i;
      |        ^
memory.cpp:24:11: warning: array subscript has type 'char' [-Wchar-subscripts]
   24 |    if(vis[b] && b != a){
      |           ^
memory.cpp:26:18: warning: array subscript has type 'char' [-Wchar-subscripts]
   26 |       faceup(vis[b]);
      |                  ^
memory.cpp:28:8: warning: array subscript has type 'char' [-Wchar-subscripts]
   28 |    vis[b] = i;
      |        ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...