
模拟
追逐星辰的光
脚踏实地,虚心前行
展开
-
A. Round House 模拟
A. Round Housetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya lives in a round building, whose entran原创 2017-10-18 19:16:29 · 327 阅读 · 0 评论 -
poj 3087 Shuffle'm Up
A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each stack containing C chips.原创 2017-12-31 15:58:29 · 195 阅读 · 0 评论 -
POJ3414 - Pots
You are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap;DROP(i) empty the po原创 2017-12-31 23:32:01 · 338 阅读 · 0 评论 -
UVA 221 Urban Elevations
题目链接:https://vjudge.net/problem/UVA-221有n个建筑物。左侧是俯视图(左上角是建筑物编号,右下角是高度),右侧是从南向北看的正视图。输入每个建筑物左下角坐标(即x,y坐标的最小值),宽度(即x方向的长度),深度(即y方向的长度)和高度(以上数据均为实数),输出正视图中能看到的所有建筑物,按照左下角x坐标从小到大进行排序。左下角坐标相同时,按照y坐标从小到原创 2018-01-11 17:13:12 · 494 阅读 · 0 评论 -
UVA 1594 Ducci Sequence
题目链接:https://vjudge.net/problem/UVA-1594题意:对于一个n元组(a1,a2,a3,...,an),可以对于每个数求出它和下一个数的差的绝对值,得到一个新的n元组(|a1-a2|,|a2-a3|,...,|an-a1|).重复这个过程,得到的序列成为Ducci序列,例如(8, 11, 2, 7) → (3, 9, 5, 1) → (6, 4, 4, 2) →原创 2018-01-11 20:58:49 · 288 阅读 · 0 评论 -
UVA 10935 Throwing cards away I
题目链接:https://vjudge.net/problem/UVA-10935题意:桌子上有n(nSample Input7191060Sample OutputDiscarded cards: 1, 3, 5, 7, 4, 2Remaining card: 6Discarded cards: 1, 3, 5, 7, 9, 11, 13, 15, 1原创 2018-01-12 10:01:23 · 313 阅读 · 0 评论 -
UVA 1595 Symmetry
题目链接:https://vjudge.net/problem/UVA-1595题意:给出平面上N(N题意很简单,由于点的坐标范围太大,点的个数很少,我们可以用map存点。既然找到一条对称线,此时我们应该先满足点的对称,即对这些点进行以横坐标排序,然后找到中间的那个点,然后这点左边的所有点以这点所在的竖线为中心,向右面做投影,如果右边的投影没有点,就证明不对称,就输出NO,这里判断,只需要原创 2018-01-12 13:58:06 · 255 阅读 · 0 评论 -
2018年全国多校算法寒假训练营练习比赛(第一场)-圆圈
题目描述 圈圈圆圆圈圈,lulu小朋友最近看喜羊羊看多了,老是受刺激就画圆圈,听到小于8的数字时,还会画出十分有规律的圆圈,现在你需要根据样例观察出规律,编写程序,根据输入的数字n(n<8),输出对应的圆圈。输入描述:第一行是样例数T(T<9)第2到2+T-1行每行有一个整数n(n<8),代表lulu听到的数字输出描述:听到对应数字时,输出对应样子的圆圈。示例1输入401原创 2018-01-21 20:36:26 · 370 阅读 · 0 评论 -
CodeForces 892B Wrath
Hands that shed innocent blood!There are n guilty people in a line, the i-th of them holds a claw with length Li. The bell rings and every person kills some of people in front of him. All people k原创 2018-01-06 20:52:05 · 379 阅读 · 0 评论 -
CodeForces 900B Position in Fraction
You have a fraction . You need to find the first occurrence of digit c into decimal notation of the fraction after decimal point.InputThe first contains three single positive integers a, b原创 2018-01-06 23:19:31 · 285 阅读 · 0 评论 -
POJ - 1852 Ants
An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it immediatelly falls off it. When two ants meet they tur原创 2018-01-07 13:27:52 · 238 阅读 · 0 评论 -
POJ 3279 Fliptile
Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M× N grid (1 ≤ M ≤ 15; 1 ≤ N ≤ 15)原创 2017-12-31 12:30:32 · 225 阅读 · 0 评论 -
HDU - 2723 Electronic Document Security
The Tyrell corporation uses a state-of-the-art electronic document system that controls all aspects of document creation, viewing, editing, and distribution. Document security is handled via access co原创 2017-12-25 21:22:53 · 349 阅读 · 0 评论 -
KazaQ's Socks HDU - 6043
KazaQ wears socks everyday. At the beginning, he has nn pairs of socks numbered from 11 to nn in his closets. Every morning, he puts on a pair of socks which has the smallest number in the原创 2017-10-31 22:17:33 · 266 阅读 · 0 评论 -
B. Qualifying Contest 结构体模拟
B. Qualifying Contesttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVery soon Berland will hold a School T原创 2017-10-18 19:19:34 · 315 阅读 · 0 评论 -
C. Tanya and Toys 水题
C. Tanya and Toystime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Berland recently a new collection of to原创 2017-10-18 19:27:46 · 364 阅读 · 0 评论 -
November 11th UVALive - 7512
题就不打了,题意就是问不相邻的最多种坐法和最少种坐法,直接每行每行的模拟即可!#include #include int a[1005][1005];int main() { int N,_ = 1; scanf("%d",&N); while(N--) { memset(a, 0, sizeof(a)); int n , m , z , x, y ,t ,sum1原创 2017-10-18 19:32:14 · 312 阅读 · 0 评论 -
模拟:Fraction HDU - 5912
Mr. Frog recently studied how to add two fractions up, and he came up with an evil idea to trouble you by asking you to calculate the result of the formula below: As a talent, can you figure ou原创 2017-10-10 20:53:23 · 422 阅读 · 0 评论 -
Molar mass UVA - 1586
Molar massDescriptionAn organic compound is any member of a large class of chemical compounds whose molecules contain carbon. The molarmass of an organic compound is the mass原创 2017-10-19 18:41:20 · 441 阅读 · 0 评论 -
869B - The Eternal Immortality 暴力 模拟
B. The Eternal Immortalitytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputEven if the world is full of coun原创 2017-10-20 17:52:26 · 323 阅读 · 0 评论 -
Crossword Answers 模拟 字符串
Crossword AnswersTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 869 Accepted: 405DescriptionA crossword puzzle consists of a rectangular翻译 2017-10-20 21:49:33 · 586 阅读 · 0 评论 -
hdu 5873 Football Games
Football GamesA mysterious country will hold a football world championships---Abnormal Cup, attracting football teams and fans from all around the world. This country is so mysterious that none原创 2017-10-23 17:29:25 · 273 阅读 · 0 评论 -
UVA - 253 Cube painting
Cube paintingTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionWe have a machine for painting cubes. It is su原创 2017-10-23 22:31:58 · 180 阅读 · 0 评论 -
UVa 133 The Dole Queue
双向约瑟夫环吗,很简单直接模拟就行了#include int n , k , m , a[25];int solve1(int p) { int t = m; while(t--) { p = ((p + n - 2) % n) + 1; while(a[p] == 0) p = ((p + n - 2) % n) + 1; } return p;}int solv原创 2017-10-23 22:41:01 · 188 阅读 · 0 评论 -
POJ - 3617 Best Cow Line
FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the judges.The contest orga原创 2018-01-07 16:40:56 · 316 阅读 · 0 评论