zhangjitong
zhangjitong
全部文章
分类
题解(13)
归档
标签
去牛客网
登录
/
注册
zhangjitong的博客
全部文章
(共2篇)
题解 | #[NOIP2012]借教室#
二分+差分即可; AC代码+注释如下: #include<bits/stdc++.h> using namespace std; const int N=1e6+10; struct node{//结构体 int d,s,t; }a[N]; int n,m,b[N],c[N]; ...
C++
二分查找
数组
2024-10-05
0
93
月月查华华手机
开vector数组,记录每个字母的下标 查找时用二分查找 #include<bits/stdc++.h> using namespace std; vector<int>id[26]; int cnt[26]; char s[1000005]; int main(){ ...
C++
二分查找
2024-10-03
1
99