Submission #979249

#TimeUsernameProblemLanguageResultExecution timeMemory
979249Rafi22Island Hopping (JOI24_island)C++17
0 / 100
1 ms600 KiB
#include "island.h" #include <bits/stdc++.h> using namespace std; void solve(int N, int L){ int n=N; vector<vector<int>>is(n+1,vector<int>(n+1,0)); for(int i=1;i<=n;i++) { vector<int>V; for(int j=1;j<n;j++) { int k=query(i,j); if(k>i) break; bool ok=1; for(auto x:V) if(is[x][k]) ok=0; if(!ok) break; answer(i,k); is[i][k]=1; is[k][i]=1; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...