C++模拟题
Genius_panda_ACM
仗义每从屠狗辈,负心多是读书人。
展开
-
大理石在哪里?(Where is the Marble?,UVa 10474 )
大理石在哪里?(Where is the Marble?,UVa 10474 ) Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles one aft...原创 2018-07-24 22:13:58 · 521 阅读 · 0 评论 -
Ducci序列(Ducci Sequence ,UVa1594)
A Ducci sequence is a sequence of n-tuples of integers. Given an n-tuple of integers (a1,a2,···,an), the next n-tuple in the sequence is formed by taking the absolute differences of neighboring intege...原创 2018-07-25 22:30:03 · 580 阅读 · 0 评论 -
UVA 1586 Molar mass
An organic compound is any member of a large class of chemical compounds whose molecules contain carbon. The molar mass of an organic compound is the mass of one mole of the organic compound. The mola...原创 2018-07-22 09:38:39 · 286 阅读 · 0 评论 -
图形面积——竞赛水题
题目描述 编程计算由“*”号围成的下列图形的面积。面积计算方法是统计*号所围成的闭合曲线中水平线和垂直线交点的数目。如下图所示,在10*10的二维数组中,有“*”围住了15个点,因此面积为15。图形面积输入输入0-1矩阵(1表示*)输出输出面积。样例输入0 0 0 0 0 0 0 0 0 00 0 0 0 1 1 1 0 0 00 0 0 0 1 0 0 ...原创 2018-07-27 22:19:10 · 5002 阅读 · 4 评论 -
问题 : 蚂蚁感冒
题目描述长100厘米的细长直杆子上有n只蚂蚁。它们的头有的朝左,有的朝右。 每只蚂蚁都只能沿着杆子向前爬,速度是1厘米/秒。当两只蚂蚁碰面时,它们会同时掉头往相反的方向爬行。这些蚂蚁中,有1只蚂蚁感冒了。并且在和其它蚂蚁碰面时,会把感冒传染给碰到的蚂蚁。请你计算,当所有蚂蚁都爬离杆子时,有多少只蚂蚁患上了感冒。蚂蚁感冒输入第一行输入一个整数n (1 < n < 5...原创 2018-08-01 13:55:15 · 297 阅读 · 0 评论