自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(66)
  • 资源 (57)
  • 收藏
  • 关注

原创 哈工大python期末考试编程1

def get_standard_str(s): lis = list(s) lis.sort() s = "".join(lis) return sstop_word = ""dict1 = {}for line in iter(input, stop_word): standard_str = get_standard_str(line) ...

2019-06-01 21:07:48 2311

原创 POJ 2488

#include <bits/stdc++.h>using namespace std;int visited[30][30];struct Pos{ int r, c;};Pos path[30];Pos mov[8] = {{-2, -1}, {-2, 1}, {-1, -2}, {-1, 2}, {1, -2}, {1, 2}, {2, -1}, {2, ...

2019-03-23 18:49:23 353

原创 POJ 2816:红与黑

#include <bits/stdc++.h>using namespace std;char maze[25][25];int visited[25][25];int area = 0;int W, H;int sr, sc;void DFS(int r, int c);int main(){ while(true){// cin >> W &g...

2019-03-22 23:36:20 304

原创 POJ 4115:鸣人和佐助

#include <bits/stdc++.h>using namespace std;int M, N, T;char m[210][210];int used[210][210][15];struct Pos{ int r, c, ck, steps; Pos(int rr, int cc, int cck, int ss):r(rr), c(cc), ck(cc...

2019-03-22 20:09:38 452

原创 POJ 3151:Pots

#include <bits/stdc++.h>using namespace std;int A, B, C;struct Status{ int a, b; int prev; int mov; //用来定义operation int src, dest; }; Status que[11000];int head = 0, tail = 1;int flag...

2019-03-22 15:20:09 281

原创 百练 4127:迷宫问题

#include <bits/stdc++.h>using namespace std;struct Pos{ int r, c; int f; Pos(int rr = 0, int cc = 0, int ff = 0) : r(rr), c(cc), f(ff){}};const int maxLofMaze = 8;const int maxLofqueue =...

2019-03-20 21:32:53 742

原创 百练1328:Radar Installation

#include <bits/stdc++.h>using namespace std;const double eps = 1e-6;int n, d;struct Seg{ double x1, x2; bool operator < (const Seg & s) const { return x1 - s.x1 < -eps; }};...

2019-03-20 14:15:11 270

原创 百练1042:Gone Fishing

#include <bits/stdc++.h>using namespace std;const int maxL = 30;int f[maxL];int d[maxL];int t[maxL];int maxFishes = -1; int lakeTime[maxL];int bestLakeTime[maxL];struct Lake{ int No; ...

2019-03-19 22:32:33 500

原创 程序设计实习MOOC / 程序设计与算法(二)测验汇总(2019春季) 002:拨钟问题

#include <iostream>#include <bitset>#include <algorithm>#include <functional>#include <cstring>#include <bits/stdc++.h>using namespace std;int oriClocks[9];...

2019-03-18 19:23:20 800

原创 程序设计实习MOOC / 程序设计与算法(二)测验汇总(2019春季) 017

#include &lt;bits/stdc++.h&gt;using namespace std;const int N = 20 + 1, INF = 0x3f3f3f3f;int f[N][N][N], w, h, m;void solve();int main(){ while(scanf("%d%d%d", &amp;w, &amp;h, &amp;m) != EOF){...

2019-03-17 11:31:49 567

原创 程序设计实习MOOC / 程序设计与算法(二)测验汇总(2019春季) 016

#include &lt;bits/stdc++.h&gt;using namespace std;int w[3402 + 1], v[3402 + 1]; //w用来记录每个Bracelet的重量,v用来记录每个Bracelet的价值int dp[12880 + 1]; //dp用来记录每个背包的最大载重量 int main(){ int N, M; scanf("%d%d", ...

2019-03-17 09:27:32 422

原创 程序设计实习MOOC的程序设计与算法(二)测验汇总(2019春季) 013Zipper

#include &lt;bits/stdc++.h&gt;using namespace std;const int maxn = 2 * 1e2 + 1 ;int dp[maxn][maxn];int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int N; scanf...

2019-03-16 11:56:40 495

原创 程序设计实习MOOC / 程序设计与算法(二)测验汇总(2019春季) 012 拦截导弹

#include &lt;bits/stdc++.h&gt;using namespace std;int main(){ int k; scanf("%d", &amp;k); int key = 1; vector&lt;int&gt; d(k, 0); vector&lt;int&gt; dp(k, 1); int i, j; for(i = 0; i &lt; k; i...

