题目描述,我找不见了,大概写一下想法和代码吧。 1. 没有看 2. 由于数据范围很小,就是简单的枚举,求全排列,然后更新答案。 1 #include<bits/stdc++.h> 2 #define pb push_back 3 typedef long long ll; 4 using names ...
分类:
其他好文 时间:
2017-05-16 14:51:40
阅读次数:
209
OJ题号:洛谷P3697 思路: 贪心。首先从起点出发,开特急电车,对于每一个特急车站$s_{i}$,分别下一次车,计算从当前车站$s_{i}$出发坐各停电车在指定时限内$t$最远能够到达的车站$r_{i}$,并保证这个$r_{i}$不会超过$s_{i+1}$。将得到的站点$r_{i}$放入一个大根 ...
分类:
其他好文 时间:
2017-05-14 20:32:58
阅读次数:
198
题目: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges ...
分类:
其他好文 时间:
2017-05-14 13:50:49
阅读次数:
206
#include<stack> #include<utility> #include<allocators> #include<functional> using std::pair; using std::allocator; using std::less; using std::stack; ...
分类:
编程语言 时间:
2017-05-14 10:40:06
阅读次数:
216
不知道什么原因chrome浏览器被reimage pair劫持了,只要在浏览器内部一按回车,就马上进入了reimage pair下载的界面。 在网上找了很多解决方法,最后才在google的chrome官网上找到了解决方案:其实也很简单,就是: 详见网址: https://support.google ...
分类:
其他好文 时间:
2017-05-12 21:59:22
阅读次数:
146
启动MongoDB有2种方式,一是直接指定配置参数,二是指定配置文件。这里先介绍配置文件,启动方式如下: 配置如下:verbose:日志信息冗余。默认false。提高内部报告标准输出或记录到logpath配置的日志文件中。要启用verbose或启用verbosity 用vvvv参数,如: ps:启动 ...
分类:
数据库 时间:
2017-05-12 17:23:55
阅读次数:
212
http://acm.hdu.edu.cn/showproblem.php?pid=5386 Problem Description You have an n?n matrix.Every grid has a color.Now there are two types of operating: ...
分类:
其他好文 时间:
2017-05-10 11:26:42
阅读次数:
258
Knight Moves Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 26102 Accepted: 12305 Description Background Mr Somurolov, fabulous chess-game ...
分类:
其他好文 时间:
2017-05-09 21:46:21
阅读次数:
183
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is ...
分类:
其他好文 时间:
2017-05-08 23:29:32
阅读次数:
344
1、 queue<pair<int,int> >p; 当我想把这样一个元素取出时,赋值给什么类型的变量呢。 typedef pair<int,int> pii; 在主函数前写个这个.... pii 的位置你随便写什么都行 可以不是pii pii x=q2.front(); 然后定义一个pii类型的x ...
分类:
其他好文 时间:
2017-05-08 23:12:49
阅读次数:
142