#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 40010;//最大学生人数 bool check(char c){ if(c >= '0' && c< ...
分类:
编程语言 时间:
2020-01-17 00:23:47
阅读次数:
155
[ZJOI2007]捉迷藏 这是我最近写过最长的代码QAQ 码力太弱了QAQ 动态点分治模板题。 我们可以用三种堆来维护答案,这些堆要求支持删除非顶元素,以及查询次小值。我们把两个STL堆封装起来就可以实现。 三种堆: d[x]表示以x为根的点分树中所有黑点到它分治爹的距离 c[x]表示以x为根的所 ...
分类:
其他好文 时间:
2020-01-17 00:06:26
阅读次数:
58
当我们使用ES批量插入数据的时候,一般会这样写代码: from elasticsearch import Elasticsearch,helpers es =Elasticsearch(hosts=[{'host':'localhost','port':9200}]) def gendata(): ...
分类:
其他好文 时间:
2020-01-16 23:34:20
阅读次数:
129
用了打表的技巧 #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 40010;//最大学生人数 //[0,12]的火星文 string unitDigit ...
分类:
编程语言 时间:
2020-01-16 22:12:44
阅读次数:
79
超时主要是这个语句的原因: for(iter = temp[num1].begin();iter != temp[num1].end();++iter){ for(iter1 = temp[num2].begin();iter1 != temp[num2].end();++iter1){ if(*i ...
分类:
编程语言 时间:
2020-01-16 14:21:01
阅读次数:
88
没有想到以二维数组 char [N][5] 存放输入的姓名,自己尝试用vector<char> 失败了。 小技巧:如果排序时直接对字符串排序,那么会导致大量的字符串移动,非常耗时间,因此比较合适的做法是使用字符串的下标来代替字符串本身进行排序,这样消耗的时间会少得多 strcmp 的返回值不一定是 ...
分类:
编程语言 时间:
2020-01-16 01:21:26
阅读次数:
98
容器 vector 特点:动态数组 元素类型相同 只能从尾部快速插入或者删除 随机访问快 中间插入删除慢(需要移动) capcity是给的块的大小 定义vectorvector<int> A(10, 1); //声明一个初始大小为10且值都是1的向量vector<int> A(tmp); //声明并 ...
分类:
其他好文 时间:
2020-01-16 01:04:49
阅读次数:
68
#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int N = 40005; //vector<vector<int>> const int M = 26*26*26*10 ...
分类:
编程语言 时间:
2020-01-15 19:33:02
阅读次数:
53
前言 本次的一个布局技术都写的非常详细了,只要按着来就行,不过,先说明本次主题为二次元主题。 如果真的喜欢本主题的不妨可以试一试(==建议跟据目录来看==) 在很久很久以前。。。。 嘛,就在前不久我正在。。 额,上图仅仅表示我的~~无敌~~ 无聊,本人不抽烟。 嗯嗯,在我闲来无事的过程中我找到了一个 ...
分类:
其他好文 时间:
2020-01-15 13:29:11
阅读次数:
597
################## 中间件 ####################### ################## 中间件 ####################### ################## 中间件 ####################### ######### ...
分类:
其他好文 时间:
2020-01-14 13:12:15
阅读次数:
92