![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT
royzdr
这个作者很懒,什么都没留下…
展开
-
1001. A+B Format (20)
今天开始刷PAT了,报了18号考试,剩下这几天一点信心都没有,甲级题库有139题,想把甲级题库刷完,压力山大,每天至少要8题,哎,我现在给自己定目标是5题,刷一半就好了。说回本题,第一题就打击我了,我没认真看就以为是大数减价,立马开了个数组,做一个位运算,然后发现。。。他喵的原来只是考输出格式。Calculate a + b and output the sum in standard forma...原创 2018-02-28 11:55:53 · 212 阅读 · 0 评论 -
1013. Battle Over Cities (25)
做了2h,可见,对图的掌握还是不够。。。。It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know ...原创 2018-03-09 23:41:43 · 87 阅读 · 0 评论 -
1014. Waiting in Line (30)
喵的,看到各位大神说,这题很简单呀,用队列模拟就好。。。。可是我想了很久呀。。。还有已接的业务可以做到17:59这个大坑呀。Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two part...原创 2018-03-11 14:00:17 · 172 阅读 · 0 评论 -
1016. Phone Bills (25)
A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When...原创 2018-03-12 22:23:53 · 139 阅读 · 0 评论 -
PAT的考后感
终于考完了PAT,成绩在意料之中吧。总结一下失败经验吧。 一、毕竟准备得并不充分,或者叫实力不足,这是首要原因,下面的都是次要原因。以后打算还是一天一条PAT,一天一章python学习。 二、对IDE不熟悉,考场有code block,但打开提示找不到编译器路径,然后就不知道怎么处理了,最后还是放弃,只能用visual studio。哎,真心用不惯这货。 ...原创 2018-03-20 19:15:32 · 8817 阅读 · 1 评论 -
1027. Colors in Mars (20)
1027. Colors in Mars (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YuePeople in Mars represent the colors in their computers in a similar way as the Earth people. That is, a c...原创 2018-03-26 17:19:57 · 107 阅读 · 0 评论 -
1028. List Sorting (25)
1028. List Sorting (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueExcel can sort records according to any column. Now you are supposed to imitate this function.InputEach...原创 2018-03-26 17:28:58 · 94 阅读 · 0 评论 -
1029. Median (25)
一连几题都不觉得难,让我产生了一种我也很强的错觉。。。。。这题就是简单的排序,自从学会用qsort之后觉得排序问题都弱爆了。一开始没有留意到题目给出的两个数组已经有序的,我就将两个数组合成一个,然后直接qsort。这时犯了一个逗比的错误,我知道两个1000000会超过数组最大长度,不能直接a[1000000]定义,会出现段错误。要用malloc申请空间,逗比的我只对sque这样做了,Q1和Q2继续...原创 2018-03-27 14:17:47 · 273 阅读 · 0 评论 -
1033. To Fill or Not to Fill (25)
居然用例2的起点压根没有加油站。。。。MMPWith highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time...原创 2018-04-02 23:24:03 · 137 阅读 · 0 评论 -
1030. Travel Plan (30)
1030. Travel Plan (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA traveler's map gives the distances between cities along the highways, together with the cost of each highwa...原创 2018-03-28 21:14:32 · 146 阅读 · 0 评论 -
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 contains the informa...原创 2018-03-02 14:31:15 · 112 阅读 · 0 评论 -
1012. The Best Rank (25)
To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algebra), and E - Eng...原创 2018-03-09 21:27:41 · 116 阅读 · 0 评论 -
1002. A+B for Polynomials (25)
This time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomia...原创 2018-02-28 14:53:04 · 94 阅读 · 0 评论 -
1010. Radix (25)
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is a binary number.Now for any pair of positive in...原创 2018-03-08 17:10:35 · 106 阅读 · 0 评论 -
1011. World Cup Betting (20)
题目在这里巨坑,不对0.01四舍五入题目例子是错的,是37.97,最后加了0.005才是37.98.但是提交时候却不需要0.005With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best...原创 2018-03-08 21:44:21 · 164 阅读 · 0 评论 -
1003. Emergency (25)
下午时候还说要做8题呢。。。。到现在才完成3题。。。还是要看书和看网上答案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 o...原创 2018-02-28 23:52:11 · 152 阅读 · 0 评论 -
1004. Counting Leaves
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.InputEach input file contains one test case. Each case starts with a line con...原创 2018-03-01 16:24:05 · 111 阅读 · 0 评论 -
1005. Spell It Right (20)
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 case. Eac...原创 2018-03-01 17:09:12 · 89 阅读 · 0 评论 -
1006. Sign In and Sign Out
终于可以独立自己做完一题。。。。。可是怎么都开心不起来呢#include <stdio.h>#include <stdlib.h>#include <stdbool.h>#include <string.h>struct person{ char IDty[100]; int logIn[3]; int logOu...原创 2018-03-01 20:21:28 · 151 阅读 · 0 评论 -
1007. 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 subsequen...原创 2018-03-01 22:20:06 · 100 阅读 · 0 评论 -
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 order. It costs 6 sec...原创 2018-03-01 23:00:12 · 115 阅读 · 0 评论 -
1031. Hello World for U (20)
又遇到一题水题,又产生了一种我很强的错觉了,话说csdn的表情怎么还是00年代风。。。。这题唯一难点不在编程,在于弄清楚n1,n2,n3是怎么算出来的Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld...原创 2018-03-29 15:37:55 · 103 阅读 · 0 评论