PAT
咸鱼一只233
Code change life.
展开
-
PAT甲级1002 A + B
PAT甲级1002这个问题讲的就是多项式加起来,根据题意设置一个数组把系数存储起来就好了,最后输出。 Talk is cheap, show me the code.//包含头文件#include <iostream>#include <cstdio>//需要保留小数点后一位,可以用%.1f,暂时还不会c++的标准输出#define MAXK 1001 //在数组中使用using names原创 2017-02-19 11:13:25 · 259 阅读 · 0 评论 -
PAT甲级1007. Maximum Subsequence Sum (25)
一道简单考察动态规划的题目。好了,我们先看题目吧。/*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 co原创 2017-03-05 12:54:55 · 229 阅读 · 0 评论 -
PAT甲级1005. Spell It Right
b( ̄▽ ̄)d ,水题一道,没有难度。看原题: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原创 2017-03-09 20:54:38 · 216 阅读 · 0 评论 -
PAT甲级1008. Elevator (20)
求电梯运行的总时间简单不解释题目在这里 The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified原创 2017-03-09 21:03:38 · 180 阅读 · 0 评论 -
PAT甲级1009. Product of Polynomials (25)
计算多项式的乘积并输出看题目 This 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原创 2017-03-09 21:19:15 · 231 阅读 · 0 评论 -
PAT甲级1004CountingLeaves
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Each input file contains one test case. Each case starts with a line原创 2017-04-24 12:49:38 · 226 阅读 · 0 评论 -
PAT甲级1006. Sign In and Sign Out (25)
闲来无事刷道题吧。PAT1006,题目先贴上来 /*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原创 2017-03-05 10:14:04 · 217 阅读 · 0 评论 -
PAT 1016. Phone Bills (25)
PAT 1016. Phone Bills (25)题目分析原题相信大家都看见了,题目几乎不涉及算法,主要就是考大家的细心,题目大意就是给我们所有用户的长途电话记录,根据用户分组,计算每个用户需要交的电话费,打印账单,这个题隐含着如果一个用户没有一次完整的打电话记录就不输出,我起初在这个上面栽了跟头,后来及时更正了。解题逻辑读入花费的收费信息读入用户的信息,使用map将...原创 2018-05-08 19:12:41 · 184 阅读 · 0 评论