| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1364964 | biserailieva | Toy Design (EGOI22_toydesign) | C++17 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
void ToyDesign(int n, int max_ops)
{
vector<pair<int,int>> result;
int current = 0;
for(int i = 1; i <= n; i++)
{
for(int j = i + 1; j <= n; j++)
{
int x = Connected(current, i, j);
if(x != current)
{
result.push_back({i, j});
current = x;
}
}
}
DescribeDesign(result);
}