結果
| 問題 | No.557 点対称 |
| コンテスト | |
| ユーザー |
mogurocker
|
| 提出日時 | 2017-10-15 04:33:30 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 548 bytes |
| 記録 | |
| コンパイル時間 | 1,509 ms |
| コンパイル使用メモリ | 157,284 KB |
| 実行使用メモリ | 13,824 KB |
| 最終ジャッジ日時 | 2024-11-17 15:07:50 |
| 合計ジャッジ時間 | 41,000 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 TLE * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for(int i = 0; i < (n); i++)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())
typedef long long ll;
typedef pair<int, int> P;
int n;
ll MOD = 1000000007;
int main(int argc, char const *argv[]) {
ios_base::sync_with_stdio(false);
cin >> n;
if (n == 1) cout << 2 << endl;
else {
ll ret = 4;
FOR(i, n/2-1) ret = ret * 5 % MOD;
if (n & 1) ret = ret * 3 % MOD;
cout << ret << endl;
}
return 0;
}
mogurocker