2 ms·
There is actually a community of ~20000 people using some forms of this: codeforces.com. The most used approach are lots of macros in C++ to completely modify t
by yrwiovhd02 6y ago
There is actually a community of ~20000 people using some forms of this: codeforces.com. The most used approach are lots of macros in C++ to completely modify the language. One popular alternative is https://cpeditor.org/ https://cpeditor.org/.
For example, look at how Benjamin Qi does it:
https://codeforces.com/contest/1446/submission/98447974 https://codeforces.com/contest/1446/submission/98447974
The actual code is at the bottom. Here is a sample of a submission to a problem harder than your usual AoC second part:
int main() {
setIO(); re(N,M);
str A,B; re(A,B);
F0R(i,N+2) F0R(j,M+2) mx[i][j] = -MOD;
int ans = 0;
R0F(i,N) R0F(j,M) {
ckmax(mx[i][j],mx[i+1][j]);
ckmax(mx[i][j],mx[i][j+1]);
if (A[i] == B[j]) {
dp[i][j] = 2;
ckmax(dp[i][j],mx[i+1][j+1]+4+i+j);
ckmax(mx[i][j],dp[i][j]-i-j);
ckmax(ans,dp[i][j]);
}
}
ps(ans);
}