![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM&PAT
mapw1993
工作之余来搞搞。
展开
-
[PAT (Advanced Level) ]1008. Elevator 解题文档
1008. Elevator (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue The highest building in our city has only one ele原创 2015-10-14 22:43:29 · 426 阅读 · 0 评论 -
[PAT (Advanced Level) ]1027. Colors in Mars 解题文档
1027. Colors in Mars (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue People in Mars represent the colors in thei原创 2015-10-14 16:25:59 · 376 阅读 · 0 评论 -
[PAT (Advanced Level) ]1035. Password 解题文档
1035. Password (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue To prepare for PAT, the judge sometimes has to ge原创 2015-10-13 22:54:19 · 470 阅读 · 0 评论 -
[PAT (Advanced Level) ]1006. Sign In and Sign Out解题文档
1006. Sign In and Sign Out (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue At the beginning of every day, the原创 2015-10-14 17:58:09 · 380 阅读 · 0 评论 -
[PAT (Advanced Level) ]1009. Product of Polynomials 解题文档
1009. Product of Polynomials (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue This time, you are supposed to find原创 2015-10-15 00:49:41 · 453 阅读 · 0 评论 -
[OJ]24点游戏之递归实现(JAVA)
题目描述问题描述:给出4个1-10的数字,通过加减乘除,得到数字为24就算胜利 输入: 4个1-10的数字。[数字允许重复,测试用例保证无异常数字] 输出: true or false 输入描述: 输入4个int整数 输出描述: 返回能否得到24点,能输出true,不能输出false 输入例子: 7 2 1 10 输出例子: true import java.util.Ar原创 2016-04-12 19:59:55 · 3390 阅读 · 0 评论 -
[Leetcode]解题文档-Longest Substring Without Repeating Characters
[这个问题之前面试中有问到过,还是值得学习下的~]3. Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.Examples:Given “abcabcbb”, the answer is原创 2016-05-05 02:25:50 · 658 阅读 · 0 评论 -
[Leetcode]解题文档-Median of Two Sorted Arrays
4. Median of Two Sorted ArraysThere are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).原创 2016-05-05 12:04:45 · 687 阅读 · 0 评论 -
[Leetcode]解题文档-Longest Palindromic Substring
5. Longest Palindromic SubstringGiven a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic subst原创 2016-05-05 22:19:16 · 631 阅读 · 0 评论 -
[Leetcode]解题文档-ZigZag Conversion
题目: The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A原创 2016-05-07 13:41:00 · 952 阅读 · 2 评论 -
[Leetcode]解题文档- Reverse Integer
题目: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 题目意思很简单,但是需要考虑溢出。 尝试了字符串的解法和纯int数字解,发现后者效率更高,那么笔者是如何判断是否溢出的呢?比如1234567899,正序不溢出,逆序溢出。 做法:先判断位数,原创 2016-05-07 19:55:18 · 1052 阅读 · 0 评论 -
[PAT (Advanced Level) ]1081. Rational Sum 解题文档
1081. Rational Sum (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Given N rational numbers in the form "numerat原创 2015-10-14 14:47:20 · 499 阅读 · 0 评论 -
[PAT (Advanced Level) ]1007. Maximum Subsequence Sum 解题文档
1007. Maximum Subsequence Sum (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Given a sequence of K integers { N原创 2015-10-14 20:29:21 · 497 阅读 · 1 评论 -
[PAT (Advanced Level) ]1011. World Cup Betting 解题文档
1011. World Cup Betting (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue With the 2010 FIFA World Cup running, fo原创 2015-10-17 14:09:00 · 361 阅读 · 0 评论 -
[PAT (Advanced Level) ]1012. The Best Rank 解题文档
1012. The Best Rank (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue To evaluate the performance of our first yea原创 2015-10-17 16:31:12 · 391 阅读 · 0 评论 -
[PAT (Advanced Level) ]1013.Battle Over Cities 解题文档
1013. Battle Over Cities (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue It is vitally important to have all the原创 2015-10-21 22:35:22 · 438 阅读 · 0 评论 -
[PAT (Advanced Level) ]1014.Waiting in Line 解题文档
1014. Waiting in Line (30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Suppose a bank has N windows open for serv原创 2015-10-23 23:21:25 · 516 阅读 · 0 评论 -
[PAT (Advanced Level) ]1005. Spell It Right解题文档
1005. Spell It Right (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Given a non-negative integer N, your task i原创 2015-10-12 18:12:03 · 680 阅读 · 1 评论 -
[PAT (Advanced Level) ]1004. Counting Leaves解题文档
1004. Counting Leaves (30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A family hierarchy is usually presented by a原创 2015-10-12 16:59:23 · 535 阅读 · 0 评论 -
[PAT (Advanced Level) ]1031.Hello World for U 解题文档
1031. Hello World for U (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Given any string of N (>=5) characters,原创 2015-10-12 22:51:05 · 461 阅读 · 0 评论 -
[PAT (Advanced Level) ]1015. Reversible Primes 解题文档
1015. Reversible Primes (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A reversible prime in any number system原创 2015-10-12 20:32:37 · 494 阅读 · 0 评论 -
[PAT (Advanced Level) ]1003. Emergency 解题文档
题目链接:http://www.patest.cn/contests/pat-a-practise/1003 1003. Emergency (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Y原创 2015-10-11 22:58:26 · 488 阅读 · 0 评论 -
[PAT (Advanced Level) ]1023. Have Fun with Numbers 解题文档
1023. Have Fun with Numbers (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Notice that the number 123456789 is原创 2015-10-14 17:03:41 · 585 阅读 · 0 评论 -
[Leetcode]解题文档-String to Integer (atoi)
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cas原创 2016-05-07 22:19:17 · 822 阅读 · 1 评论