摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB When a number is expressed in decimal, the kth digit represents a multiple of 10 k. (Digits are numbered from right to left, where the least signific... 阅读全文
posted @ 2012-05-04 16:23 Gavin Lipeng Ma 阅读(303) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For ... 阅读全文
posted @ 2012-05-04 16:12 Gavin Lipeng Ma 阅读(258) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Your chemistry lab instructor is a very enthusiastic graduate student who clearly has forgotten what their undergraduate Chemistry 101 lab experience... 阅读全文
posted @ 2012-05-04 15:49 Gavin Lipeng Ma 阅读(252) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB As part of an arithmetic competency program, your students will be given randomly generated lists of from 2 to 15 unique positive integers and asked ... 阅读全文
posted @ 2012-05-04 15:45 Gavin Lipeng Ma 阅读(418) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB There are N lights in a line. Given the states (on/off) of the lights, your task is to determine at least how many lights should be switched (from on... 阅读全文
posted @ 2012-04-01 17:37 Gavin Lipeng Ma 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Given an positive integer A (1 <= A <= 100), output the lowest bit of A. For example, given A = 26, we can write A in binary form as 11010, so the... 阅读全文
posted @ 2012-04-01 17:37 Gavin Lipeng Ma 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Sam and Ella run a catering service. They like to put on a show when serving meatballs to guests seated at round tables. They march out of the kitche... 阅读全文
posted @ 2012-04-01 13:40 Gavin Lipeng Ma 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Tan Your Hide, Inc., owns several coin-operated tanning salons. Research has shown that if a customer arrives and there are no beds available, the cu... 阅读全文
posted @ 2012-04-01 09:33 Gavin Lipeng Ma 阅读(307) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 10 Seconds Memory Limit: 32768 KB In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encrypti... 阅读全文
posted @ 2012-03-31 17:34 Gavin Lipeng Ma 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Your school organized a big party to celebrate your team brilliant win in the prestigious, worldfamous ICPC (International Collegiate Poetry Contes... 阅读全文
posted @ 2012-03-31 17:05 Gavin Lipeng Ma 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 存在于access中的所有数据,可以通过非常简单的办法导出到其它数据库中。 方法如下: 在access中右击需要导出的表 点击导出: 此时可以看到access提供的所有的导出方法,这里为了导出到其它数据库,我选择ODBC数据库 点击确定,此时弹出一个ODBC选择的对话框,选择你已经建立的ODBC连接即可。 例如,我将数据库导出到了SqlServer 2008中,选择能够... 阅读全文
posted @ 2012-03-31 11:07 Gavin Lipeng Ma 阅读(2562) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Give a number n, find the minimum x that satisfies 2^x mod n = 1. Input One positive integer on each line, the value of n. Output If the minimu... 阅读全文
posted @ 2012-03-30 16:44 Gavin Lipeng Ma 阅读(485) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB An inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but then has to rest a minute before cl... 阅读全文
posted @ 2012-03-30 16:01 Gavin Lipeng Ma 阅读(351) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB One of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored tak... 阅读全文
posted @ 2012-03-27 16:41 Gavin Lipeng Ma 阅读(268) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Scenario A single playing card can be placed on a table, carefully, so that the short edges of the card are parallel to the table's edge, and half... 阅读全文
posted @ 2012-03-27 16:06 Gavin Lipeng Ma 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Little Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different height. ``Look, I've built a wa... 阅读全文
posted @ 2012-03-27 15:02 Gavin Lipeng Ma 阅读(458) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB In the 22nd Century, scientists have discovered intelligent residents live on the Mars. Martians are very fond of mathematics. Every year, they wou... 阅读全文
posted @ 2012-03-27 14:44 Gavin Lipeng Ma 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KBIn most languages, text is written from left to right. However, there are other languages where text is read and written from right to left. As a first step towards a program that automatically translates from a left-to-right language into a right-to-left 阅读全文
posted @ 2012-03-27 14:01 Gavin Lipeng Ma 阅读(318) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Mathematics can be so easy when you have a computer. Consider the following example. You probably know that in a right-angled triangle, the length ... 阅读全文
posted @ 2012-03-27 13:57 Gavin Lipeng Ma 阅读(353) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB A group of n gamblers decide to play a game: At the beginning of the game each of them will cover up his wager on the table and the assitant must make su... 阅读全文
posted @ 2012-03-20 12:53 Gavin Lipeng Ma 阅读(374) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB One measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instanc... 阅读全文
posted @ 2012-03-16 18:41 Gavin Lipeng Ma 阅读(620) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB It is said that 90% of frosh expect to be above average in their class. You are to provide a reality check. Input The first line of standard inpu... 阅读全文
posted @ 2012-03-16 16:18 Gavin Lipeng Ma 阅读(247) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB Given two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer. This problem ... 阅读全文
posted @ 2012-03-16 16:08 Gavin Lipeng Ma 阅读(213) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 10 Seconds Memory Limit: 32768 KB We all know that FatMouse doesn't speak English. But now he has to be prepared since our nation will join WTO soon. Thanks to Turing we have compu... 阅读全文
posted @ 2012-03-15 21:34 Gavin Lipeng Ma 阅读(247) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! ... 阅读全文
posted @ 2012-03-15 20:59 Gavin Lipeng Ma 阅读(954) 评论(0) 推荐(0) 编辑