Submission #72209

#TimeUsernameProblemLanguageResultExecution timeMemory
72209BBBSNG (#118)Key of Impassable Doors (FXCUP3_key)C++17
23 / 100
10 ms2156 KiB
#include "key.h" #include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; bool ans[1005][1005]; int num[1005]; void EnsureKeyInfo(int N) { for(int i = 1; i <= N; i++) { TakeKey(i); num[i] = Explore(); } for(int i = 1; i <= N; i++) { ans[i][i] = 1; for(int j = i + 1; j <= N; j++) { TakeKey(i); TakeKey(j); int tmp = Explore(); if(tmp == num[i]) ans[i][j] = true; if(tmp == num[j]) ans[j][i] = true; } } for(int i = 1; i <= N; i++) { for(int j = 1; j <= N; j++) { if(ans[i][j]) Report(i, j); } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...