算法笔记实践记录第三章
DemonInside
仅仅是个未经世事的学生而已
展开
-
A1001. A+B Format (20)
A1001 Calculate 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 Each input fi原创 2018-01-28 23:55:36 · 188 阅读 · 0 评论 -
A1046. Shortest Distance (20)
A1046 The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits. Input Specification: Each input原创 2018-01-29 00:11:09 · 179 阅读 · 0 评论 -
A1042. Shuffling Machine (20)
A1042 The machine shuffles a deck of 54 cards according to a given random order and repeats for a given number of times. It is assumed that the initial status of a card deck is in the following ord原创 2018-01-29 00:05:20 · 177 阅读 · 0 评论 -
A1031. Hello World for U (20)
A1031 Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as: h d e l l r lowo That is, the characters原创 2018-01-29 00:02:58 · 363 阅读 · 0 评论 -
A1019. General Palindromic Number (20)
A1019 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. All single digit numbers are palindro原创 2018-01-29 00:01:17 · 175 阅读 · 0 评论 -
A1009. Product of Polynomials (25)
A1009 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原创 2018-01-29 00:00:01 · 190 阅读 · 0 评论 -
A1006. Sign In and Sign Out (25)
A1006 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原创 2018-01-28 23:58:40 · 182 阅读 · 0 评论 -
A1002. A+B for Polynomials (25)
A1002 This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each case occupies 2 lines, and each line contains the information原创 2018-01-28 23:57:18 · 300 阅读 · 0 评论 -
A1082. Read Number in Chinese (25)
A1082题目描述如下:Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output "Fu" first if it is negative. For example, -123456789 is read as "Fu yi Yi e...原创 2018-01-28 21:39:36 · 322 阅读 · 0 评论