제출 #979396

#제출 시각아이디문제언어결과실행 시간메모리
979396AndreyIsland Hopping (JOI24_island)C++17
100 / 100
7 ms600 KiB
#include "island.h" #include<bits/stdc++.h> using namespace std; void solve(int n, int l) { vector<int> haha(n); for(int i = 1; i < n; i++) { haha[i] = query(1,i); } vector<bool> bruh(n+1); bruh[1] = true; for(int i = 1; i < n; i++) { int x = haha[i]; if(!bruh[x]) { for(int j = 1; j <= n-1; j++) { int c = query(x,j); answer(x,c); if(bruh[c]) { break; } bruh[c] = true; } bruh[x] = true; } } }
#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...