답안 #994075

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
994075 2024-06-07T05:45:29 Z irmuun Amusement Park (JOI17_amusement_park) C++17
0 / 100
17 ms 4116 KB
#include<bits/stdc++.h>
#include "Joi.h"

using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()

void Joi(int N, int M, int A[], int B[], long long X, int T){
    for(int i=0;i<N;i++){
        if(i<60&&(X&(1ll<<i))){
            MessageBoard(i,1);
        }
        else{
            MessageBoard(i,0);
        }
    }
}
#include<bits/stdc++.h>
#include "Ioi.h"

using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()

const int maxn=1e4+5;

vector<int>adj[maxn],num(maxn,0);
vector<bool>used(maxn,0);

void dfs(int x,int p){
    used[x]=true;
    for(int y:adj[x]){
        if(y!=p){
            int val=Move(y);
            num[y]=val;
            dfs(y,x);
        }
    }
    if(p>-1){
        Move(p);
    }
}

long long Ioi(int N, int M, int A[], int B[], int P, int V, int T){
    num[P]=V;
    for(int i=0;i<M;i++){
        adj[A[i]].pb(B[i]);
        adj[B[i]].pb(A[i]);
    }
    dfs(P,-1);
    long long ans=0;
    for(int i=0;i<60;i++){
        if(num[i]==1) ans+=(1ll<<i);
    }
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1044 KB Output is correct
2 Correct 0 ms 1056 KB Output is correct
3 Correct 0 ms 1056 KB Output is correct
4 Correct 0 ms 1052 KB Output is correct
5 Correct 1 ms 1048 KB Output is correct
6 Correct 0 ms 1056 KB Output is correct
7 Correct 1 ms 1052 KB Output is correct
8 Correct 1 ms 1060 KB Output is correct
9 Correct 0 ms 1052 KB Output is correct
10 Incorrect 1 ms 1312 KB Wrong Answer [8]
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 13 ms 3972 KB Wrong Answer [8]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1040 KB Output is correct
2 Correct 0 ms 1044 KB Output is correct
3 Correct 0 ms 1044 KB Output is correct
4 Incorrect 2 ms 1344 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 17 ms 4116 KB Wrong Answer [8]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 14 ms 3884 KB Wrong Answer [8]
2 Halted 0 ms 0 KB -