Submission #916123

# Submission time Handle Problem Language Result Execution time Memory
916123 2024-01-25T10:45:30 Z Abito Amusement Park (JOI17_amusement_park) C++14
0 / 100
20 ms 4964 KB
#include "Joi.h"
#include <bits/stdc++.h>
using namespace std;
void Joi(int N, int M, int A[], int B[], long long X, int T) {
    for (int i=0;i<N;i++) MessageBoard(i,bool(X&(1<<(i%60))));
    return;
}
#include "Ioi.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
const int NN=1e4+5;
vector<int> adj[NN];
int n,m;
long long X=0;
bool vis[NN];
void dfs(int node,int p){
    vis[node]=true;
    for (auto u:adj[node]){
        if (vis[u]) continue;
        X|=((long long)Move(u)<<(u%60));
        dfs(u,node);
    }
    if (p!=-1) X|=((long long)Move(p)<<(p%60));
    return;
}
long long Ioi(int N, int M, int A[], int B[], int P, int V, int T) {
    n=N,m=M;
    for (int i=0;i<m;i++){
        adj[A[i]].pb(B[i]);
        adj[B[i]].pb(A[i]);
    }
    X|=((long long)V<<(P%60));
    dfs(P,-1);
    for (int i=0;i<m;i++) adj[i].clear();
    return X;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1052 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 18 ms 4784 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 1052 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 20 ms 4876 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 17 ms 4964 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -