专题一
专题一
水墨青杉
这个作者很懒,什么都没留下…
展开
-
专题一 CodeForces - 1260B
题目大意有两个数a,b,有两种操作①a=a-2x,b=b-x②a=a-x,b=b-2x(x为任意大于等于0的整数),问进行若干次操作后,a,b能否全为0解题思路假设x=1,要使得a,b变成0,那么每次操作要将大的数减去2,小的数减去1,这样a,b才有可能同时为0.当减到两个数相等时,可以发现此时只有这两个数为3的倍数才能同时减到0代码实现#include <cstdio>u...原创 2020-01-13 17:17:06 · 117 阅读 · 0 评论 -
专题一 POJ-1905
题目When a thin rod of length L is heated n degrees, it expands to a new length L’=(1+nC)L, where C is the coefficient of heat expansion.When a thin rod is mounted on two solid walls and then heated, ...原创 2020-01-13 12:46:30 · 118 阅读 · 0 评论 -
专题一 HYSBZ - 1734
题目农夫 John 建造了一座很长的畜栏,它包括N (2 <= N <= 100,000)个隔间,这些小隔间依次编号为x1,…,xN (0 <= xi <= 1,000,000,000). 但是,John的C (2 <= C <= N)头牛们并不喜欢这种布局,而且几头牛放在一个隔间里,他们就要发生争斗。为了不让牛互相伤害。John决定自己给牛分配隔间,使任意两...原创 2020-01-13 11:28:01 · 65 阅读 · 0 评论 -
专题一 Gym-101375H
题目Obs: this is an interactive problem. More information is under the “Interaction” section.MaratonIME is gathering to start another group practice. This time, Renzo decided to reward the students wi...原创 2020-01-13 10:38:41 · 167 阅读 · 0 评论 -
专题一 Gym - 101755H
题目You play a new RPG. The world map in it is represented by a grid of n × m cells. Any playing character staying in some cell can move from this cell in four directions — to the cells to the left, ri...原创 2020-01-13 10:28:49 · 134 阅读 · 1 评论 -
专题一 HDU-2660
题目I have N precious stones, and plan to use K of them to make a necklace for my mother, but she won’t accept a necklace which is too heavy. Given the value and the weight of each precious stone, plea...原创 2020-01-13 10:18:30 · 120 阅读 · 0 评论 -
专题一 POJ-1979
题目There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he c...原创 2020-01-13 10:04:24 · 87 阅读 · 0 评论 -
专题一 POJ-2386
POJ-2386题目Due to recent rains, water has pooled in various places in Farmer John’s field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square...原创 2020-01-13 09:57:51 · 84 阅读 · 0 评论 -
专题一 POJ-3061
题目A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal lengt...原创 2020-01-13 09:45:57 · 320 阅读 · 0 评论