제출 #1289279

#제출 시각아이디문제언어결과실행 시간메모리
1289279daffuwuStar Trek (CEOI20_startrek)C++20
7 / 100
1 ms648 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(4, d)); }

컴파일 시 표준 에러 (stderr) 메시지

startrek.cpp: In function 'int main()':
startrek.cpp:25:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   25 |     scanf("%d%lld", &n, &d);
      |     ~~~~~^~~~~~~~~~~~~~~~~~
startrek.cpp:28:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   28 |         scanf("%d%d", &u, &v);
      |         ~~~~~^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...