2019-03-15 14:44:01 321

原创 2018 第九届蓝桥杯省赛总结 + 解题报告(C语言B组)3.乘积尾零

#include &lt;bits/stdc++.h&gt;using namespace std;int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int c2 = 0, c5 = 0; int N; int i; for(i = 0; i &lt; 100; i+...

2019-03-14 01:04:32 212

原创 2018 第九届蓝桥杯省赛总结 + 解题报告(C语言B组)2.明码

#include &lt;bits/stdc++.h&gt;using namespace std;string foo(int n);int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int a[10][32]; int i, j; for(i = 0; i &lt; ...

2019-03-14 00:53:39 299

原创 PTA KMP 串的模式匹配 (25 分)

#include &lt;bits/stdc++.h&gt;using namespace std;typedef int Pos;#define NotFound -1void BuildMatch(char *pattern, int *match);Pos KMP(char *str, char *pattern);int main(){ #ifdef ONLINE_JU...

2019-03-10 18:48:46 3153

原创 PTA 7-15 QQ帐户的申请与登陆 (25 分)

#include &lt;bits/stdc++.h&gt;using namespace std;map&lt;string, string&gt; M;int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int N; scanf("%d", &amp;N); char ...

2019-03-09 00:10:12 980

原创 PTA 11-散列2 Hashing (25 分)

#include &lt;bits/stdc++.h&gt;using namespace std;bool isPrime(int n);int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int Max, N; //Max用来存储哈希表的长度 scanf("%d%d", ...

2019-03-08 21:18:36 458

原创 PTA 7-14 电话聊天狂人 (25 分)

#include &lt;bits/stdc++.h&gt;using namespace std;map&lt;long long, int&gt; p;int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int N; scanf("%d", &amp;N); int i...

2019-03-08 19:45:40 865

原创 PTA 7-16 Sort with Swap(0, i) (25 分)

#include &lt;bits/stdc++.h&gt;using namespace std;struct Elem{ bool isSelec = false; int data;};int ElemCntinEachCircle(Elem* A, int pos);int main(){ #ifdef ONLINE_JUDGE #else freopen("in.t...

2019-03-07 01:03:36 481

原创 PTA 7-13 统计工龄 (20 分)

#include &lt;bits/stdc++.h&gt;using namespace std;int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int N, key; cin &gt;&gt; N; map&lt;int, int&gt; M; int i; fo...

2019-03-06 14:48:44 673

原创 PTA 09-排序3 Insertion or Heap Sort (25 分)

#include &lt;bits/stdc++.h&gt;using namespace std;int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int N; cin &gt;&gt; N; int A[N], B[N]; int i, j; int cnt;...

2019-03-06 14:38:59 318

原创 PTA 09-排序2 Insert or Merge (25 分)

#include &lt;bits/stdc++.h&gt;using namespace std;int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int N; cin &gt;&gt; N; int v1[N], v2[N]; int i, j; int len...

2019-03-05 22:12:58 421

原创 PTA 7-12 How Long Does It Take (25 分)

#include &lt;bits/stdc++.h&gt;using namespace std;const int maxn = 100;int mapn[maxn][maxn], dis[maxn];int in[maxn];int n, m;int toposort();int main(){ #ifdef ONLINE_JUDGE #else freope...

2019-02-26 18:53:56 470

原创 PTA 7-10 公路村村通 (30 分)

#include &lt;bits/stdc++.h&gt;using namespace std;const int inf = 999999;int n, m; //N为城镇数目,M为候选道路数目int g[1000][1000]; //g[][]用来存储城镇之间的距离int x, y, z; //初始化时x,y用作一条路径两端的城镇,z用作路径的长度 int cost[10...

2019-02-26 17:29:10 873

原创 12.编写程序,其功能是从键盘输入n*n个整型数(n≤20),组成n行n列数组,打印出其上三角数组。

#include &lt;stdio.h&gt;int main(){ int Matrix[20][20]; int size; int i, j; scanf("%d", &amp;size); for(i = 0; i &lt; size; i++){ for(j = 0; j &lt; size; j++){ scanf("%d", &amp;Matrix[i...

2019-01-04 11:32:41 2284

