# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1275027 | muhammad-mutahir | Island Hopping (JOI24_island) | C++20 | 0 ms | 0 KiB |
#include "island.h"
#include <bits/stdc++.h>
using namespace std;
#define print(l) for(auto i:l) cout<<i<<" ";cout<<endl;
#define input(t,l,n) vector<t>l(n);for(int i = 0;i<n;i++)cin>>l[i];
#define int long long
#define pb push_back
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define all(l) l.begin(),l.end()
#define pii pair<int,int>
#define fi first
#define se second
const int M = 998244853;
int inf = 1e18;
void io(){
#ifndef ONLINE_JUDGE
freopen("input.in","r",stdin);
// freopen("outputf.in","w",stdout);
#endif
ios::sync_with_stdio(0);//DO NOT USE IN INTERACTIVE
cin.tie(0), cout.tie(0);
cout << fixed<<setprecision(9);
}
void solve(int N, int L) {
// int variable_example = query(1, 1);
// for (int i = 2; i <= N; i++) {
// answer(1, i);
// }
vector<vector<int>>find(N+1);
for(int i = 1;i<=N;i++){
for(int j = 1;j<N;j++){
int f = query(i,j);
find[i].pb(f);
}
}
for(int i = 1;i<=N;i++){
for(int j = i+1;j<=N;j++){
vector<int>v1,v2;
for(int k:find[i]){
if(k == j)continue;
v1.pb(k);
}
for(int k:find[j]){
if(k == i)continue;
v2.pb(k);
}
if(v1 == v2){
answer(i,j);
}
}
}
}
// signed main(){
// io();
// int t = 1;
// while(t--) solve();
// }