結果
問題 | No.269 見栄っ張りの募金活動 |
ユーザー |
![]() |
提出日時 | 2025-02-15 01:01:06 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 10 ms / 5,000 ms |
コード長 | 9,598 bytes |
コンパイル時間 | 3,256 ms |
コンパイル使用メモリ | 274,436 KB |
実行使用メモリ | 20,252 KB |
最終ジャッジ日時 | 2025-02-15 01:01:21 |
合計ジャッジ時間 | 4,311 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
/*@author : LEOmnel_CHEEMSsi_420AGUANTE CORAZON, AGUANTESOMOS TODOS MONTIEL!!!!EL DIBU MARTINEZ !!!!!HABIA QUE CREER CARAJO NOMAS !!!!!La cumbia de los Cheems :v....Viene el fin de semana, todo' a la cancha vamos a irEst� todo preparado, el bombo y el trapo para salirAl equipo que tiene m�s aguanteLo llevo dentro del coraz�nSaltando, cantando, prendidos a los traposDejamos el almaaaaaaa.... en el scoredale dale Cheems! dale Cheeeeeeeemmmsss !!!!!----------------------------------------------------------------Pal MbapCheems:Escuchen, corran la bolajuegan en Francia pero son todos de AngolaQue lindo eeees van a correeerson cometrabas como el puto de MbappeSu vieja es nigerianaSu viejo camerunesPero en el documento.... nacionalidad frances----------------------------------------------------------------EL MESSIas <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Q.E.P.D Cheemsito :'v????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????*/#include <iostream>#include <bits/stdc++.h>using namespace std;typedef long long int ll;typedef unsigned long long int ull;#define pb push_back#define pf push_front#define lb lower_bound#define ub upper_bound#define all(v) v.begin(),v.end()#define rall(v) v.rbegin(),v.rend()#define ii pair<int,int>#define iii pair<int, ii>#define iiii pair<ii,ii>/*#define typeOfData ii#include <ext/pb_ds/assoc_container.hpp>#include <ext/pb_ds/tree_policy.hpp>#define ordered_set tree<typeOfData, null_type,less<typeOfData>, rb_tree_tag,tree_order_statistics_node_update>using namespace __gnu_pbds;*/#define LINE if(debug) { cerr << " ------------------------------------------ " << endl; }#define debug1(A) if(debug) { cerr << "? " << #A << " : " << A << endl; }#define debug2(A, B) if(debug) { cerr << "? [ " << #A << " = " << A << " | " << #B << " = " << B << " ]" << endl; }#define debug3(A, B, C) if(debug) { cerr << "? [ " << #A << " = " << A << " | " << #B << " = " << B << " | " << #C << " = " << C << " ]" <<endl; }#define debug4(A, B, C, D) if(debug) { cerr << "? [ " << #A << " = " << A << " | " << #B << " = " << B << " | " << #C << " = " << C << " | " <<#D << " = " << D << " ]" << endl; }#define debugPair(a) if(debug) { cerr << "? " << #a << ": ( " << a.first << " , " << a.second << " )" << endl; }#define debugList(A) if(debug) { cerr << "? " << #A << ": "; if(debug) { bool leonelCheems = 0; cerr << "[ "; for(auto x : A) { if(!leonelCheems) cerr << x , leonelCheems = 1; else cerr << " , " << x ;} cerr << " ]" << endl; } }#define printList(A) { bool leonelCheems = 0; for(auto x : A) { if(!leonelCheems) {cout << x; leonelCheems = 1;}else {cout << " " << x;}}cout << endl; }#define debugIterablePairs(P) if(debug) { cerr << "? " << #P << " : "; cerr << "{ " << endl; for(auto it : P) { cerr << " " << it.first << " ->" << it.second << endl; } cerr << "} " << endl; }#define debugGraph(GP) if(debug) { cerr << "? " << #GP << " = "; cerr << "{ " << endl; int cntNodes = 0; for(vi adj : GP) { if(adj.size()) {cerr << " "; cerr << cntNodes << " => "; debugList(adj) } cntNodes ++;} cerr << "}" << endl;}#define debugGraphWeight(GP) if(debug) { cerr << "? " << #GP << " = {" << endl; int cntNodes = 0; for(auto it : GP ){ if( it.size() ){ cerr <<cntNodes << " => [ "; for(auto iter : it){ cerr << iter.first << "-w{" << iter.second << "} "; } cerr << "]" << endl; } cntNodes++; } }#define debugMatrix(arr,F, C) if(debug) { cerr << "? " << #arr << endl; for(int i = 0 ; i < F ; i++){ cerr << "[ "; for(int j = 0 ; j < C ; j++){cerr << arr[i][j] << " "; } cerr << "]" << endl;} }#define executeTime cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";#define FOR(i, l, r) for(int i = l; i < r ; i ++)#define endl '\n';#define SZ(A) (int)A.size()typedef vector<int> vi;typedef vector<ii> vii;typedef vector<ll> vll;const int N = 1e5 + 9;const int mod = 1e9 + 7;const int inf = 2e9 + 9;const ll modL = 1e9 + 7;const ll infL = 2e18 + 9;const double pi = acos(-1);/*int Kx[8] = {1, 2, 2, 1, -1, -2, -2, -1};int Ky[8] = {-2, -1, 1, 2, 2, 1, -1, -2};int X[8] = {-1, 0, 1, 0, -1, 1, 1, -1};int Y[8] = {0, 1, 0, -1, 1, 1, -1, -1};*/// si no vas por todo, anda pa ash� bobo// mirame a la cara, lo siento pero te como hermano * bailecito *void init();bool debug = { 1 };ll dp[109][20009];void cumbia420PaLosCheems(int testCase) { /* ESTA VA POR CHEEMSITO :'v */ll n, s, k;cin >> n >> s >> k;s -= k * n * (n - 1) / 2;if(s < 0) {cout << 0 << endl; return;}dp[0][0] = 1;FOR(i, 1, n + 1) {FOR(j, 0, s + 1) {if (j - i >= 0) dp[i][j] = (dp[i - 1][j] + dp[i][j - i]) % modL;else dp[i][j] = dp[i - 1][j] % modL;}}cout << dp[n][s] << endl;}int main() {cin.tie(0); ios_base::sync_with_stdio(0);init();int t = 1;//cin >> t;FOR(i, 1, t + 1) cumbia420PaLosCheems(i);return 0;}void init() {//freopen("ccski.in", "r", stdin);//freopen("ccski.out", "w", stdout);if(debug)cerr << "mira que te como hermanoo !!! " << endl;}