随笔分类 -  PAT

上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页
摘要: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 c 阅读全文
posted @ 2020-01-31 23:45 SteveYu 阅读(192) 评论(0) 推荐(0)
摘要:To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mat 阅读全文
posted @ 2020-01-31 22:05 SteveYu 阅读(153) 评论(0) 推荐(0)
摘要: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 ro 阅读全文
posted @ 2020-01-31 11:58 SteveYu 阅读(187) 评论(0) 推荐(0)
摘要:最短路径 1.概念 单源最短路径 单源最短路径实际是计算源点到其他各个顶点的最短路径的长度,常见算法有dijkstra算法 全局最短路径 全局最短路径实际是计算每个源点到其他各个顶点的最短路径的长度,我们可以调用dijkstra算法N次(这样没有Floyd算法快),常见解决全局最短路径的方法是Flo 阅读全文
posted @ 2020-01-31 04:13 SteveYu 阅读(710) 评论(0) 推荐(1)
摘要:People on Mars count their numbers with base 13: Zero on Earth is called "tret" on Mars. The numbers 1 to 12 on Earth is called "jan, feb, mar, apr, m 阅读全文
posted @ 2020-01-29 21:17 SteveYu 阅读(168) 评论(0) 推荐(0)
摘要:Given two sets of integers, the similarity of the sets is defined to be /, where N​c​​ is the number of distinct common numbers shared by the two sets 阅读全文
posted @ 2020-01-29 20:47 SteveYu 阅读(179) 评论(0) 推荐(0)
摘要:Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color 阅读全文
posted @ 2020-01-29 19:53 SteveYu 阅读(138) 评论(0) 推荐(0)
摘要:Zhejiang University has 40,000 students and provides 2,500 courses. Now given the registered course list of each student, you are supposed to output t 阅读全文
posted @ 2020-01-29 19:12 SteveYu 阅读(192) 评论(0) 推荐(0)
摘要:Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the 阅读全文
posted @ 2020-01-29 18:52 SteveYu 阅读(135) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2020-01-29 14:21 SteveYu 阅读(178) 评论(0) 推荐(0)
摘要:To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords 阅读全文
posted @ 2020-01-28 21:41 SteveYu 阅读(229) 评论(0) 推荐(0)
摘要:People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, wher 阅读全文
posted @ 2020-01-28 21:14 SteveYu 阅读(126) 评论(0) 推荐(0)
摘要:Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we c 阅读全文
posted @ 2020-01-28 17:32 SteveYu 阅读(149) 评论(0) 推荐(0)
摘要:Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 1673 阅读全文
posted @ 2020-01-27 16:57 SteveYu 阅读(145) 评论(0) 推荐(0)
摘要:Consider a positive integer N written in standard notation with k+1 digits a​i​​ as a​k​​⋯a​1​​a​0​​ with 0 for all i and a​k​​>0. Then N is palindrom 阅读全文
posted @ 2020-01-27 16:29 SteveYu 阅读(200) 评论(0) 推荐(0)
摘要:Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list. Input Specification: Each input file contains 阅读全文
posted @ 2020-01-27 15:59 SteveYu 阅读(131) 评论(0) 推荐(0)
摘要:Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a numbe 阅读全文
posted @ 2020-01-27 15:08 SteveYu 阅读(112) 评论(0) 推荐(0)
摘要:Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run sim 阅读全文
posted @ 2020-01-27 14:45 SteveYu 阅读(191) 评论(0) 推荐(0)
摘要:A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years 阅读全文
posted @ 2020-01-27 13:22 SteveYu 阅读(146) 评论(0) 推荐(0)
摘要:A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文
posted @ 2020-01-27 12:44 SteveYu 阅读(173) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页