Submission #559027

# Submission time Handle Problem Language Result Execution time Memory
559027 2022-05-09T09:04:14 Z Stickfish Star Trek (CEOI20_startrek) C++17
0 / 100
2 ms 2644 KB
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;

const int MAXN = 1e5 + 123;
const ll MOD = 1000000007;
vector<int> edg[MAXN];

ll pw(ll a, ll m) {
    if (!m)
        return 1;
    a %= MOD;
    if (m % 2)
        return pw(a, m - 1) * a % MOD;
    return pw(a * a, m >> 1);
}

signed main() {
    ll n, d;
    cin >> n >> d;
    for (int i = 1; i < n; ++i) {
        int u, v;
        cin >> u >> v;
        --u, --v;
        edg[u].push_back(v);
        edg[v].push_back(u);
    }
    if (n == 2) {
        cout << pw(2, d) << endl;
        return 0;
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -