自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (2)
  • 收藏
  • 关注

转载 杭电OJ 1024(C++)

这一题花了很长时间,补了动态规划的知识,参考了几篇博客。https://www.cnblogs.com/dongsheng/archive/2013/05/28/3104629.htmlhttps://blog.csdn.net/aaaliaosha/article/details/77163512#include <iostream>#include <cstr...

2019-08-31 13:23:03 460

原创 杭电OJ 1023(C++)

本题是计算卡特兰数,关于卡特兰数的详细说明请参考博客:https://blog.csdn.net/wookaikaiko/article/details/81105031#include <iostream>#include <cstring>using namespace std;const int LEN = 200;int catalan[102][L...

2019-08-14 12:20:04 513

原创 杭电OJ 1022(C++)

本题是基本的入栈出栈问题,建立栈之后,基本操作即可。#include <iostream>#include <string>#include <stack>using namespace std;string in, out; //输入输出队列string order[100]; //输出消息void trainStation(int n);...

2019-08-14 12:15:03 479

原创 杭电OJ 1021(C++)

模运算的性质之一:(A+B)%C = (A%C+B%C)%C#include <iostream>using namespace std;int arr[1000002];bool fun(int n);int main(){ int n; while (cin >> n) { if (fun(n)) cout << "yes...

2019-08-12 09:35:13 338

原创 杭电OJ 1020(C++)

#include <iostream>#include <string>using namespace std;int main(){ int n; cin >> n; while (n--) { string s1, s2; cin >> s1; int len = s1.length(); int time =...

2019-08-11 17:40:01 417

原创 杭电OJ 1019(C++)

a和b的最小公倍数 = a*b/(a和b的最大公约数)__int64的取值范围为[-2^63, 2^63),不能使用int类型,否则可能超出int存储范围。#include <iostream>using namespace std;int main(){ int n, m; cin >> n; while (n--) { __int64 a,...

2019-08-11 15:45:14 357

原创 杭电OJ 1018(C++)

整数a的位数为(int)log10(a)+1,则计算N!,可以用(int)log10(1)+log10(2)+...+log10(n)+1。#include <iostream>#include <cmath>using namespace std;int main(){ int n, num; cin >> n; for (int i =...

2019-08-10 21:30:01 251

原创 杭电OJ 1017(C++)

题目很简单,输入输出格式挺难看懂。首先输入的N代表输入数据的块数,每个输入块都有若干组数据,由0 0结束一个输入块。每个输出块之间有一个空行,每个输出块的Case从1开始。#include <iostream>using namespace std;int main(){ int N; int m, n; cin >> N; for (int ...

2019-08-10 21:00:02 370

原创 杭电OJ 1016(C++)

本题使用基本的深度优先搜索,注意输出格式。#include <iostream>#include <cstring>using namespace std;bool isPrime(int n);void dfsCircle(int pre);int Circle[22]; //存储圆环所有数字bool isUse[22]; //存储数字几是否被使用i...

2019-08-10 20:00:01 565

原创 杭电OJ 1015(C++)

最简单的暴力破解,枚举所有情况,选择出最佳。#include <iostream>#include <string>#include <cmath>using namespace std;bool flag;string Klein(int target, string &s);int main(){ int target; ...

2019-08-09 17:22:40 560

原创 杭电OJ 1014(C++)

本题较为简单,计算出MOD个结果后,将其排序,然后一一对照即可。#include <iostream>#include <algorithm>#include <iomanip>using namespace std;int main(){ int STEP, MOD; while (cin >> STEP >...

2019-08-09 17:20:30 274

原创 杭电OJ 1013(C++)

#include <iostream>#include <string>using namespace std;int main(){ string num; //由于可能输入特别大的整数,所以不能使用基本类型存储,使用string类型 while (getline(cin, num)) { if (num[0] == '0') //整数中以0开头的只...

2019-08-06 19:25:11 277

原创 杭电OJ 1012(C++)

