結果
| 問題 | No.557 点対称 |
| コンテスト | |
| ユーザー |
whogoh
|
| 提出日時 | 2017-08-21 20:22:13 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 641 bytes |
| 記録 | |
| コンパイル時間 | 761 ms |
| コンパイル使用メモリ | 94,052 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-02 12:12:37 |
| 合計ジャッジ時間 | 8,417 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 11 TLE * 2 |
ソースコード
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
static const double pi = 3.14159265358979323846;
long long mod = 1000000007;
int main(){
int N;
cin >> N;
if(N==1) {cout << 2 << endl; return 0;}
bool even = N%2 == 0;
long long ret = 1;
for(int i=0; i<(N+1)/2; i++){
if(i==0) {ret *= 4; ret %= mod;}
else if (i==((N+1)/2-1)){
if(even) {ret *= 5; ret %= mod;}
else {ret *= 3; ret %= mod;}
}
else{
ret *= 5; ret %= mod;
}
}
cout << ret << endl;
return 0;
}
whogoh