题目大意输入n,m。 一共有n个字母(从A开始), m行语句每个语句“x﹤y”,说明x,y之间的偏序关系。让你判断是否可以通过这些关系得到一个唯一的升序序列,若能则输出这个序列并指出通过前多少条语句得出的,如果n个字母间存在矛盾,输出相应语句并指出那条语句开始出现矛盾的。如果没有唯...
分类:
编程语言 时间:
2015-04-24 09:06:12
阅读次数:
178
nyoj349 http://acm.nyist.net/JudgeOnline/problem.php?pid=349poj1094 http://poj.org/problem?id=1094这两个题是一样的,不过在poj上A了才算真的过,ny上数据有一点弱。题目大意输入n,m。 一共有n个字母...
分类:
编程语言 时间:
2015-04-24 00:53:08
阅读次数:
297
置换群的第二题,一开始总是tle,后来一思考,置换根本不是这个情况,置换是一种排列,就用了几个数组将输入的数进行操作,最后A了,对置换有一些了解了。
#include
#include
#include
using namespace std;
const int maxn = 10000+10;
int n,least;
int a[maxn],b[1000010],s[maxn],tmp[1...
分类:
其他好文 时间:
2015-04-23 00:07:04
阅读次数:
158
Sorting It All Out
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 29182
Accepted: 10109
Description
An ascending sorted sequence of distinct values is one...
分类:
编程语言 时间:
2015-04-22 15:19:59
阅读次数:
174
DZY Loves Topological SortingTime Limit: 1 SecMemory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5195DescriptionA topological sort or t...
分类:
编程语言 时间:
2015-04-22 00:18:43
阅读次数:
203
Ultra-QuickSort
Time Limit: 7000MS
Memory Limit: 65536K
Total Submissions: 46080
Accepted: 16763
Description
In this problem, you have to analyze a particular sorting...
分类:
编程语言 时间:
2015-04-21 22:49:23
阅读次数:
209
Description
The twenty-first century is a biology-technology developing century. One of the most attractive and challenging tasks is on the gene project, especially on gene sorting program. Recentl...
分类:
其他好文 时间:
2015-04-21 20:49:10
阅读次数:
186
点击打开链杭电1379
Problem Description
One measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequen...
分类:
编程语言 时间:
2015-04-16 21:58:10
阅读次数:
183
(这是一个小系列:请戳:Elasticsearch之Nested(嵌套)系列,查看其他nested相关文章)
It is possible to sort by the value of a nested field, even though the value exists in a separate nested document. To make the re...
分类:
其他好文 时间:
2015-04-16 20:01:26
阅读次数:
141
Sorting by SwappingTime Limit:1000MSMemory Limit:10000KTotal Submissions:9514Accepted:5094DescriptionGiven a permutation of numbers from 1 to n, we ca...
分类:
移动开发 时间:
2015-04-15 23:21:09
阅读次数:
299