摘要: 1029. Median (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The median of two sequences 阅读全文
posted @ 2013-09-07 10:01 路萧 阅读(382) 评论(0) 推荐(0)
摘要: 1025. PAT Ranking (25)时间限制200 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueProgramming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists will be merged immedi 阅读全文
posted @ 2013-09-06 19:32 路萧 阅读(419) 评论(0) 推荐(0)
摘要: 1019. General Palindromic Number (20)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA 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 palindromic numbers.Alth 阅读全文
posted @ 2013-09-06 16:22 路萧 阅读(296) 评论(0) 推荐(0)
摘要: 1048. Find Coins (25)时间限制50 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueEva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However, there was a special r 阅读全文
posted @ 2013-09-06 10:40 路萧 阅读(199) 评论(0) 推荐(0)
摘要: Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 #include"algorithm"#include "stdlib.h"#include "cmath"using namespace std;struct Node{ int num; int start; int sum;};vector d;int main(){ int k; c 阅读全文
posted @ 2013-09-04 09:58 路萧 阅读(270) 评论(0) 推荐(0)
摘要: 1036. Boys vs Girls (25)This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Input Specification: Each input file contains one test case. Each case contains a positive integer N, followed by N lines of stud 阅读全文
posted @ 2013-09-01 15:24 路萧 阅读(277) 评论(0) 推荐(0)
摘要: With 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 trophy in South Africa. Similarly, football betting fans were putting their money where their mouths were, by laying all manne 阅读全文
posted @ 2013-08-26 17:07 路萧 阅读(188) 评论(0) 推荐(0)
摘要: 1006. Sign In and Sign Out (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAt 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 out's, you ar 阅读全文
posted @ 2013-08-26 14:20 路萧 阅读(196) 评论(0) 推荐(0)
摘要: 1058. A+B in Hogwarts (20)时间限制50 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueIf you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it' 阅读全文
posted @ 2013-08-21 12:50 路萧 阅读(210) 评论(0) 推荐(0)