摘要: 坐标变换:令\(y_i=x_i+2i\) 2147483648=\(2^{31}\) 缺少的一位是符号位 点击查看代码 #include <bits/stdc++.h> using namespace std; vector<int>ans; int main() { long long n; ci 阅读全文
posted @ 2024-07-23 17:06 D06 阅读(2) 评论(0) 推荐(0) 编辑
摘要: s.find()函数可以直接返回位置 点击查看代码 #include <bits/stdc++.h> using namespace std; bool check(string s) { for(int i=0;i<s.size();i++) { if(s[i]=='=') { return tr 阅读全文
posted @ 2024-07-23 12:20 D06 阅读(3) 评论(0) 推荐(0) 编辑
摘要: ios::sync_with_stdio(false); cin.tie(0); \(\Uparrow\) 关闭同步/解除绑定,可以优化读入字符串的效率 这行代码的缺失,不仅导致程序在本地运行时需要过好几秒才能读入数据,更导致程序在OJ上评测时TLE 时隔半年,自己还能独自完成KMP和AC自动机的代 阅读全文
posted @ 2024-07-23 12:09 D06 阅读(35) 评论(0) 推荐(1) 编辑