Submission #956029

#TimeUsernameProblemLanguageResultExecution timeMemory
956029emad234Memory (IOI10_memory)C++17
0 / 100
1 ms344 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[i]]; } vis[b] = i; i++; } }

Compilation message (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:20: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   26 |       faceup[vis[i]];
      |                    ^
memory.cpp:26:20: warning: value computed is not used [-Wunused-value]
   26 |       faceup[vis[i]];
      |       ~~~~~~~~~~~~~^
memory.cpp:26:20: warning: statement has no effect [-Wunused-value]
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...