#include <iostream>#include <iomanip>using namespace std;long int factorial(int n);int main(){ cout << "n e" << endl; cout << "- -----------" << endl; co...

2019-08-06 16:50:01 187

转载 杭电OJ 1011(C++)

#include <iostream>#include <vector>using namespace std;const int SIZE = 105;int roomNumber, trooperNumber;int cost[SIZE], brain[SIZE]; //房间所需trooper数量、brain数量int dp[SIZE][SIZE]; /...

2019-08-06 15:05:16 435

原创 杭电OJ 1010(C++)

本题是基本的路径搜索题目,使用深度优先搜索(DFS)和奇偶剪枝。#include <iostream>#include <cstring>#include <cmath>using namespace std;const int LEN = 10;char map[LEN][LEN];bool flag;int N, M, T;int s...

2019-08-05 15:25:25 528

原创 杭电OJ 1009(C++)

本题使用一个简单的贪心算法,首先计算每个房间交换的“性价比”,并从大到小排序。如果M足够,则优先交换“性价比”高的房间的JavaBeans;M不足时,按照比例将所剩的M交换完。#include <iostream>#include <iomanip>#include <algorithm>using namespace std;struct ...

2019-08-04 16:45:14 396

原创 杭电OJ 1008(C++)

本题比较简单,注意每次输入新的一组数据时将变量清零。#include <iostream>using namespace std;int main(){ int n, now; while (cin >> n) { if (n == 0) break; int pre = 0, total = 0; for (int i = 0; i...

2019-08-03 17:00:13 185

转载 杭电OJ 1007(C++)

#include <iostream>#include <algorithm>#include <cmath>#include <iomanip>using namespace std;const int SIZE = 100005;const int L = -1;const int R = 1;struct coord //...

2019-08-03 11:22:03 373

转载 杭电OJ 1006(C++)

转载自博客 https://blog.csdn.net/u010343650/article/details/51059415#include <iostream>#include <iomanip>using namespace std;struct Segment //区间结构{ double a, b;};//由两个区间求出它们的交区间Seg...

2019-08-02 13:24:06 424

原创 杭电OJ 1005(C++)

本题的N可能非常大,如果使用普通的递归,则会超时。观察f(n)的计算式之后,发现f(n)的值的取值范围为{0,1,2,3,4,5,6},又f(n)的值是根据f(n-1)和f(n-2)确定的,所以从第7 * 7 = 49个数,必定回到f(1)开始循环。#include <iostream>using namespace std;int f(int a, int b, in...

2019-08-01 16:30:16 328

MFC程序操作Word

MFC程序操作Word

2022-12-04

C++鼠标连点器源程序

C++鼠标连点器源程序

2022-12-04

Qt程序 互联网+船舶 课程设计

Qt程序 互联网+船舶 课程设计

2022-12-04

MFC波形图控件TeeChart5

MFC波形图控件TeeChart5

2022-11-16

VMware Workstation 12.5

VMware Workstation 12.5安装包

2022-11-16

VirtualBox安装包

VirtualBox安装包

2022-11-16

SQLyog-x64.zip

SQLyog 64位安装包。

2022-11-16

High-Speed Charting使用方法及Demo

High-Speed Charting使用方法及Demo,Win32和x64均可使用。

2022-11-16

银河麒麟用户手册及运维手册

银河麒麟用户手册及运维手册,包含5个PDF。

2022-11-16

银河麒麟服务器操作手册

银河麒麟服务器操作手册,包含4个PDF。

2022-11-16

QT 披萨店点餐系统(完整代码可运行)

QT披萨店点餐系统,课程设计项目。

2021-12-29

QT、C++ 米其林自助点餐系统

QT自助点餐系统源代码,有界面,包括客户端和服务器端,能够实现局域网内点餐信息的传输。 QT自助点餐系统源代码,有界面,包括客户端和服务器端,能够实现局域网内点餐信息的传输。 QT自助点餐系统源代码,有界面,包括客户端和服务器端,能够实现局域网内点餐信息的传输。

2016-11-16

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除