DZY Loves Topological Sorting
Accepts: 112
Submissions: 586
Time Limit: 4000/2000 MS (Java/Others)
Memory Limit: 131072/131072 K (Java/Others)
问题描述
一张有向图的拓扑序列是图中点的一个排列,满足对于图...
分类:
其他好文 时间:
2015-04-06 08:54:50
阅读次数:
202
A sweet little monster Om Nom loves candies very much. One day he found himself in a rather tricky situation that required him to think a bit in order to enjoy candies the most. Would you succeed with...
分类:
其他好文 时间:
2015-04-05 14:40:31
阅读次数:
171
DZY Loves Topological SortingTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 866Accepted Submis...
分类:
编程语言 时间:
2015-04-05 14:32:48
阅读次数:
174
A -Jzzhu and SequencesTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionJzzhu has invented a kind of sequences...
分类:
其他好文 时间:
2015-04-04 20:58:15
阅读次数:
165
Bike loves looking for the second maximum element in the sequence. The second maximum element in the sequence of distinct numbers x1,?x2,?…,?xk (k?>?1) is such maximum element xj, that the following in...
分类:
其他好文 时间:
2015-04-03 15:21:56
阅读次数:
154
Problem Description
Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b[1], a[K + 1] = b[2], ...... , a[K + M - 1] = b[M]. If th...
分类:
其他好文 时间:
2015-04-03 11:27:27
阅读次数:
128
要求在一个DAG中删去不多于k条边,使得拓扑序的字典序最大。
贪心策略:每次删去入度小于res的,序号尽量大的点的入边。
需要用线段树维护区间最小值。
代码:
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int N = 400000 +10;
const ...
分类:
编程语言 时间:
2015-04-03 09:32:36
阅读次数:
157
SequenceTime Limit:6000MSMemory Limit:65536KTotal Submissions:7762Accepted:2565DescriptionGiven m sequences, each contains n non-negative integer. Now...
分类:
其他好文 时间:
2015-04-02 20:49:59
阅读次数:
170
The little girl loves the problems on array queries very much.One day she came across a rather well-known problem: you’ve got an array of n elements (the elements of the array are indexed starting from...
分类:
其他好文 时间:
2015-04-02 16:31:33
阅读次数:
125
Urej loves to play various types of dull games. He usually asks other people to play with him. He says that playing those games can show his extraordinary wit. Recently Urej takes a great interest in a new game, and Erif Nezorf becomes the victim. To get a...
分类:
其他好文 时间:
2015-04-02 09:08:58
阅读次数:
269