Submission #72062

#TimeUsernameProblemLanguageResultExecution timeMemory
72062IDxTree (#118)Key of Impassable Doors (FXCUP3_key)C++17
23 / 100
19 ms2436 KiB
#include "key.h" #include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; int ask(int a, int b){ static map<pii, int> mem; if(a>b) swap(a,b); if(mem.find(pii(a,b))!=mem.end()) return mem[pii(a,b)]; TakeKey(a); if(a!=b) TakeKey(b); return mem[pii(a,b)]=Explore(); } void EnsureKeyInfo(int n) { for(int i=1; i<=n; i++) for(int j=1; j<=n; j++){ // cout<<ask(i,i)<<' '<<ask(i,j)<<'\n'; if(ask(i,i)==ask(i,j)) Report(i,j); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...