이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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);
}
컴파일 시 표준 에러 (stderr) 메시지
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;
| ^~~
# | 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... |