Submission #534929

# Submission time Handle Problem Language Result Execution time Memory
534929 2022-03-09T07:10:17 Z vector Star Trek (CEOI20_startrek) C++17
0 / 100
2 ms 2636 KB
#include<bits/stdc++.h>
#define MOD 1000000007
#define SIZE 100010
using namespace std;
typedef long long ll;
ll N,D;
vector<ll>con[SIZE];
ll F(ll x,ll y)
{
    if(y==0)return 1;
    if(y==1)return x;
    ll ret=F(x,y>>1);
    ret=(ret*ret)%MOD;
    if(y%2)ret=(ret*x)%MOD;
    return ret;
}
int main()
{
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    cin>>N>>D;
    for(int i=1;i<N;i++){
        ll s,e;cin>>s>>e;
        con[s].push_back(e);
        con[e].push_back(s);
    }
    printf("%lld",F(2,D)-1);
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2636 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2636 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2636 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2636 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2636 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2636 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2636 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2636 KB Output isn't correct
2 Halted 0 ms 0 KB -