码迷,mamicode.com
首页 >  
搜索关键字:strange sorting    ( 1127个结果
python list sorting, return top N large elements index
找出numpy数组中最大的N个数的索引: 测试: ...
分类:编程语言   时间:2018-03-07 11:36:26    阅读次数:176
poj1958——Strange Towers of Hanoi
The teacher points to the blackboard (Fig. 4) and says: "So here is the problem: There are three towers: A, B and C. There are n disks. The number n i ...
分类:其他好文   时间:2018-03-06 17:14:32    阅读次数:198
1028. List Sorting (25)
距离PAT考试还有18天最重要的是做透每一题 这一题比较简单 不过也有学到的东西 一个是sort的第三个参数 可以是 一个函数指针也可以是一个函数对象 代码来自网络 另一个是strcmp函数 比较两个c字符串的函数当两个字符串相等时就返回0第一个较小时(比较ASCII)返回值小于0 思路: 用结构体 ...
分类:其他好文   时间:2018-03-01 00:47:16    阅读次数:166
poj2299 Ultra-QuickSort(线段树求逆序对)
Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping ...
分类:其他好文   时间:2018-02-23 20:51:27    阅读次数:215
POJ 1094 Sorting It All Out(拓扑排序判环)
题目链接:http://poj.org/problem?id=1094 题目: Description An ascending sorted sequence of distinct values is one in which some form of a less-than operator ...
分类:编程语言   时间:2018-02-21 00:25:00    阅读次数:163
cf 843 A Sorting by Subsequences [建图]
题面: 传送门 思路: 这道题乍一看有点难 但是实际上研究一番以后会发现,对于每一个位置只会有一个数要去那里,还有一个数要离开 那么只要把每个数和他将要去的那个位置连起来,构成了一个每个点只有一个入边一个出边的一张图 那么在这张图里的一个环,就代表着一个满足条件的子序列 所以只要把图建出来以后,统计 ...
分类:其他好文   时间:2018-02-20 15:59:00    阅读次数:164
Rainbow Sort
时间: o(n) 空间 o(1): 没有recursion, 只有当前一层的call stack sorting 如果是general sorting algo(1:不能对数组的性质加以限制) comparison based(2: sorting 只能通过两个数的比较来进行) , 最好的时间复杂度 ...
分类:其他好文   时间:2018-02-20 10:31:00    阅读次数:113
POJ.2891.Strange Way to Express Integers(扩展CRT)
"题目链接" 扩展中国剩余定理: "1(直观的)" 、 "2(详细证明)" 。 cpp include include define gc() getchar() typedef long long LL; const int N=1e6+5; LL n,m[N],r[N]; inline LL r ...
分类:其他好文   时间:2018-02-19 17:53:25    阅读次数:138
PAT 1052. Linked List Sorting (25)
1052. Linked List Sorting (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536 kB ...
分类:其他好文   时间:2018-02-12 00:20:11    阅读次数:228
cf842d Vitya and Strange Lesson
```cpp include include using namespace std; int s[2000005][2], cnt, n, m, x, uu, ans, dep[2000005], siz[2000005]; void ins(){ int u=0; for(int i=19; i ...
分类:其他好文   时间:2018-02-11 22:44:57    阅读次数:207
1127条   上一页 1 ... 26 27 28 29 30 ... 113 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!