码迷,mamicode.com
首页 >  
搜索关键字:pair    ( 2800个结果
C++ pair(对组)用法
C++ pair(对组)用法 类模板:template <class T1, class T2> struct pair 参数:T1是第一个值的数据类型,T2是第二个值的数据类型。 功能:pair将一对值组合成一个值,这一对值可以具有不同的数据类型(T1和T2),两个值可以分别用pair的两个公有函 ...
分类:编程语言   时间:2019-09-19 21:16:25    阅读次数:85
AtCoder Grand Contest 013题解
"传送门" $A$ 先把相同的缩一起,然后贪心就可以了 $D$ 首先第$1$个球和第$2m$个球显然颜色任选,那么我们去掉这两个,变成了$m 1$次放两个球选两个球的操作,同时初始时有$n 1$个球 用$1$表示黑球,$0$表示白球,那么每次放球有三种选择,$11,00,01$($01$和$10$默 ...
分类:其他好文   时间:2019-09-19 19:23:59    阅读次数:68
2019上海icpc网络赛B. Light bulbs(思维+差分)
题目传送门 题意 T组案例,每组案例:n个灯泡(from 0 to n-1),m次操作,每次操作把区间[L,R]内的灯泡翻转(开变关,关变开),问m次操作之后有多少灯泡是亮着的。(时间限制:1000ms 内存限制:8192K) 题解 这道题不仅卡时间,更是卡内存,所以用线段树会爆内存 正解: 该题可 ...
分类:其他好文   时间:2019-09-18 01:17:21    阅读次数:124
Luogu P4095 [HEOI2013] Eden的新背包问题
"题目" 求出从前往后的背包$f_{i,j}$和从后往前的背包$F_{i,j}$。 那么对于询问$(d,e)$,答案就是$\max\limits_{i=0}^e f_{d 1,i}+F_{d+1,e i}$。 include define mp make_pair define P pair def ...
分类:其他好文   时间:2019-09-17 15:58:05    阅读次数:75
Codeforces Round #585 (Div. 2)
"传送门" A. Yellow Cards 细心点即可。 Code cpp include define fi first define se second define MP make_pair using namespace std; typedef long long ll; typedef ...
分类:其他好文   时间:2019-09-16 23:33:50    阅读次数:132
关系及关系性质
9.1 Relations and Their Properties(关系及关系性质) 1.基本概念 Ordered pair(序偶) =(a2, b2)") ...
分类:其他好文   时间:2019-09-16 19:50:07    阅读次数:72
2019 上海网络赛G 手写哈希map+字符串hash
https://nanti.jisuanke.com/t/41415 因为对于询问$\sum |s|<=1e5$,因此$|s|$的种类数$<=\sqrt{1e5}$ 我们分组标记,就变成了$\sqrt{1e5}$次询问了,我们暴力去跑, 复杂度$1e5\sqrt{1e5}*hashmap$ 暴力+哈 ...
分类:其他好文   时间:2019-09-16 10:04:19    阅读次数:79
Floyd-Warshall Algorithm
The Floyd Warshall Algorithm is for solving the All Pairs Shortest Path problem. The problem is to find the shortest distances between every pair of v ...
分类:其他好文   时间:2019-09-16 09:43:09    阅读次数:92
leetcode1190
参考:https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses/discuss/382775/Python3-straightforward-and-easiest-on-discussion ...
分类:其他好文   时间:2019-09-16 00:12:53    阅读次数:81
Ansible ssh-key密钥认证配置
对于被管理服务器做免密码登录设置 1.在管理服务器生成ssh-key密钥 #ssh-keygen //生成秘钥 root@hsz:/etc/ansible# ssh-keygen Generating public/private rsa key pair. Enter file in which ...
分类:其他好文   时间:2019-09-14 23:01:11    阅读次数:190
2800条   上一页 1 ... 61 62 63 64 65 ... 280 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!