云胡同学
云胡同学
全部文章
分类
C++(8)
java(2)
leetcode(34)
python(11)
Web前端(11)
剑指offer(1)
基础小项目(1)
小程序(1)
我的安卓之路(11)
数据库(1)
数据结构(11)
未归档(37)
算法(30)
软件配置(2)
题解(1)
归档
标签
去牛客网
登录
/
注册
云胡同学的博客
全部文章
(共162篇)
c++ 优先队列
#include<iostream> #include<queue> using namespace std; struct T { friend bool operator < (T a1, T a2) { return a...
2016-05-27
0
355
连续子序列之和
1049 最大子段和 基准时间限制: 1 秒 空间限制: 131072 KB 分值: 0 难度:基础题 收藏 ...
2016-05-23
0
401
数据结构之堆排序
//构造一个最大堆,然后反着输出去 #include<stdio.h> int h[101]; int n; void swap(int x, int y) { int t; t = h[x]; h[x] = h[y]; h[y] = t; } void ...
2016-04-23
0
352
模拟链表
#include<stdio.h> #include <stdlib.h> int main() { int data[101], right[101];//right[i] = n代表data[i]右边的元素是data[n] eg right[3] = 10 表示d...
2016-04-18
0
352
链表
#include <stdio.h> struct node { int data; struct node *next; }; int main() { struct node *p, *q, *head, *t;//p是临时指针 表示当前节点 int ...
2016-04-18
0
408
蛇形填数
#include<stdio.h> #include<string.h> int main() { int a[10][10], n,tot= 0, x, y; memset(a, 0, sizeof(a));//刚开始将数组元素全部清零 tot =...
2016-04-16
0
396
筛法求素数
一般: #include<stdio.h> int main() { int a[100], i, j; for(i = 2; i < 100; i++) a[i] = 1;//令2-99都为1 for(i = 2; i < 100/...
2016-04-13
0
443
欧几里得辗转相除求最大公约数最小公倍数
最大公约数: 第一种方法: 递归: int gcd(int m, int n) { int temp; if(m < n)//m less than n change { temp = m; m = n; n = ...
2016-04-12
0
350
大数阶乘
#include<stdio.h> int main() { int n, i, j, t, digit=1, count, k, temp, a[1000];//digit 表示结果是几位数 //count 表示进位比如7*6 = 42 进位就是4 scanf("%d&...
2016-04-03
0
440
快速排序
//快速排序 #include<stdio.h> void quicksoft(int low, int high); int a[101]; int main() { int i, n; scanf("%d",&n); ...
2016-03-24
0
350
首页
上一页
8
9
10
11
12
13
14
15
16
17
下一页
末页