摘要:
#include <iostream> using namespace std; bool Mul_ = false; #define i64 long long const int N = 1e3 + 10; i64 cnt = 0; i64 numstk[N]; char opstk[N]; i 阅读全文
摘要:
The 2024 CCPC Online Contest 补题连接:https://codeforces.com/gym/105336 D. 编码器-解码器 考虑dp,\(dp(i,j,k)\)表示 \(T\) 的子串 \(T[j,k]\)(下标 \(j\) 到下标 \(k\) )在 \(S_{i} 阅读全文
摘要:
The 2024 Shanghai Collegiate Programming Contest 补题连接:https://codeforces.com/gym/105229 M. 不共戴天 观察样例2,注意到6个荷叶两两分成一组,共分为3组 (1,2)(3,4)(5,6) 其中对于青蛙的策略是组内 阅读全文
摘要:
计算机网络 总分100 = 期中20 + 期末50 + 实验20 + 平时10 (期中考前三章,期末考后三章) 第一章 概述 1.1 互联网两个重要基本特点:连通性、共享 连通性:上网用户交换各种信息 共享:指资源共享,可以是信息共享、软件共享、硬件共享 1.2 网络把许多计算机连接在一起,互连网把 阅读全文
摘要:
数学知识:https://blog.sengxian.com/algorithms/linear-basis 题单:https://www.luogu.com.cn/training/11251#information 线性基用于解决最大异或和问题等 题目: J:https://codeforces 阅读全文
摘要:
题目: AcWing 830. 单调栈:https://www.acwing.com/problem/content/832/ 单调栈 + 并查集: AcWing 1275. 最大数:https://www.acwing.com/problem/content/1277/ B:https://cod 阅读全文
摘要:
The 8th Hebei Collegiate Programming Contest 补题连接:https://codeforces.com/gym/105184 A. Update #include <bits/stdc++.h> using namespace std; int main() 阅读全文
摘要:
思路题,set有序,lower_bound(a)可以二分寻找set中最接近的大于等于它的数 #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; set<int> s; for(int i = 1; i 阅读全文
摘要:
使用 set_intersection() 判断两个集合之间重复元素,时间复杂度最坏O(nlogn),最好O(n) #include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; vector<s 阅读全文
摘要:
占位符不要用%#*^之类的,测试点5和7会被卡 #include <bits/stdc++.h> using namespace std; void print(string s) { for(auto si : s) if(si == '{') cout << "<censored>"; else 阅读全文