码迷,mamicode.com
首页 >  
搜索关键字:radix sort    ( 13156个结果)
LeetCode 算法 | 如何拆分数组?
题目: 给定长度为 2n 的数组, 你的任务是将这些数分成 n 对, 例如 (a1, b1), (a2, b2), ..., (an, bn) ,使得从1 到 n 的 min(ai, bi) 总和最大 示例: 输入: [1,4,3,2] 输出: 4 解释: n 等于 2, 最大总和为 4 = min ...
分类:编程语言   时间:2020-01-16 10:33:54    阅读次数:87
Codeforces Round #451 (Div. 2)【A,B,C,D,E】【C题:模拟 D题:尺取+贪心 E题:思维+优先队列维护最值】
特判最后一位即可 1 #include<bits/stdc++.h> 2 3 using namespace std; 4 #define int long long 5 6 signed main(){ 7 int n;cin>>n;int t=n%10; 8 if(t==0) cout<<n; ...
分类:其他好文   时间:2020-01-16 00:57:21    阅读次数:80
四种Python 列表反转显示方法
第一种,使用reversed 函数,reversed返回的结果是一个反转的迭代器,我们需要对其进行 list 转换 第二种,使用sorted函数,sorted是排序函数,它是对一个列表进行排序后生成一个新的list列表,而sort则是在原来的列表上直接进行排序。 其中,reverse是排序规则,Tr ...
分类:编程语言   时间:2020-01-15 23:21:03    阅读次数:130
全面监测网站信息
加检测: 1.ip ping curl wget 检测 192.168.11.1444 ping c 1 w 1 192.168.11.21444 2.ip 加 端口 telnet echo e "\n" | telnet 192.168.11.2144 13000 | grep Connected ...
分类:Web程序   时间:2020-01-15 19:56:55    阅读次数:152
第四周 文本处理工具
常用文本处理工具 cut sort grep wc uniq
分类:其他好文   时间:2020-01-15 17:55:52    阅读次数:72
[日常训练]三视图(组合计数+容斥)
Description 给定两个长度为 $n$ 的数组 $a,b$。 要求给一个 $n×n$ 的矩阵的每个位置填上一个非负整数,使得第 $i$ 行的最大值为 $a_i$,第 $j$ 列的最大值为 $b_j$。 求方案数对 $998244353$ 取模的结果。 $1\leq n\leq 10^5$,$ ...
分类:其他好文   时间:2020-01-15 14:13:24    阅读次数:57
1036 Boys vs Girls (25point(s)) Easy only once *sort cmp水题
基本思想: 还是sort cmp那一套; 关键点: 没啥可说的; 1 #include<iostream> 2 #include<stdlib.h> 3 #include<stdio.h> 4 #include<vector> 5 #include<string> 6 #include<math.h ...
分类:其他好文   时间:2020-01-15 13:57:27    阅读次数:46
[codeforces1284D]New Year and Conference 离散化+multiset【或排序+线段树】
【题目】:题目链接 time limit per test 2 seconds memory limit per test 1024 megabytes input standard input output standard output Filled with optimism, Hyunuk ...
分类:编程语言   时间:2020-01-15 13:57:05    阅读次数:77
A1010
#include<iostream> #include<cstdio> #include<cctype> #include<math.h> #include <algorithm> using namespace std; long long loop(string s,long long min, ...
分类:其他好文   时间:2020-01-15 09:57:55    阅读次数:88
sort的cmp
bool cmp(int a, int b){ return a>b; //由大到小 降序 } bool cmp(int a, int b){ return a<b; //由小到大 升序 }sort(s,s+n,cmp); ...
分类:其他好文   时间:2020-01-15 00:08:15    阅读次数:77
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!