洛谷1002优化算法_加法定理
// 洛谷1002优化算法_加法定理.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> using namespace std; int main() { int bx, by, cx, cy; long long f[25][25]; cin >> bx >> by…
312
|
|
|
2019-4-15 16:07
|
2019-4-15 16:07
51 字
|
3 分钟
洛谷1002深搜dfs
// 洛谷1002深搜dfs.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> using namespace std; #define N 25 int s[N][N]; int x1, x2, h1, h2; long sum = 0; void creat(in…
302
|
|
|
2019-4-15 16:06
|
2019-4-15 16:06
64 字
|
4 分钟
洛谷_P1017 进制转换
// 洛谷_P1017 进制转换.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> using namespace std; int main() { char ch[1000]; int n, N,i=0; cin >> n >> N; while (n!=0) {…
402
|
|
|
2019-4-15 16:05
|
2019-4-15 16:05
40 字
|
2 分钟
构造哈夫曼树的哈夫曼算法
#include "stdafx.h" #include "stdio.h" #define maxval 100.0 #pragma warning(disable:4996) typedef struct{ float weight; int parent, lchild, rchild; }hufmtree; void Huffman(huf…
325
|
|
|
2019-4-15 16:04
|
2019-4-15 16:04
68 字
|
4 分钟
zoj3124 Celebrity jeopardy
// zoj3124 Celebrity jeopardy.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> #include<string> using namespace std; int main() { string str1; while (getli…
286
|
|
|
2019-4-15 16:03
|
2019-4-15 16:03
24 字
|
2 分钟
zoj2812 Quicksum 数学题
// zoj2812 Quicksum 数学题.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> #include<cstring> using namespace std; int main() { char ch[256]; while (1) { int …
285
|
|
|
2019-4-15 16:03
|
2019-4-15 16:03
37 字
|
2 分钟
ZOJ2176 SpeedLimit 数学题
// ZOJ2176 SpeedLimit 数学题.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> using namespace std; int main() { int N,i; cin >> N; while (N!=- 1) { int sum = 0; …
336
|
|
|
2019-4-15 16:02
|
2019-4-15 16:02
40 字
|
2 分钟
ZOJ-1948-团队队列
// ZOJ-1948-团队队列.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> #include<string> #include<map> #include<queue> using namespace std; const int maxt …
283
|
|
|
2019-4-15 16:02
|
2019-4-15 16:02
70 字
|
4 分钟
ZOJ-1405Tanning Salon
// ZOJ-1405Tanning Salon.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> #include<string> #include<string.h> using namespace std; int main() { int n; c…
363
|
|
|
2019-4-15 16:01
|
2019-4-15 16:01
88 字
|
5 分钟
ZOJ1295 Reverse Text
// ZOJ1295 Reverse Text.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> #include<cstring> using namespace std; void print(char a[]) { int l; l = strlen(a)…
341
|
|
|
2019-4-15 16:01
|
2019-4-15 16:01
39 字
|
2 分钟