結果
| 問題 |
No.53 悪の漸化式
|
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2021-10-21 19:56:18 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 453 bytes |
| コンパイル時間 | 4,783 ms |
| コンパイル使用メモリ | 250,768 KB |
| 最終ジャッジ日時 | 2025-01-25 02:31:27 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 4 |
ソースコード
#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000
int main(){
int N;
cin>>N;
vector<long double> ans(101);
ans[0] = 4;
ans[1] = 3;
for(int i=2;i<=100;i++){
ans[i] = ans[i-1] * 19 - ans[i-2] * 12;
ans[i] /= 4.0;
}
cout<<fixed<<setprecision(15)<<ans[N]<<endl;
return 0;
}
沙耶花