- 博客(7)
- 收藏
- 关注
原创 zzuli 2184 河南多校联萌(5)(非二分)
Description每一个数都有若干个后缀零,比如100有2个、10有1个、1有0个,那么问题来了,已知整数n,求x使其满足x!的后缀零个数为n Input输入一个数T (≤ 10000),表示有T组数据 接下来T行每一行有一个数n (1 ≤ n≤10^8) Output每组数据首先输出当前组数(格式参见Sample Output),之后输出满足情况时最小的x,如果x不存在,输出no Sa
2017-08-26 14:36:07 391
原创 线段树保姆级教程
#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>using namespace std;int a[55555];int f[205555];int n;int t;void _build(int l,int r,int now){ if(l==r) { f[no
2017-08-23 17:48:48 231
转载 字典树
#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int ch[200010][27]; //节点编号 int sz; //字典树节点个数 int val[200010]; //节点的值 void init() { sz=1; mem
2017-08-23 17:48:17 219
原创 HDU 2685 I won't tell you this is about number theory
To think of a beautiful problem description is so hard for me that let’s just drop them off. :) Given four integers a,m,n,k,and S = gcd(a^m-1,a^n-1)%k,calculate the S.Input The first line contain a t
2017-08-19 10:50:19 291
原创 求1的个数(非dp)
求1的个数(非dp)给定一个正整数n,求从1到n所有数中1出现的次数,eg:n=12 1出现过5次 (1 10 11 12) n的范围是0-1e9 时间限制1s思路: 暴力肯定不行 找规律 打表可以发现 从1到100中1出现21次
2017-08-17 23:35:35 289
原创 POJ-2533 Longest Ordered Subsequence
A numeric sequence of ai is ordered if a1 < a2 < … < aN. Let the subsequence of the given numeric sequence ( a1, a2, …, aN) be any sequence ( ai1, ai2, …, aiK), where 1 <= i1 < i2 < … < iK <= N. For ex
2017-08-17 13:54:21 180
原创 Educational Codeforces Round 26 C. Two Seals
C. Two Sealstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne very important person has a piece of paper
2017-08-06 17:47:21 273
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人