# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
943177 | 2024-03-11T09:04:21 Z | MilosMilutinovic | Chameleon's Love (JOI20_chameleon) | C++14 | 0 ms | 0 KB |
// rispekt za vasu #include "chameleon.h" #include<bits/stdc++.h> #define pb push_back #define mp make_pair #define fi first #define se second using namespace std; namespace { int f[105][105]; vector<int> c[105]; } // namespace void Solve(int n){ vector<pair<int,int>> res; for(int i=1;i<=2*n;i++){ for(int j=i+1;j<=2*n;j++){ f[i][j]=f[j][i]=Query({i},{j}); } } for(int i=1;i<=2*n;i++){ c[i].clear(); for(int j=1;j<=2*n;j++){ if(i==j||f[i][j]!=1) continue; c[i].pb(j); } } for(int i=1;i<=2*n;i++){ for(int j:c[i]){ } } for(auto&p:res) Answer(p.fi,p.se); }