随笔分类 - 好题
经典题
摘要:Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at bread making and selling. She can sell the i-th customer a piece of bread ...
阅读全文
摘要:On every June 1st, the Children's Day, there will be a game named "crashing balloon" on TV. The rule is very simple. On the ground there are 100 labe...
阅读全文
摘要:DescriptionGiven a series of n numbers a1, a2, ..., an, the partial sum of the numbers is defined as the sum of ai, ai+1, ..., aj.You are supposed to calculate how many partial sums of a given series of numbers could be divided evenly by a given number m.InputThere are multiple test, each contains 2
阅读全文
摘要:Description There are n single boys and m single girls. Each of them may love none, one or several of other people unrequitedly and one-sidedly. For the coming q days, each night some of them will come together to hold a single party. In the party, if someone loves all the others, but is not loved b
阅读全文
摘要:DescriptionGiven N stations, you want to carry goods from station 1 to station N. Among these stations, we use M tubes to connect some of them. Each t...
阅读全文
摘要:DescriptionSeveral startup companies have decided to build a better Internet, called the "FiberNet". They have already installed many nodes that act as routers all around the world. Unfortunately, they started to quarrel about the connecting lines, and ended up with every company laying it
阅读全文
摘要:DescriptionRunning a taxi station is not all that simple. Apart from the obvious demand for a centralised coordination of the cabs in order to pick up the customers calling to get a cab as soon as possible,there is also a need to schedule all the taxi rides which have been booked in advance.Given a
阅读全文
摘要:DescriptionAn arithmetic series consists of a sequence of terms such that each term minus its immediate predecessor gives the same result. For example, the sequence 3, 7, 11, 15 is the terms of the arithmetic series 3+7+11+15; each term minus its predecessor equals 4. (Of course there is no requirem
阅读全文
摘要:Descriptiona program that, given a natural number N between 0 and 4999 (inclusively), and M distinct decimal digits X1,X2..XM (at least one), finds the smallest strictly positive multiple of N that has no other digits besides X1,X2..XM (if such a multiple exists). InputThe input has several data set
阅读全文
摘要:DescriptionIt is always very nice to have little brothers or sisters. You can tease them, lock them in the bathroom or put red hot chili in their sandwiches. But there is also a time when all meanness comes back! As you know, in one month it is Christmas and this year you are honored to make the big
阅读全文
摘要:DescriptionLet f(n) be the number of factors of integer n.Your task is to count the number of i(1 #define MAXN 1000001int f[MAXN]={0};int s[MAXN]={0};int c[MAXN]={0};int main(){ //先求出每个数的因子数 for(int i=1; i<MAXN; i++){ for(int j=1; i*j<MAXN; j++){ f[i*j]++; } } /...
阅读全文
摘要:描述In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjac...
阅读全文

浙公网安备 33010602011771号