답안 #566846

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
566846 2022-05-23T03:41:16 Z azberjibiou Star Trek (CEOI20_startrek) C++17
7 / 100
1 ms 324 KB
#include <bits/stdc++.h>
#define gibon ios::sync_with_stdio(false); cin.tie(0);
#define fir first
#define sec second
#define pdd pair<long double, long double>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define ld long double
#define pmax pair<__int128, __int128>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
typedef long long ll;
using namespace std;
int dx[4]= {0, 1, 0, -1}, dy[4]= {1, 0, -1, 0};
int ddx[8]={1, 1, 0, -1, -1, -1, 0, 1}, ddy[8]={0, 1, 1, 1, 0, -1, -1, -1};
const int mxN=100025;
const int mxM=300005;
const int mxK=1000000000;
const ll MOD=1'000'000'007;
const ll INF=1000000000000000005;
ll N, D;
ll mypow(ll a, ll b)
{
    if(b==0)    return 1;
    if(b==1)    return a%MOD;
    ll tmp=mypow(a, b/2);
    tmp*=tmp;   tmp%=MOD;
    if(b%2) tmp*=a; tmp%=MOD;
    return tmp;
}
int main()
{
    gibon
    cin >> N >> D;
  	ll ans=1;
  	cout << mypow(4, D);
}

Compilation message

startrek.cpp: In function 'll mypow(ll, ll)':
startrek.cpp:29:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   29 |     if(b%2) tmp*=a; tmp%=MOD;
      |     ^~
startrek.cpp:29:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   29 |     if(b%2) tmp*=a; tmp%=MOD;
      |                     ^~~
startrek.cpp: In function 'int main()':
startrek.cpp:36:7: warning: unused variable 'ans' [-Wunused-variable]
   36 |    ll ans=1;
      |       ^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 324 KB Output is correct
5 Correct 1 ms 320 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -