結果
問題 |
No.1136 Four Points Tour
|
ユーザー |
|
提出日時 | 2022-08-20 15:59:51 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 2,000 ms |
コード長 | 606 bytes |
コンパイル時間 | 1,669 ms |
コンパイル使用メモリ | 147,144 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-09 08:36:52 |
合計ジャッジ時間 | 52,554 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 TLE * 16 |
ソースコード
#define _USE_MATH_DEFINES #include<iostream> #include<vector> #include<algorithm> #include<cmath> #include<string> #include<iomanip> #include<numeric> #include<queue> #include<deque> #include<stack> #include<set> #include<map> #include<random> #include<bitset> #include<cassert> #include<complex> #include<fstream> #include<cstdlib> #include<functional> #include<array> using namespace std; typedef long long ll; const int mod=1e9+7; const int dx[]={1,0,0,-1},dy[]={0,1,-1,0}; int main(){ int n; cin>>n; int a=1,o=0; for(int i=0;i<n;i++) tie(a,o)=make_pair(3ll*o%mod,(a+2ll*o)%mod); cout<<a<<endl; }