摘要:
矩阵算法 扫描线线段树 单调栈 扫描线 int a[N][M], n, m; int l[N][N], r[N][N], h[N][N];//向左,右,上最远 int read() { char c = getchar(); while (c != '1' && c != '0')c = getch 阅读全文
摘要:
2021牛客暑期多校训练营1 A - Alice and Bob 由必败态去把其他状态推出来, 其实只记录必败态就行了 #include <bits/stdc++.h> using namespace std; int main() { vector<vector<bool>> f(5001, ve 阅读全文
摘要:
AtCoder Beginner Contest 210 A - Cabbages int main() { IOS; ll n, a, x, y, ans = 0; cin >> n >> a >> x >> y; if (n > a) ans = a * x + (n - a) * y; els 阅读全文