这题很智慧。VJ上4000多ms#include#include#include#include #include using namespace std;int main(){ int T,n,m,sum; int a[2005]; scanf("%d",&T); whil...
分类:
其他好文 时间:
2014-08-06 17:42:41
阅读次数:
183
// 按钮点击事件-(void)startTime{ __block int timeout=30; //倒计时时间 dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dis...
分类:
其他好文 时间:
2014-08-06 14:12:31
阅读次数:
216
这题不是裸的最短路么?但是一看数据范围就傻了。点数10^6,边数10^7。这个spfa就别想了(本来spfa就是相当不靠谱的玩意),看来是要用堆优化dijkstra了。但是,平时写dijkstra时为了偷懒直接用的STL的priority_queue,没办法改变权值,所以都是直接把pair压进堆里。...
分类:
其他好文 时间:
2014-08-06 11:40:41
阅读次数:
247
题目:Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding elem....
分类:
编程语言 时间:
2014-08-06 04:11:20
阅读次数:
429
题目:Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (includin....
分类:
编程语言 时间:
2014-08-06 04:10:50
阅读次数:
325
Atitit.提升软件稳定性---基于数据库实现的持久化 循环队列 环形队列
1. 前言::选型(马)
1
2. 实现java.util.queue接口 1
3. 当前指针的2个实现方式 1
1.1. 用一个游标last 来指示 (指针表字段last ),麻烦的,不推荐
1
1.2. (简单,推荐)使用循环次数来指示,每循环加1 (字段cirTimes),order ...
分类:
数据库 时间:
2014-08-05 22:46:50
阅读次数:
375
Problem Description:
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
If such arrangement is not possible, it must rea...
分类:
其他好文 时间:
2014-08-05 22:40:40
阅读次数:
241
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without u...
分类:
其他好文 时间:
2014-08-05 22:35:00
阅读次数:
277