# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
667594 | 2022-12-01T18:31:05 Z | mychecksedad | Star Trek (CEOI20_startrek) | C++17 | 15 ms | 23832 KB |
/* Author : Mychecksdead */ #include<bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef long long int ll; typedef long double ld; #define MOD1 (1000000000+7) #define MOD (998244353) #define PI 3.1415926535 #define pb push_back #define setp() cout << setprecision(15) #define all(x) x.begin(), x.end() #define debug(x) cerr << #x << " is " << x << '\n'; const int N = 1e6+100, M = 1e5+10, F = 2147483646, K = 20; ll po(ll a, ll b){ ll res = 1; while(b){ if(b&1) (res *= a) %= MOD; (a *= a) %= MOD; b >>= 1; } return res; } ll n, d; vector<int> g[N]; void solve(){ cin >> n >> d; for(int i = 0 ; i < n - 1; ++i){ int u, v; cin >> u >> v; g[u].pb(v); g[v].pb(u); } cout << po(4, d); } int main(){ cin.tie(0); ios::sync_with_stdio(0); int T = 1, aa; // cin >> T;aa=T; while(T--){ // cout << "Case #" << aa-T << ": "; solve(); cout << '\n'; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 12 ms | 23764 KB | Output is correct |
2 | Incorrect | 13 ms | 23832 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 13 ms | 23700 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 15 ms | 23708 KB | Output is correct |
2 | Incorrect | 13 ms | 23764 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 15 ms | 23708 KB | Output is correct |
2 | Incorrect | 13 ms | 23764 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 15 ms | 23708 KB | Output is correct |
2 | Incorrect | 13 ms | 23764 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 15 ms | 23708 KB | Output is correct |
2 | Incorrect | 13 ms | 23764 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 15 ms | 23708 KB | Output is correct |
2 | Incorrect | 13 ms | 23764 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 12 ms | 23764 KB | Output is correct |
2 | Incorrect | 13 ms | 23832 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |