(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #463369

#TimeUsernameProblemLanguageResultExecution timeMemory
463369amunduzbaevMemory (IOI10_memory)C++14
100 / 100
8 ms288 KiB
#include "grader.h" #include "memory.h" #ifndef EVAL #include "grader.cpp" #endif #include "bits/stdc++.h" using namespace std; array<char, 2> ask(array<int, 2> in){ array<char, 2> res; //~ for(int i=0;i<2;i++) cout<<in[i]<<" "; //~ cout<<endl; for(int i=0;i<2;i++){ res[i] = faceup(in[i]); } return res; } void play() { int n = 50; vector<char> val(n); vector<array<int, 2>> in(25, (array<int, 2>){-1, -1}); for(int i=0;i+1<n;i+=2){ array<char, 2> tmp = ask({i+1, i+2}); val[i] = tmp[0], val[i+1] = tmp[1]; } for(int i=0;i<n;i++){ if(~in[val[i] - 'A'][0]) in[val[i] - 'A'][1] = i + 1; else in[val[i] - 'A'][0] = i + 1; } for(int i=0;i<25;i++){ ask(in[i]); } } /* AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYY */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...