結果
| 問題 |
No.269 見栄っ張りの募金活動
|
| コンテスト | |
| ユーザー |
momotaros300
|
| 提出日時 | 2019-12-10 14:28:18 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 995 bytes |
| コンパイル時間 | 714 ms |
| コンパイル使用メモリ | 90,044 KB |
| 実行使用メモリ | 19,276 KB |
| 最終ジャッジ日時 | 2024-06-24 01:49:01 |
| 合計ジャッジ時間 | 1,620 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 5 WA * 17 |
ソースコード
#include <iostream>
#include <tuple>
#include <sstream>
#include <vector>
#include <cmath>
#include <ctime>
#include <cassert>
#include <cstdio>
#include <queue>
#include <set>
#include <map>
#include <fstream>
#include <cstdlib>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
using namespace std;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define range(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define _GLIBCXX_DEBUG
typedef long long ll;
typedef double db;
typedef string str;
// head
int main(){
int n,s,k;
cin >> n >> s >> k;
ll dp[101][20000];
int maxs = s-k*(k-1)/2*n;
range(i,1,n+1){
range(j,maxs+1){
if (j-i>=0){
dp[i][j]=dp[i-1][j];
}
else{
dp[i][j]=dp[i-1][j]+dp[i][j-i];
}
}
}
cout << dp[n][maxs];
}
momotaros300