原创 13. 编写程序,使其具有以下功能: (1) 定义一个用来表示商品信息的结构体类型shangpin,该结构体包含三个成员,分别为spid、spname和spdj,其中spid表示商品号,类型为字符数

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt; typedef struct shangpin{ char spid[7]; char spname[15]; float spdj;}shangpin;int main(){ shangpin w; FILE *fp; gets(w.spid); gets(w.sp...

2019-01-04 10:40:37 3736

原创 14.编写一个名为countc函数(函数头为:int countc(char array[])),其功能是:统计array数组中所存放的字符串中大写字母的数目,并返回字符串中大写字母的数目。再编写一个

#include &lt;stdio.h&gt;int countc(char array[]);int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int count; char array[80]; gets(array); count = countc(arr...

2019-01-03 22:07:46 2474

原创 15. 编写一个函数mysum,其功能是计算n个整数中数值在70~80之间(含70和80)的整数的和,主函数程序的功能是从键盘输入8个整数,通过调用函数mysum计算这8个整数中数值在70~80之间的

#include &lt;stdio.h&gt;int mysum(int a[], int b);int main(){ #ifdef ONLINE_JUDGE #else freopen("in.txt", "r", stdin); #endif int a[8]; for(int i = 0; i &lt; 8; i++){ scanf("%d", &am...

2019-01-03 21:54:53 3410

原创 16. 编写程序,使其具有以下功能: (1) 创建一个能够记录6个任意整数的单向链表。要求:这6个整数必须从键盘获得,并分别保存在链表的不同节点中。 (2) 使用循环语句,遍历已经创建完成的链表,求

#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;#include &lt;bits/stdc++.h&gt;using namespace std;typedef struct ListNode{ int data; ListNode *next;}ListNode;int main(){ #ifdef ONLINE_JU...

2019-01-03 21:45:26 1260

原创 中国大学MOOC-陈越、何钦铭-数据结构-2018秋 06-图3 六度空间 (30 分)

#include &lt;bits/stdc++.h&gt;using namespace std;int const MAXV = 10000;int vertex, edge;int visited[MAXV] = {0};int graph[MAXV][MAXV];int BFS(int vertex);int main(){ #ifdef ONLINE_JUDGE...

2018-12-24 23:47:55 387

原创 在Vs中调试查看队列元素

*((((*((std::_Deque_alloc&amp;lt;std::_Deque_base_types&amp;lt;int,std::allocator&amp;lt;int&amp;gt; &amp;gt; &amp;gt;*)(&amp;amp;((q).c))))._Mypair)._Myval2)._Map),3

2018-12-24 22:34:10 774

原创 中国大学MOOC-陈越、何钦铭-数据结构-2018秋 Case 01-复杂度2 Maximum Subsequence Sum (25 分)

#include &lt;iostream&gt;#define N 10000using namespace std;int main(){ int i, n, a[N], left = 0, right = 0, maxsum = -1, currentsum = 0, temp = 0; cin &gt;&gt; n; for (i = 0; i &lt;...

2018-11-24 23:09:40 531

原创 中国大学MOOC-陈越、何钦铭-数据结构-2018秋 Case1 01-复杂度2 Maximum Subsequence Sum (25 分)

#include &lt;iostream&gt;#define N 10000using namespace std;int main(){ int i, n, a[N], left = 0, right = 0, maxsum = -1, currentsum = 0, temp = 0, flag = 0; cin &gt;&gt; n; for (i =...

2018-11-24 23:07:05 466

原创 中国大学MOOC-陈越、何钦铭-数据结构-2018秋 01-复杂度2 Maximum Subsequence Sum (25 分)

https://paste.ubuntu.com/p/pVYYSy8J8d/https://paste.ubuntu.com/p/z3jChp7kZZ/

2018-11-24 21:42:55 227

原创 PTA习题8-10 输出学生成绩(20 分)

#include&amp;lt;stdio.h&amp;gt;#include&amp;lt;stdlib.h&amp;gt;int main(){ int n,i,*p; double sum=0,max,min; if((p=(int*)malloc(sizeof(int)))==NULL){ exit(1); } scanf(&quot;%d&quot;,&amp;amp;

2018-09-04 15:55:53 9734

原创 PTA习题8-7 字符串排序(20 分)

#include&lt;stdio.h&gt;#include&lt;string.h&gt;#define M 5#define N 80int main(){ char str[M][N],tmp[N]; int i,j; for(i=0;i&lt;M;i++){ scanf("%s",&amp;str[i]); } for...

2018-09-03 22:24:05 12060 1

原创 习题4-6 水仙花数(20 分)

#include&lt;stdio.h&gt;#include&lt;math.h&gt;int main(){ int N,min,max,i,a,b;/*i用来遍历符合条件的整数,a作为i的副本用来处理数据 b用来存储各个位置上的数字*/ int item,sum=0; scanf("%d",&amp;...

2018-08-30 21:08:11 2740 1

原创 习题4-5 换硬币(20 分)

#include&lt;stdio.h&gt;int main(){ int cnt=0,x,i,j,k; scanf("%d",&amp;x); for(k=x/5;k&gt;0;k--){ for(j=x/2;j&gt;0;j--){ for(i=x;i&gt;0;i--){ if...

2018-08-30 16:51:14 336

原创 习题4-4 特殊a串数列求和(20 分)

#include&lt;stdio.h&gt;#include&lt;math.h&gt;int main(){ int i,a,n,s1=0,s=0; scanf("%d%d",&amp;a,&amp;n); for(i=1;i&lt;=n;i++){ s1+=a*pow(10,i-1); s+=s1; } ...

2018-08-30 15:05:41 973

java-x86安装包.zip

java-x86安装包.zip

2020-08-13

HBase大数据.zip

HBase大数据.zip

2020-08-12

msysgit.zip

msysgit版本控制

2020-08-10

清华丘赛分析.rar

清华丘赛分析清华丘赛分析

2020-01-04

清华丘赛代数.zip

清华丘赛代数清华丘赛代数

2020-01-04

清华2020Yau.zip

清华2020丘赛 清华2020丘赛清华2020丘赛清华2020丘赛清华2020丘赛清华2020丘赛清华2020丘赛

2020-01-04

中科大电路中科大电路.zip

中科大电路中科大电路

2019-12-22

中南离散数学.zip

中南大学离散数学

2019-12-22

同濟设计模式.zip

同济大学设计模式

2019-12-22

中科大数字逻辑基础.zip

中科大数字逻辑中科大数字逻辑

2019-12-22

厦大离散数学.zip

厦门大学离散数学

2019-12-22

东南离散数学.zip

东南大学离散数学

2019-12-22

复旦19年数学建模.zip

复旦19年数学建模.zip

2019-09-07

浙江大学大数据课程技术

浙江大学大数据课程技术

2019-05-04

大数据技术原理与应用

大数据技术 大数据技术

2019-04-17

数学建模规划问题

数学建模

2019-04-17

数学建模最小二乘法

数学建模

2019-04-17

MySQL入门基础

MySQL入门基础

2019-04-04

机器学习资料

机器学习资料 机器学习资料 机器学习资料 机器学习资料

2019-04-03

蓝桥杯算法资料_6

蓝桥杯算法资料_6

2018-12-22

中科大图像处理资料.zip

中科大图像处理资料.zip

2021-02-07

NJU信号与系统 课件.pdf

NJU信号与系统

2020-11-11

putty套件.zip

putty套件.zip

2020-07-09

linux下mysql autoInstall.zip

linux环境下安装mysql的自动脚本

2020-07-04

PacketTracer5.0实验实训.zip

PacketTracer5.0实验实训.zip

2020-06-25

packet+tracer使用教程.zip

packet+tracer使用教程.zip

2020-06-25

Packet_Tracer使用教程.zip

Packet_Tracer使用教程.zip

2020-06-25

Packet Tracer经典案例PPT.zip

Packet Tracer经典案例PPT.zip

2020-06-25

attachment; filename=OBS-VirtualCam2.0.4-Installer(1).exe

OBS插件

2020-06-22

HITpwn.zip

HITpwn.zip

2020-05-16

成为Java大牛.zip

成为Java大牛

2020-03-23

HIT200202技术总结(一):PC作为节点参与NDN网络的方案.docx

HIT网络实验

2020-03-19

Packet Tracer中文使用教程.zip

Packet Tracer中文教程

2020-03-17

思科路由与交换基础.zip

思科路由交换

2020-03-17

PuTTY中文版.zip

PuTTY最强大中文版

2020-03-16

HUST计网.zip

HUST计算机网络

2020-02-23

考研408计算机网络谢希仁解答.zip

考研408计算机网络全套资料

2020-02-21

考研408计算机网络谢希仁.zip

考研408计算机网络全套资料

2020-02-21

山东大学最优化.zip

山东大学最优化山东大学最优化山东大学最优化山东大学最优化山东大学最优化山东大学最优化山东大学最优化山东大学最优化山东大学最优化山东大学最优化

2020-02-02

清华丘赛几何.zip

清华丘赛几何 清华丘赛几何

2020-01-04

空空如也

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

TA关注的人

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