Submission #210709

#TimeUsernameProblemLanguageResultExecution timeMemory
210709sochoMemory (IOI10_memory)C++14
100 / 100
7 ms376 KiB
#include "grader.h"
#include "memory.h"
#include "bits/stdc++.h"
using namespace std;

void play() {
   map<char, int> found;
   for (int i=1; i<=50; i++) {
	   char t = faceup(i);
	   if (found.find(t) != found.end()) {
		   faceup(found[t]); // alr found, matcup
	   }
	   else {
		   if (i == 1) faceup(2);
		   else faceup(1);
			found[t] = i; 
	   }
   }
}

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:15:6: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
      else faceup(1);
      ^~~~
memory.cpp:16:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
    found[t] = i; 
    ^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...