10 2022 档案
摘要:线段树是一种通用的数据结构,能够处理满足结合律的信息。 前置知识 线段树 基础版 struct node { int l, r; // TODO: information and tag int lazy, val; // int sum; } tr[N * 4]; void modify(int
阅读全文
摘要:A 寂寞如雪 今天你寂寞吗? 题目内容 题目分析 本题题意即为求最大子段和,由于奇数段和偶数段仅与子段左端点 的奇偶性有关,因此我们扫描两边,一遍奇数段,一遍偶数段即可。此外,本题输入处理也有一些难点,细节请看代码。 代码实现 #include <bits/stdc++.h> using n
阅读全文
摘要:防止一切因为忘记模数而导致爆 0 的事情发生! template <int mod> struct mint { unsigned int _v; mint() : _v(0) {} template <class T> mint(T v) { ll x = (ll)(v % (ll)(umod()
阅读全文
摘要:  ![img]
阅读全文
摘要:C++ #include <bits/stdc++.h> using namespace std; int main() { cout << "Hello World" << endl; return 0; } Python print("Hello World"); Java public cla
阅读全文