- 博客(17)
- 收藏
- 关注
原创 PAT1007 Maximum Subsequence Sum
题目描述Given a sequence of K integers { N1, N2, …, NK}. A continuous subsequence is defined to be { Ni, Ni+1 , …, Nj} where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has the...
2019-11-01 20:58:44
191
原创 PAT 1006 Sign In and Sign Out
题目描述At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in’s and out’...
2019-10-25 16:21:06
184
原创 PAT 1005 Spell It Right
题目描述Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test cas...
2019-10-24 11:06:53
178
原创 PAT 1003 Emergency
题目As an emergency rescue team leader of a city, you are given a special map of your country.The map shows several scattered cities connected by some roads.Amount of rescue teams in each city and t...
2019-10-04 19:18:14
140
原创 2019-09 csp认证 第二题
#include<iostream>#include<cstdio>#include<algorithm>using namespace std;int vis[10000]={0};//改为题目要求数据量+5int tree[10000];//也改int main(){ int n,m; scanf("%d",&n); ...
2019-09-15 20:12:04
547
原创 PAT 1002 A+B for Polynomials
DescribeThis time, you are supposed to find A+B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the ...
2019-08-15 16:38:36
109
原创 PAT 1001 A+B Format
DescribeCalculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each...
2019-08-15 16:31:17
114
原创 洛谷1164 小A点菜
题目背景uim神犇拿到了uoi的ra(镭牌)后,立刻拉着基友小A到了一家……餐馆,很低端的那种。uim指着墙上的价目表(太低级了没有菜单),说:“随便点”。题目描述不过uim由于买了一些辅(e)辅(ro)书,口袋里只剩M元(M≤10000)。餐馆虽低端,但是菜品种类不少,有N种(N≤100),第i种卖a i元(a i ≤1000)。由于是很低端的餐馆,所以每种菜只有一份。小A奉行“不把...
2019-08-10 15:28:43
204
原创 POJ 1088 滑雪 题解
POJ1062 昂贵的聘礼滑雪描述Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 2...
2019-08-09 14:38:09
458
原创 POJ 1062 昂贵的聘礼 题解
昂贵的聘礼描述年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者替...
2019-08-09 14:28:00
709
原创 实验三 循环和子程序设计
一. 实验目的掌握子程序、宏和中断程序的设计方法;熟悉在PC机上建立、汇编、连接、调试和运行8086/8088汇编语言程序的过程。二. 实验内容编写一个子程序计算z=f(x,y)=x/y+x-y(x,y,z有符号数内存字数)。要求通过堆栈传送输入参数,输出参数通过AX传递。(要求输入输出实现,且有提示)。编写一个宏,求三个数的最大数,原型为:MAX3 x,y,z,min,最大值要求...
2019-08-09 10:02:05
1009
原创 实验二 汇编语言程序设计(顺序、多分支、循环)
一. 实验目的1、掌握顺序和循环程序结构和设计方法;2、熟悉在PC机上建立、汇编、连接、调试和运行8086/8088汇编语言程序的过程。二. 实验内容1、X、Y、Z、V均为字变量,在X、Y、Z、V字单元中存放是16位带符号数。试编写汇编语言程序完成以下功能:①计算表达式值(V–(X*Y+Z-720))/X;②将上述表达式运算结果整数放在SUM1单元,余数放在SUM2单元。2、使用地址...
2019-07-22 08:48:24
940
原创 VS code配置C/C++环境(Windows)
VS code配置文件关于怎样调出配置文件,相信大家都有了解,不再赘述。c_cpp_properties.json关于怎样查看需要的TDM/Mingw路径
&amp;amp;amp;amp;amp;amp;quot;#奇偶剪枝简介&amp;amp;amp;amp;amp;amp;quot;奇偶剪枝是数据结构的搜索中,剪枝的一种特殊小技巧。具体而言,就是判断是否能在恰好的时间,步数达到目的。&amp;amp;amp;amp;amp;amp;quot;#具体的实现方法&amp;amp;amp;amp;amp;amp;quot;设起点位置为(startx,starty),终点位置为(over
2019-03-07 16:07:58
190
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人