結果
問題 |
No.1165 Paint Squares
|
ユーザー |
![]() |
提出日時 | 2020-08-13 22:23:08 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 417 bytes |
コンパイル時間 | 3,970 ms |
コンパイル使用メモリ | 191,828 KB |
最終ジャッジ日時 | 2025-01-12 22:03:38 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include <bits/stdc++.h> using namespace std; #define MOD 1000000007 ll modpow(ll x,ll n){ ll ans=1; while(n){ if(n&1) ans=ans*x %MOD; x=x*x %MOD; n/=2; } return ans; } int main() { ll p,q; cin>>p>>q; cout<<((modpow(2,p-2)+modpow(2,q-2)-1)%MOD)*24%MOD<<endl; return 0; }