結果
| 問題 |
No.111 あばばばば
|
| コンテスト | |
| ユーザー |
m1025o1184t
|
| 提出日時 | 2019-12-15 02:31:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 451 bytes |
| コンパイル時間 | 1,521 ms |
| コンパイル使用メモリ | 168,332 KB |
| 実行使用メモリ | 817,152 KB |
| 最終ジャッジ日時 | 2024-06-28 11:23:23 |
| 合計ジャッジ時間 | 4,543 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 RE * 1 MLE * 1 -- * 2 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int l;
cin >> l;
vector<ll> dp(l + 2);
vector<ll> sub_dp(l + 2);
dp[3] = 1;
sub_dp[3] = 1;
for (int i = 5; i <= l; i += 2) {
dp[i] = dp[i - 2] + sub_dp[i - 2] + 2;
sub_dp[i] = sub_dp[i - 2] + 2;
}
cout << dp[l] << endl;
return 0;
}
m1025o1184t