12 2021 档案
摘要:#include<iostream> #include<map> #include<set> using namespace std; struct like{ string name; int num; }wb[1000000]; int main(){ int n,m; map<string,i
阅读全文
摘要:unordered_map<int,int> h={{0,0}, {1,31},{3,31},{5,31},{7,31}, {8,31}, {10,31}, {12,31}, {4,30}, {6,30}, {9,30}, {11,30}, {2,28}};
阅读全文
摘要:https://blog.csdn.net/Sakura_Sora/article/details/104684755
阅读全文
摘要:想象l,区间所有的数都满足条件 求满足条件的最大值:如果l, r 范围的数都满足条件,那势必要取中时加一,即偶数时候取下一位,那就确定了查找范围是在【l,mid-1】,【mid,r】;要区分出最右端,势必要判断右边的不合法情况: while(l<r){ int mid=l+r+1 >>1; if(m
阅读全文
摘要:char tmp[200]; cin.getline(tmp,200); //输入一行字符串,最大长度是200; 前面要用getchar() 清除缓存
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; int main() { int array[] = {5,6,7,8,4,2,1,3,0}; int len=sizeof(array)/sizeof(int); cout<<"
阅读全文
摘要:1.当要把相交的区间作为一个时,按右端点排序 2.当要把相交的区间作为不同的时,按左端点排序
阅读全文
摘要:#include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; const int N = 210,M=N; int h[N], e[M], ne[M], idx,
阅读全文