zzu_lmc
zzu_lmc
全部文章
分类
acm(2)
codeforces(5)
java(3)
leetcode(1)
other(1)
博弈论(2)
并查集(1)
数论(1)
未归档(133)
水题(1)
百度之星(1)
算法(44)
莫比乌斯反演(1)
计算几何(1)
贪心(3)
归档
标签
去牛客网
登录
/
注册
zzu_lmc的博客
全部文章
(共200篇)
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
八数码问题 bfs
还在调试当中 #include<stdio.h> struct node { int xy[3][3]; int dir; }; struct node sh[102], end; int count = 1; void init() { printf(&qu...
2018-04-27
0
457
第八届河南省赛 G. InterferenceSignal 暴力写 用到前缀和
G. Interference Signal Dr.Kong’s laboratory monitor some interference signals. The interference signals can be digitized into a series of positive...
2018-04-26
0
408
二进制枚举子集
#include<cstdio> #include<iostream> using namespace std; void print_subset(int n,int s) { for(int i=0;i<n;i++) if(s&(1&...
2018-04-26
0
354
c++ next_permutation
c++STL next_permutation 下一个排列 #include<cstdio> #include<algorithm> using namespace std; int main() { int n,p[10]; scanf("%d&q...
2018-04-26
0
365
硬币问题 固定终点的最长路和最短路
有n种硬币,面值分比为v1,v2,……vn,每种有无限多。给定非负整数S,可以选用多少个硬币,是面值之和恰好为S?输出硬币数目的最小值和最大值。1<=n<=100,0<=S<=10000,1<=vi<=S. 分析:此问题尽管看上去和嵌套矩形问题很不一样,但本题的...
2018-04-25
0
459
首页
上一页
8
9
10
11
12
13
14
15
16
17
下一页
末页