莫队板子 代码 cpp include include include include define int long long using namespace std; struct Query{ int l,r,aid; }query[55000]; int ansa[55000],ansb[5 ...
分类:
编程语言 时间:
2018-12-18 11:01:56
阅读次数:
175
一、题面 POJ2010 二、分析 堆预处理 首先可以考虑吧随便取一个点,判断两侧的最小的总费用是多少,然后相加判断是否满足条件。如果直接判断会超时,所以需要用大根堆预处理一下。先看从分数最小的往最大的预处理,先取N/2个相加,并把他们都加入到堆中,先假设这个和值是最大的,然后不断往后扫描的过程中, ...
分类:
其他好文 时间:
2018-12-18 00:07:25
阅读次数:
203
串口发送部分代码: 串口接收部分代码: 例程: http://www.openedv.com/forum.php?mod=attachment&aid=Njg0MnxmMzFkMzdmN3wxNTQ1MDQ0NjE5fDB8MzM2MTE%3D ...
分类:
其他好文 时间:
2018-12-17 20:12:16
阅读次数:
194
思路 整体二分的板子题,没什么思路好说 代码 cpp include include include using namespace std; struct Query{ int type,pos,val,l,r,k,aid; }Query[110000],lx[110000],rx[110000] ...
分类:
其他好文 时间:
2018-12-16 14:36:47
阅读次数:
99
一样是cdq的板子 照着 "园丁的烦恼" 就好了 代码 cpp include include include using namespace std; int w,cntq,cnta,nothing,type,qid,aid; namespace BIT{ int bit[2000100]; in ...
分类:
其他好文 时间:
2018-12-14 19:33:39
阅读次数:
134
利用织梦后台数据库内容替换,正则去掉文章内容中的img标签 1. 选择好数据表和字段。 2. 选择替换方式为正则表达式,填写主键字段(表的主键)。 3. 填写被替换内容,正则表达式 <img(.*)src=\"([^\"]+)\"[^>]+> 4. 替换内容留空 5. 根据需要填写替换条件(如aid ...
分类:
数据库 时间:
2018-11-04 01:43:21
阅读次数:
486
两者执行流程完全不一样。 in的过程 select * from tableA a where a.id in (select b.a_id from tableB b); 1)首先子查询,查询B表中所有的aid,结果集 listB。 2)进行外查询,结果集 listA。 3)list和listB取 ...
分类:
其他好文 时间:
2018-10-23 22:57:22
阅读次数:
139
1.交叉连接 select * from A ,B 2.内连接 可以省略inner join 隐式内连接: select * from A,B where A.id = B.aid; 显式内连接: select * from A inner join B on A.id = B.aid; 迫切内连接 ...
分类:
Web程序 时间:
2018-10-09 00:34:37
阅读次数:
190
http://poj.org/problem?id=1251 The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads ...
分类:
其他好文 时间:
2018-10-05 12:16:56
阅读次数:
150
假设有A,B两个表。 表A记录如下: aID aNum 1 a20050111 2 a20050112 3 a20050113 4 a20050114 5 a20050115 表B记录如下: bID bName 1 2006032401 2 2006032402 3 2006032403 4 200 ...
分类:
数据库 时间:
2018-09-15 13:10:16
阅读次数:
172