Submission #982303

# Submission time Handle Problem Language Result Execution time Memory
982303 2024-05-14T06:13:00 Z SirLemonMeringue Game (APIO22_game) C++17
0 / 100
1 ms 2644 KB
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
#define MAX_N 300010

int N,K;
int L[MAX_N],E[MAX_N];

void init(int n, int k) {
    N = n;
    K = k;
    for(int i=0;i<k;i++){
        L[i] = i-1;
        if (i<k-1) E[i] = i+1;
        else E[i] = N+2;
    }
    for(int i=k;i<n;i++){
        L[i] = -1;
        E[i] = N+2;
    }
}

int add_teleporter(int u, int v) {
    if (E[v]<=L[u]) return 1;
    E[u] = min(E[u],E[v]);
    L[v] = max(L[v],L[u]);
    
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Wrong Answer[1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Wrong Answer[1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Wrong Answer[1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Wrong Answer[1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Wrong Answer[1]
2 Halted 0 ms 0 KB -