Submission #477108

#TimeUsernameProblemLanguageResultExecution timeMemory
477108glomeMemory (IOI10_memory)C++17
0 / 100
1 ms200 KiB
#include "grader.h" #include "memory.h" #include<bits/stdc++.h> using namespace std; void play() { map<char, vector<int>> m; int last = 1; vector<char> chars(51); vector<bool> vis(51, 0); for (int i = 1; i<=50; i++) { if(vis[i]) { continue; } bool ok = 0; for (int k = i + 1; k<=50; k++) { if(chars[k] == chars[i]) { ok = 1; char a = faceup(k), b = faceup(i); vis[k] = 1; vis[i] = 1; break; } } if(ok) { continue; } for (int j = last+1; j<=50; j++) { char a = faceup(i); char b = faceup(j); chars[i] = a; chars[j] = b; if(a == b) { last = j; vis[i] = 1; vis[j] = 1; break; } } } return; }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:19:14: warning: unused variable 'a' [-Wunused-variable]
   19 |         char a = faceup(k), b = faceup(i);
      |              ^
memory.cpp:19:29: warning: unused variable 'b' [-Wunused-variable]
   19 |         char a = faceup(k), b = faceup(i);
      |                             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...