Codeforces Round 982 (Div. 2)
A. Rectangle Arrangement 取最大值的正确性:凸阶梯形平移后即是矩形,其周长与矩形周长相等。 123456789101112131415161718192021222324252627#include <bits/stdc++.h>using namespace std;using ll = long long;int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n; cin >> n; int X = 0, Y = 0; while (n--) { int x, y; cin >> x >> y; X = max(X, x); Y = max(Y, y);...
Codeforces Global Round 27 A-D
A. Sliding 12345678910111213141516171819202122#include <bits/stdc++.h>using namespace std;using ll = long long;int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { ll n, m, r ,c; cin >> n >> m >> r >> c; ll ans = (n - r) * (2 * m - 1); ans += (m - c); cout << ans << "\n"; } return 0;} B. Everyone Loves Tres 依据样例,奇数是...
Codeforces Round 981 (Div. 3)
如果没有特殊情况,以后每场 CF 都会写题解 > < A. Sakurako and Kosuke 奇偶题。 1234567891011121314151617181920#include <bits/stdc++.h>using namespace std;using ll = long long;int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n; cin >> n; cout << (n & 1 ? "Kosuke" : "Sakurako") << "\n"; } return 0;} B. Sakurako and Water 统计 2n−12n-12n−1...
数据结构第七讲:二叉树基本概念
數據結構第七講:二叉樹基本概念
〔主机註記〕第 37 周主机註記 (Oct.21 - Oct.27)
第 37 周主机註記 月曜日 (Oct.21) 火曜日 (Oct.22) 水曜日 (Oct.23) 木曜日 (Oct.24) 金曜日 (Oct.25) 土曜日 (Oct.26) 日曜日 (Oct.27)
[和師姐一起學數學]信号与系统 第三章 离散时间系统的时域分析
信號與系統 第三章 離散時間系統的時域分析
Codeforces Round 980 (Div2A-Div1C)
2A. Profitable Interest Rate 12345678910111213141516171819#include <bits/stdc++.h>using namespace std;int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int a, b; cin >> a >> b; cout << max(0, a >= b ? a : 2 * a - b) << "\n"; } return 0;} 2B. Buying Lemonade 12345678910111213141516171819202122232425262728293031323334#include...
数据结构第六讲:树的基本概念
數據結構第六講:樹的基本概念
[和師姐一起學數學]信号与系统 第四章 连续时间信号与系统的频域分析(上)
信號與系統 第四章 連續時間信號與系統的頻域分析(上)
〔主机註記〕第 36 周主机註記 (Oct.14 - Oct.20)
第 36 周主机註記 月曜日 (Oct.14) 火曜日 (Oct.15) 水曜日 (Oct.16) 木曜日 (Oct.17) 金曜日 (Oct.18) 土曜日 (Oct.19) 日曜日 (Oct.20)