# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
585566 | 2022-06-29T05:11:32 Z | 반딧불(#8385) | Star Trek (CEOI20_startrek) | C++17 | 3 ms | 2656 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1000000007; ll mpow(ll x, ll y){ if(!y) return 1; if(y%2) return mpow(x, y-1) * x % MOD; ll tmp = mpow(x, y/2); return tmp*tmp%MOD; } int n; ll k; vector<int> link[100002]; int main(){ scanf("%d %lld", &n, &k); for(int i=1; i<n; i++){ int x, y; scanf("%d %d", &x, &y); link[x].push_back(y); link[y].push_back(x); } printf("%lld", mpow(4, k)); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2656 KB | Output is correct |
2 | Incorrect | 3 ms | 2644 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2644 KB | Output is correct |
2 | Correct | 2 ms | 2652 KB | Output is correct |
3 | Correct | 3 ms | 2652 KB | Output is correct |
4 | Correct | 3 ms | 2648 KB | Output is correct |
5 | Correct | 2 ms | 2644 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2644 KB | Output is correct |
2 | Incorrect | 2 ms | 2548 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2644 KB | Output is correct |
2 | Incorrect | 2 ms | 2548 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2644 KB | Output is correct |
2 | Incorrect | 2 ms | 2548 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2644 KB | Output is correct |
2 | Incorrect | 2 ms | 2548 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2644 KB | Output is correct |
2 | Incorrect | 2 ms | 2548 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2656 KB | Output is correct |
2 | Incorrect | 3 ms | 2644 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |