| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1363923 | inesfi | Island Hopping (JOI24_island) | C++20 | 2 ms | 416 KiB |
#include "island.h"
#include<bits/stdc++.h>
using namespace std;
const int TAILLEMAXI=302;
bool dejavu[TAILLEMAXI];
int pere[TAILLEMAXI];
void q(int a, int b, int c){
cout<<"query "<<a<<" "<<b<<" rep "<<c<<endl;
}
void solve(int n, int nbquest_max) {
dejavu[1] = true;
for (int i=1;i<n;i++){
int ec = query(1, i);
//q(1, i, ec);
dejavu[ec] = true;
if (pere[ec] == 0){
int vois = query(ec, 1);
//q(ec, 1, vois);
int compt = 1;
while (!dejavu[vois]){
pere[vois] = ec;
compt ++;
vois = query(ec, compt);
//q(ec, compt, vois);
}
pere[ec] = vois;
}
}
for (int i=2;i<=n;i++){
//cerr<<i<<" "<<pere[i]<<endl;
answer(i, pere[i]);
}
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
