# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
979243 | 2024-05-10T12:08:21 Z | Rafi22 | Island Hopping (JOI24_island) | C++17 | 0 ms | 0 KB |
#include <bits/stdc++.h> #include "island.h" #define int long long #define ll long long #define ld long double #define endl '\n' #define st first #define nd second #define pb push_back #define sz(x) (int)(x).size() #define all(x) (x).begin(), (x).end() using namespace std; //int inf=1000000007; ll inf=1000000000000000007; ll mod=924844033; ll mod1=998244353; const int N=307; bool is[N][N]; void solve(int n,int l) { 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; } } }