PTA甲级——1013 1013 Battle Over CitiesIt 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 mus 2024-04-17 PAT甲级备考专区 #练习 #算法 #PAT #并查集
PTA甲级——1012 1012 The Best RankTo 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 Alg 2024-04-17 PAT甲级备考专区 #练习 #算法 #PAT #大模拟
PTA甲级——1011 1011 World Cup BettingWith the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trop 2024-04-17 PAT甲级备考专区 #练习 #算法 #PAT #大模拟
PTA甲级——1010 1010 RadixGiven 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 2024-04-17 PAT甲级备考专区 #练习 #算法 #PAT #进制转换
PTA甲级——1009 1009 Product of PolynomialsThis 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 l 2024-04-17 PAT甲级备考专区 #练习 #算法 #PAT #大模拟
PTA甲级——1008 1008 ElevatorThe 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. I 2024-04-17 PAT甲级备考专区 #练习 #算法 #PAT #大模拟
PTA甲级——1007 1007 Maximum Subsequence SumGiven a sequence of K integers { N1, N2, …, N K }. A continuous subsequence is defined to be { N i, N i+1, …, N j } where 1≤i≤j≤K. The Maximum Subsequence is the continuous 2024-04-17 PAT甲级备考专区 #练习 #算法 #PAT #贪心