码迷,mamicode.com
首页 >  
搜索关键字:pair    ( 2800个结果
pair<T1, T2>
set< pair<int,int> > sp; set< pari<int,int> >::iterator it; sp.insert( make_pair(x,y) ); //插入 it=sp.lower_bound(make_pair(x1,y1)); //最小 sp.erase(it); ... ...
分类:其他好文   时间:2019-10-05 10:38:50    阅读次数:72
LeetCode 493. Reverse Pairs
原题链接在这里:https://leetcode.com/problems/reverse-pairs/ 题目: Given an array nums, we call (i, j) an important reverse pair if i < j and nums[i] > 2*nums[j ...
分类:其他好文   时间:2019-10-05 10:29:35    阅读次数:80
【原创】大叔经验分享(85)ssh秘钥之创建和使用
一 创建秘钥 1 Macbook $ ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key ($HOME/.ssh/id_rsa): Enter passphrase ( ...
分类:其他好文   时间:2019-10-03 23:51:15    阅读次数:604
Codeforces1234F. Yet Another Substring Reverse(状压dp)
题目链接:传送门 思路: 由于只能翻转一次子串,就相当于找出两个不连续的子串,把在后面的一个子串翻转过来,和第一个子串拼接。 因为题目仅要求子串中的字符不重复,所以字符的先后顺序无关,翻转的操作就相当于: 选出两个不连续的子串,且他们没有相同的字符,两个子串的长度之和就是答案的一种可能。 题目中反复 ...
分类:其他好文   时间:2019-10-03 18:05:35    阅读次数:117
POJ 3169 Layout (差分约束入门)
线性约束 将所有不等式化成 $d[a] d[b] include include include include define ll long long using namespace std; typedef pair pii; const int N = 1e5+10; const int in ...
分类:其他好文   时间:2019-10-02 13:00:51    阅读次数:78
leetcode 188. Best Time to Buy and Sell Stock IV
class Solution { public: int maxProfit(int k, vector<int> &prices){ int n=prices.size(),v=0,p=0,ret=0; vector<int> profits; stack<pair<int,int>> vp; w... ...
分类:其他好文   时间:2019-10-02 12:58:58    阅读次数:62
[CSP-S模拟测试]:题(DP)
题目描述 由于出题人赶时间所以没办法编故事来作为背景。一开始有$n$个苹果,$m$个人依次来吃苹果,第$i$个人会尝试吃$u_i$或$v_i$号苹果,具体来说分三种情况。$\bullet 1.$两个苹果都还在,那么这个人将随便选一个苹果吃了。$\bullet 2.$只有一个苹果,那么这个人将吃掉这个 ...
分类:其他好文   时间:2019-10-01 20:46:53    阅读次数:193
Spark RDD常用算子操作(八) 键值对关联操作 subtractByKey, join,fullOuterJoin, rightOuterJoin, leftOuterJoin
原文作者:翟开顺首发:CSDN本人仅为自己方便查阅做了摘抄,请支持原作者原文地址:https://blog.csdn.net/t1dmzks/article/details/72077428github: https://github.com/zhaikaishun/spark_tutorial/t... ...
分类:其他好文   时间:2019-10-01 13:35:26    阅读次数:125
Codeforces Round 589 (Div. 2) 题解
Is that a kind of fetishism? No, he is objectively a god. 见识了一把 Mcdic 究竟出题有多神。 (虽然感觉还是吹过头了) 开了场 Virtual 玩。 开场先秒了 AB。C 居然差点没做出来,有点耻辱。 开 D。怎么不会……Div. 2 ...
分类:其他好文   时间:2019-10-01 10:04:53    阅读次数:87
POJ 3068 "Shortest" pair of paths
题意:选俩条除起点终点(1为起点,n为终点),所经过互不相交的路径,并要求最小cost 分析:很明显的最小费用最大流问题,最大流为路径数时2, 经验:要熟悉这种题型:“互不相交的路径”可以望网络流方向思考 #include<bits/stdc++.h> using namespace std; co ...
分类:其他好文   时间:2019-09-30 21:52:06    阅读次数:96
2800条   上一页 1 ... 58 59 60 61 62 ... 280 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!