码迷,mamicode.com
首页 >  
搜索关键字:chosen problem solvi    ( 37771个结果
Tarjan
$\texttt{Tarjan}$ 解决缩点、割点、桥、点双联、边双联、$\texttt{2-sat}$。 ...
分类:其他好文   时间:2020-05-19 14:17:04    阅读次数:41
738. 单调递增的数字(贪心算法)
给定一个非负整数 N,找出小于或等于 N 的最大的整数,同时这个整数需要满足其各个位数上的数字是单调递增。(当且仅当每个相邻位数上的数字 x 和 y 满足 x <= y 时,我们称这个整数是单调递增的。) 示例 1: 输入: N = 10输出: 9示例 2: 输入: N = 1234输出: 1234 ...
分类:编程语言   时间:2020-05-19 12:42:59    阅读次数:64
费马小定理
链接:https://ac.nowcoder.com/acm/problem/205461 王子连接的国服终于上线啦~ 已知王子连接的抽卡系统如下: 共有 个卡池,第 个卡池共有 种卡,每张卡的出货率都是相等的(也就是说该卡池单次抽卡,每种卡出货率是 1/ai1/a_i1/ai? )。 第 个卡池中 ...
分类:其他好文   时间:2020-05-19 01:05:12    阅读次数:88
PAT 1010 Radix (25分) radix取值无限制,二分法提高效率
题目 Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 i ...
分类:其他好文   时间:2020-05-19 01:04:00    阅读次数:58
LeetCode 283. 移动零 Move Zeroes (Easy)
给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 来源:力扣(LeetCode) class Solution { public: void moveZeroes(vector<int>& nums) { int index = 0; for (int ...
分类:移动开发   时间:2020-05-19 00:16:24    阅读次数:72
31. 下一个排列
https://leetcode-cn.com/problems/next-permutation/ ...
分类:其他好文   时间:2020-05-18 23:00:02    阅读次数:50
POJ 3259 Wormholes(bellman_ford判断负环)
POJ 3259 http://poj.org/problem?id=3259 题意: 农夫 FJ 有 N 块田地【编号 1...n】 (1 include include include using namespace std; const int maxn = 510; const int ma ...
分类:其他好文   时间:2020-05-18 22:49:56    阅读次数:67
【JSOI2008】星球大战
题目链接 直接算每次破坏会拆开多少个连通块貌似不可做。考虑反着加边用并查集合并。 那么我们首先用$vector$存下每个点出边到的点的序列。注意:$m\in[1,2\times 10^5]$而$n\in [1,2\times m]$所以$n\in [1,4\times 10^5]$。 读入破坏的顺序 ...
分类:Web程序   时间:2020-05-18 22:42:30    阅读次数:79
luogu P3745 [六省联考2017]期末考试
"luogu" 因为$C$对答案的贡献只和$\max b_i$有关,所以我们枚举这个值$z$,然后把所有$ z$的$b$全部变成$z$,这里如果$A define LL long long define db double using namespace std; const int N=2e5+1 ...
分类:其他好文   时间:2020-05-18 20:29:02    阅读次数:52
多项式多点求值
多项式多点求值 https://www.luogu.com.cn/problem/P5050 给出一个 $n$ 次多项式 $f(x)$ ,对于 $i \in [1,m]$ ,求 $f(a_i)$ . 答案对 $998244353$ 取模 $n,m \in [1,64000]$ , $a_i,[x^i ...
分类:其他好文   时间:2020-05-18 20:23:53    阅读次数:71
37771条   上一页 1 ... 90 91 92 93 94 ... 3778 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!