| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1289197 | daffuwu | Star Trek (CEOI20_startrek) | C++20 | 1 ms | 572 KiB |
#include <bits/stdc++.h>
using namespace std;
#define fr first
#define sc second
//startrek
int n, u, v, ans;
long long d;
const int dv = 1e9+7;
int fe(int x, long long y)
{
int res = 1;
for (; y>0; y/=2)
{
if (y%2==1) res = 1ll*res*x%dv;
x = 1ll*x*x%dv;
}
return res;
}
int main()
{
int i;
scanf("%d%lld", &n, &d);
for (i=1; i<=n-1; i++)
{
scanf("%d%d", &u, &v);
}
printf("%d\n", fe(2, d));
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
