// compile: g++ -o data data.cpp -O3 -std=gnu++20 -Wall -Wextra -Wshadow -D_GLIBCXX_ASSERTIONS -ggdb3 -fmax-errors=2 -DLOCAL
// run: ./data < data.in
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#ifdef LOCAL
#include <debug/codeforces.h>
#define debug(x...) {_variables(#x);_print(x);}
#else
#define debug(x...)
#endif
template<typename...Args> void print_(Args...args){((cout<<args<<" "),...)<<endl;}
#define rep(i,a,b) for(int i=(a);i<(int)(b);++i)
#define sz(v) ((int)(v).size())
#define print(...) print_(__VA_ARGS__);
#define INTMAX (int)(9223372036854775807)
#define INTINF (int)(1152921504606846976)
#define int long long
// #define MAXN 1000010
#define MAXN 2050
int dp[MAXN*MAXN];
int f[MAXN][MAXN];
int32_t main() {
ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
int cnt = 1;
for (int i = 1; i < MAXN; ++i) for (int j = 1; j <= i; ++j) f[i][j] = cnt++;
memset(dp, 0, sizeof(dp));
dp[1] = 1*1;
for (int i = 2; i < MAXN; ++i) {
for (int j = 1; j <= i; ++j) {
int k = f[i][j];
int a = f[i-1][j-1], b = f[i-1][j], c = f[i-2][j-1];
dp[k] = dp[a] + dp[b] - dp[c] + k*k;
}
}
int _; cin >> _;
while (_--) {
int n; cin >> n;
cout << dp[n] << endl;
}
return 0;
}
Finding the official 188bet login can be tricky, but this link works like a charm. Secure and straightforward. Get to betting quick! Access here: 188betlogin
Playb52club is where the real action is at! I love the variety of games and the rewards are seriously awesome. If you’re looking for a fun and thrilling online gaming experience, this is it. Don’t miss out! More details : playb52club
taib29 is my new spot for quick bets. The site is straightforward, and depositing funds was hassle-free. I recommend taib29 to anyone looking for entertainment!
The most reliable login page I have used so far. No lag and the connection is stable even on mobile data. Cheers to jili65login for the great service.
The community here is awesome and the games are always updated. It is my go to spot for some weekend excitement. Check out vnfl88.
The variety of games is insane! I love how everything is organized and the customer support is actually helpful. Big thanks to impor88 for the great service.