zzu_lmc
zzu_lmc
全部文章
算法
acm(2)
codeforces(5)
java(3)
leetcode(1)
other(1)
博弈论(2)
并查集(1)
数论(1)
未归档(133)
水题(1)
百度之星(1)
莫比乌斯反演(1)
计算几何(1)
贪心(3)
归档
标签
去牛客网
登录
/
注册
zzu_lmc的博客
全部文章
/ 算法
(共44篇)
Stirling公式求阶乘位数 51nod1058 poj1423
输入N求N的阶乘的10进制表示的长度。例如6! = 720,长度为3。 Input 输入N(1 <= N <= 10^6) Output 输出N的阶乘的长度 Input示例 6 Output示...
2018-07-15
0
517
poj 2632 Crashing Robots(模拟题)
Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11637 Accepted: 4933 Description In a modernize...
2018-05-19
0
414
hdu 1166 敌兵布阵(树状数组模板)
#include<bits/stdc++.h> using namespace std; int N,c[50005]; int lowbit(int i){ return i&(-i); } void add(int i,int value){ while(i&...
2018-05-15
0
411
UVA 699 The Falling Leaves 递归建树
#include<cstdio> #include<cstring> #include<iostream> using namespace std; const int maxn=205; int sum[maxn]; void build(int p) { ...
递归
数
2018-05-10
0
437
uva 514Rails(栈模拟)
紫书上的,格式不太对,这个格式有点那啥 #include<cstdio> #include<stack> using namespace std; const int maxn=1000+10; int n,target[maxn]; int main() { whi...
模拟
2018-05-02
0
446
翻转骰子(模拟)
题目链接点击打开链接 竟然是日本的一个大学的网站 会津大学,学习了 Write a program to simulate rolling a dice, which can be constructed by the following net. <center style="m...
模拟
2018-05-01
0
801
归并排序 逆序对问题
void merge_sort(int *A,int x,int y,int *T) { if(y-x>1) { int m=x+(y-x)/2;//划分 int p=x,q=m,i=x; merge_sort(A,x,m,T);...
归并排序
逆序对
2018-04-30
0
404
最大连续和问题
给出一个长度为n的序列A1,A2,……,An,求最大连续和,即找到1<=i<=j<=n,使得Ai+Ai+1+…Aj尽量大。 (1)使用枚举 O(n^3) tot=0; best=A[1]; //初始最大值 for(int i=1;i<=n;i++) for(int ...
最大连续和
2018-04-29
0
554
蛇形矩阵
#include<iostream> #include<cstdio> int row,col; int matrix[100][100]={0}; void UpFillNum(int); void DownFillNum(int); int main() { int ...
模拟
2018-04-28
0
518
poj 1008 Maya Calendar(模拟)
Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 81657 Accepted: 25098 Description ...
模拟
2018-04-22
0
370
首页
上一页
1
2
3
4
5
下一页
末页