- 博客(18)
- 收藏
- 关注
原创 1月31日训练赛A
小希现在手里有一个连着的两块木条,长度分别为l1,l2,木条之间有一个无摩擦的连接点,木条之间可以相互转动,小希将其称之为双截棍。现在小希把长为l1的木条的一端放在原点(0,0),任意转动这两根木条,小希想知道,是否有可能通过一种转动方式使得双截棍的另一端到达指定点呢?如果不能,请输出所有能到达的点中离目标点最近的距离。输入描述:第一行输入一个两个正整数l1,l2,表示木条长度。第...
2019-01-31 14:59:30
178
原创 1月29日训练赛J
Applese 最近又长胖了,于是它打算减肥——练习举重。他在举重的时候用两只手往不同方向用力,从而把杠铃举起来。已知 Applese 两只手分别产生的力的大小,以及它们之间的夹角,试求两力合力的大小。输入描述:仅一行三个整数 f1,f2,af1,f2,a,分别表示两只手产生的力的大小以及它们之间的夹角。输出描述:输出一个实数表示两力合力的大小,要求相对误差或绝对误差不超过10−6...
2019-01-29 15:27:38
157
原创 1月28日小年训练赛E
All cities of Lineland are located on the Ox coordinate axis. Thus, each city is associated with its position xi — a coordinate on the Ox axis. No two cities are located at a single point.Lineland re...
2019-01-28 20:25:44
151
原创 1月28日小年训练赛C
After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set up coordinate axes, and he wants the sides of the rectangle to...
2019-01-28 19:21:15
157
转载 1月28日小年训练赛A
Find the number of k-divisible numbers on the segment [a, b]. In other words you need to find the number of such integer values x that a ≤ x ≤ b and x is divisible by k.InputThe only line contains t...
2019-01-28 18:45:26
133
原创 1月28日小年训练赛B
A restaurant received n orders for the rental. Each rental order reserve the restaurant for a continuous period of time, the i-th order is characterized by two time values — the start time li and the ...
2019-01-28 18:01:47
127
原创 1月26日训练赛E
既然昨天晚上处女座已经训练了,明天才要交作业,那今天就是平淡无奇要上课的一天了。然而处女座也想自己的小姐姐了,可是这节课是老师安排座位,处女座坐在(1,1),而小姐姐坐在(n,m)。他们之间只能通过传纸条的方式来交流感情。对于处女座而言,他上课不想过度分心,因此并不想传纸条,只在那里趁机折千纸鹤。老师上课喜欢用"开火车"的方式让大家轮流回答问题,显然处女座作为(1,1)位,会被第一个叫起来回答...
2019-01-26 15:36:33
228
原创 1月26日训练赛
处女座觉得自己手上的经费可能不太够,于是决定给牛逼学生们带家教。一天他去上课用自己的火眼金睛感觉教室里有一个学生没有来,于是他就叫学生们报出自己的学号。已知这个班上的学号是从1开始连续编号的,处女座告诉你这个班上有多少人,想问问你到底是谁没有来。输入描述:输入数据共两行,第一行为一个整数N,表示班上的学生数量。第二行为一行N-1个整数,表示已经来的学生的学号,按升序给出。输出描述:输...
2019-01-26 15:11:35
259
转载 1月21日训练赛H
有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛?Input输入数据由多个测试实例组成,每个测试实例占一行,包括一个整数n(0<n<55),n的含义如题目中描述。n=0表示输入数据的结束,不做处理。Output对于每个测试实例,输出在第n年的时候母牛的数量。每个输出占一行。Sample Inp...
2019-01-21 18:03:49
148
转载 1月21日训练赛
把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。Input第一行是测试数据的数目t(0 <= t <= 20)。以下每行均包含二个整数M和N,以空格分开。1<=M,N<=10。Output对输入的每组数据M和N,用一行输出相应的K。Sample Input17 3Sampl...
2019-01-21 17:53:30
104
原创 11月21日训练赛F
we define f(A) = 1, f(a) = -1, f(B) = 2, f(b) = -2, … f(Z) = 26, f(z) = -26;Give you a letter x and a number y , you should output the result of y+f(x).InputOn the first line, contains a number T.t...
2019-01-21 17:35:39
161
转载 1月21日训练赛G
喜欢西游记的同学肯定都知道悟空偷吃蟠桃的故事,你们一定都觉得这猴子太闹腾了,其实你们是有所不知:悟空是在研究一个数学问题!什么问题?他研究的问题是蟠桃一共有多少个!不过,到最后,他还是没能解决这个难题,呵呵-当时的情况是这样的:第一天悟空吃掉桃子总数一半多一个,第二天又将剩下的桃子吃掉一半多一个,以后每天吃掉前一天剩下的一半多一个,到第n天准备吃的时候只剩下一个桃子。聪明的你,请帮悟空算一...
2019-01-21 17:33:06
114
转载 1月21日训练赛A
Give you two numbers A and B, if A is equal to B, you should print “YES”, or print “NO”.Inputeach test case contains two numbers A and B.Outputfor each case, if A is equal to B, you should print “...
2019-01-21 17:03:20
128
原创 11月16日训练赛E
EMahmoud has n line segments, the i-th of them has length ai. Ehab challenged him to use exactly 3 line segments to form a non-degenerate triangle. Mahmoud doesn’t accept challenges unless he is sure...
2019-01-18 21:37:08
133
转载 11月6日训练赛D
D在一个国家仅有1分,2分,3分硬币,将钱N兑换成硬币有很多种兑法。请你编程序计算出共有多少种兑法。代码一:#include<iostream>#include<cstdio>using namespace std; int main(){int money;int i,j,k;while(cin>>money){int n=0; ...
2019-01-18 21:33:25
147
原创 11月16日训练赛B
BYoung Timofey has a birthday today! He got kit of n cubes as a birthday present from his parents. Every cube has a number ai, which is written on it. Timofey put all the cubes in a row and went to u...
2019-01-18 21:09:24
138
原创 11月16日训练赛A
AComrade Dujikov is busy choosing artists for Timofey’s birthday and is recieving calls from Taymyr from Ilia-alpinist.Ilia-alpinist calls every n minutes, i.e. in minutes n, 2n, 3n and so on. Artis...
2019-01-18 21:03:33
259
原创 1月16日训练赛
1月16日训练赛AComrade Dujikov is busy choosing artists for Timofey’s birthday and is recieving calls from Taymyr from Ilia-alpinist.Ilia-alpinist calls every n minutes, i.e. in minutes n, 2n, 3n and so ...
2019-01-16 21:53:22
190
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人