码迷,mamicode.com
首页 >  
搜索关键字:cstring    ( 6726个结果
P1020 导弹拦截
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int f[100010]; int a[100010],temp[100010],len; int cmp( ...
分类:其他好文   时间:2020-06-13 17:20:02    阅读次数:53
HDU 1735 字数统计 (贪心+模拟)
##题面 Problem Description 一天,淘气的Tom不小心将水泼到了他哥哥Jerry刚完成的作文上。原本崭新的作文纸顿时变得皱巴巴的,更糟糕的是由于水的关系,许多字都看不清了。可怜的Tom知道他闯下大祸了,等Jerry回来一定少不了一顿修理。现在Tom只想知道Jerry的作文被“破坏 ...
分类:其他好文   时间:2020-06-13 17:09:20    阅读次数:50
归并排序模板
#include<iostream>#include<algorithm>#include<cstring>#include<cstdio>using namespace std;const int N=1e6+10;int q[N]= {0},temp[N]={0};void merge_sort ...
分类:编程语言   时间:2020-06-13 12:48:12    阅读次数:52
【bzoj3252】攻略(长链剖分+贪心)
传送门 显然每次只会取当前最大的长链。 那么每次直接将所有长链的权值扔到一个堆里面,最后取出$k$次即是最终答案。 写法上类似于树链剖分: /* * Author: heyuhhh * Created Time: 2020/6/11 9:49:25 */ #include <iostream> #i ...
分类:其他好文   时间:2020-06-13 12:45:36    阅读次数:60
线性筛模板
#include<algorithm> #include<cstdio> #include<cstdlib> #include<iostream> #include<cmath> #include<cstring> #include<string> #include<queue> using nam ...
分类:其他好文   时间:2020-06-13 00:07:49    阅读次数:88
Codeforces Round #648 (Div. 2) A - Matrix Game
#include<iostream> #include<algorithm> #include<cstdio> #include<cstring> #include<cmath> #include<map> #include<vector> #include<queue> #include<set> ...
分类:其他好文   时间:2020-06-12 21:47:06    阅读次数:66
CF1360H Binary Median
原题链接 https://www.luogu.com.cn/problem/CF1360H 题目大意 题解 ① 最常见最暴力的做法: 将读入的二进制转化为十进制,然后依次删除,删除过程中维护中位数; 虽然思路简单,但是考虑到实际维护的过程中十分复杂,对代码能力要求较高; ② 稍微巧妙一点的做法: 其 ...
分类:其他好文   时间:2020-06-11 19:33:49    阅读次数:54
CF3A Shortest path of the king
CF3A Shortest path of the king Luogu题地址 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <queue> using namespace ...
分类:其他好文   时间:2020-06-11 16:24:45    阅读次数:50
luogu P5490 【模板】扫描线
题目描述 求 \(n\) 个矩形的面积并。 输入格式 第一行一个正整数 \(n\)。 接下来 \(n\) 行每行四个非负整数 \(x_1, y_1, x_2, y_2\),表示一个矩形的左下角坐标为 \((x_1, y_1)\),右上角坐标为 \((x_2, y_2)\)。 输出格式 一行一个正整数 ...
分类:其他好文   时间:2020-06-10 22:55:47    阅读次数:68
【模板】堆
P3378 【模板】堆 #include <iostream> #include <cstring> #include <cstdio> using namespace std; const int N = 1e6; int h[N], s; void up(int u) { while(u / 2 ...
分类:其他好文   时间:2020-06-10 17:17:55    阅读次数:67
6726条   上一页 1 ... 23 24 25 26 27 ... 673 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!