teamnote history merge

This commit is contained in:
2026-06-03 09:36:52 +09:00
parent f50ed902fe
commit 7176febe54
142 changed files with 13243 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
ll floor_sum(ll a, ll b, ll c, ll n)
{
if(a>=c or b>=c) return n*(n-1)/2 * (a/c) + n * (b/c) + floor_sum(a%c, b%c, c, n);
if(a == 0) return b/c*n;
ll m = (a*(n-1)+b)/c;
return m*(n-1) - floor_sum(c, c-b-1, a, m);
}