結果
| 問題 |
No.1877 俺自身が線グラフになることだ
|
| コンテスト | |
| ユーザー |
monnu
|
| 提出日時 | 2022-03-18 21:39:35 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 522 bytes |
| コンパイル時間 | 3,679 ms |
| コンパイル使用メモリ | 228,976 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-03 06:25:42 |
| 合計ジャッジ時間 | 4,175 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll=long long;
using Graph=vector<vector<pair<int,char>>>;
#define MAX 1000
#define MOD 1000000007
//#define MOD 998244353
//#define INF 1000000000
#define INF 1000000000000000000
int main(){
int N;
cin>>N;
if(N==1||N==2){
cout<<0<<'\n';
}else{
vector<int> dp(N+1,0);
dp[0]=1;
for(int d=3;d<=N;d++){
for(int i=0;i+d<=N;i++){
dp[i+d]+=dp[i];
}
}
cout<<dp[N]<<'\n';
}
}
monnu