题目 http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=429
本来题目中已经说“The outputs of
two consecutive cases will be separated by a blank line.”
然后又说“NOTE:
There is a blank line after each separate waveform, excluding
the last one.”
反正我是无语了。
/////////////////////////////////////////////////////////////////////////////////////////////////
Triangle Wave
In this problem you are to generate a triangular wave form according to a specified pair of
Amplitude and Frequency.
The input begins with a single positive integer on a line by itself indicating
the number of the cases following, each of them as described below. This line is
followed by a blank line, and there is also a blank line between two consecutive
inputs.
Each input set will contain two integers, each on a separate line. The first integer is the Amplitude; the
second integer is the Frequency.
For each test case, the output must follow the description below. The outputs of
two consecutive cases will be separated by a blank line.
For the output of your program, you will be printing wave forms each separated by a blank line.
The total number of wave forms equals the Frequency, and the horizontal ``height'' of each wave
equals the Amplitude. The Amplitude will never be greater than nine.
The waveform itself should be filled with integers on each line which indicate the ``height'' of that
line.
NOTE:
There is a blank line after each separate waveform, excluding
the last one.
1
3
2
1
22
333
22
1
1
22
333
22
1
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- 大小: 11.2 KB
分享到:
相关推荐
UVA109的题解,经测试完全正确,还附有题解。
uva272
有uva刘汝佳文件夹的50道题解,从数据结构开始,以后慢慢上传
包含UVA在线OJ系统的绝大部分的示例代码,并都已AC,可在刷题时参考
UVa在我看来是比较全的一个题解,希望能帮助大家。欢迎下载。
uva最全ac代码
uva531最长公共子序列问题水题,应用简单的dp即可ac有更快速的方法欢迎讨论
uva10755 ac 代码,可以随意更改下载
uva357的栈实现版本
UVA 题目,不是很难,试试吧
《算法竞赛入门经典》UVa配套题目pdf版完整
世界著名大学UVA OJ平台上的题目部分分类,分的不好请原谅。
1.Uva_base的编译 在编译球队时,则需要在当前球队文件夹下打开终端输入执行以下命令(以下命令都是在root下执行的): ./configure make clean make 如果运行Uva_base后,出现球员越界或掉线的情况,就重新...
uva_trilearn2002 源代码
这是一支完整的uva球队,包含所有基本模块,初者可在上修改得到自己的球队
主要是uvaoj习题相关题目 练习题目
PDF试题
这里面全部为在Uva Online Judge上面的部分题目的解答,里面提供了解答使用的源代码。
开源项目-codingsince1985-UVa.zip,Been solving UVa Online Judge Problems in Golang for one year (and counting)
UVA 499 Solution in C/ C++