Submission #534932

# Submission time Handle Problem Language Result Execution time Memory
534932 2022-03-09T07:13:50 Z vector Star Trek (CEOI20_startrek) C++17
7 / 100
3 ms 2640 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/2);
    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(4,D));
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2636 KB Output is correct
2 Incorrect 1 ms 2636 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2636 KB Output is correct
2 Correct 2 ms 2636 KB Output is correct
3 Correct 3 ms 2636 KB Output is correct
4 Correct 2 ms 2640 KB Output is correct
5 Correct 2 ms 2636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2636 KB Output is correct
2 Incorrect 2 ms 2636 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2636 KB Output is correct
2 Incorrect 2 ms 2636 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2636 KB Output is correct
2 Incorrect 2 ms 2636 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2636 KB Output is correct
2 Incorrect 2 ms 2636 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2636 KB Output is correct
2 Incorrect 2 ms 2636 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2636 KB Output is correct
2 Incorrect 1 ms 2636 KB Output isn't correct
3 Halted 0 ms 0 KB -