# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1165742 | em4ma2 | Cave (IOI13_cave) | C++20 | 0 ms | 0 KiB |
#include "bits/stdc++.h"
//#include "grader.h"
/*#include <assert.h>
#include <stdio.h>
#include <stdlib.h>*/
using namespace std;
#define ll long long
//#define int long long
#define pb push_back
#define applejuice ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
const int mod=1e9+7;
const ll inf=LLONG_MAX;
const ll mxsz=500+4;
int off=1;
#define MAX_N 5000
#define MAX_CALLS 70000
static int N;
static int realS[MAX_N];
static int realD[MAX_N];
static int inv[MAX_N];
static int num_calls;
void answer(int S[], int D[]) {
int i;
for (i = 0; i < N; ++i)