没有合适的资源?快使用搜索试试~ 我知道了~
acm2011年长春赛区题目
需积分: 0 1 下载量 87 浏览量
2014-04-06
22:10:29
上传
评论
收藏 186KB PDF 举报
温馨提示
试读
23页
2011年ACMICPC长春赛区题目,感觉题目难度还可以
资源推荐
资源详情
资源评论
The 2013 ACM/ICPC Asia Changchun Regional Contest
A. Hard Code
Description
Some strange code is sent to Da Shan High School. It's said to be the prophet's note. The note is
extremely hard to understand. However, Professor Meng is so smart that he successfully found
the pattern of the code. That is, the length of the code is the product of two prime numbers. He
tries to reallocate the code into a grid of size N*M, where M is the bigger prime. In specific, he
writes down the letters of the code to the cells one by one, from left to right, and from top to
button. In this way, he found the code eventually readable.
Professor Meng wants to know all the secrets of the note right now. But he doesn't take his
computer with him. Can you help him?
Input
The first line of the input is L (L ≤ 1000), which means the number of test cases.
For each test case, the first line contains two prime numbers, which indicates N, M (0 < N * M ≤
1000) as describe above. The second line contains a string, i.e., the code, containing only
lowercase letters. It’s guaranteed the length of the string equals to N * M.
Output
For each test case, output N lines, each line with M letters representing the readable code after
the reallocation.
Sample Input
1
2 5
klmbbileay
Sample Output
klmbb
ileay
The 2013 ACM/ICPC Asia Changchun Regional Contest
B. Golden Radio Base
Background
Golden ratio base (GRB) is a non-integer positional numeral system that uses the golden
ratio (the irrational number (1+√5)/2 ≈ 1.61803399 symbolized by the Greek letter φ) as its base.
It is sometimes referred to as base-φ, golden mean base, phi-base, or, phi-nary.
Any non-negative real number can be represented as a base-φ numeral using only the digits 0
and 1, and avoiding the digit sequence "11" – this is called a standard form. A base-φ numeral
that includes the digit sequence "11" can always be rewritten in standard form, using the
algebraic properties of the base φ — most notably that φ + 1 = φ
2
. For instance, 11(φ) = 100(φ).
Despite using an irrational number base, when using standard form, all on-negative integers have
a unique representation as a terminating (finite) base-φ expansion. The set of numbers which
possess a finite base-φ representation is the ring Z[1 + √5/2]; it plays the same role in this
numeral systems as dyadic rationals play in binary numbers, providing a possibility to multiply.
Other numbers have standard representations in base-φ, with rational numbers having recurring
representations. These representations are unique, except that numbers (mentioned above)
with a terminating expansion also have a non-terminating expansion, as they do in base-10; for
example, 1=0.99999….
Description
Coach MMM, an Computer Science Professor who is also addicted to Mathematics, is extremely
interested in GRB and now ask you for help to write a converter which, given an integer N in
base-10, outputs its corresponding form in base-φ.
Input
There are multiple test cases. Each line of the input consists of one positive integer which is not
larger than 10^9. The number of test cases is less than 10000. Input is terminated by
end-of-file.
Output
For each test case, output the required answer in a single line. Note that trailing 0s after the
decimal point should be wiped. Please see the samples for more details.
The 2013 ACM/ICPC Asia Changchun Regional Contest
Sample Input
1
2
3
6
10
Sample Output
1
10.01
100.01
1010.0001
10100.0101
Hint
Besides φ + 1 = φ
2,
, we have another useful property of GRB, i.e., 2 * φ
2
= φ
3
+ 1.
The 2013 ACM/ICPC Asia Changchun Regional Contest
C. Little Tiger vs. Deep Monkey
Description
A crowd of little animals is visiting a mysterious laboratory – The Deep Lab of SYSU.
“Are you surprised by the STS (speech to speech) technology of Microsoft Research and the cat
face recognition project of Google and academia? Are you curious about what technology is
behind those fantastic demos?” asks the director of the Deep Lab. “Deep learning, deep
learning!” Little Tiger raises his hand briskly. “Yes, clever boy, that’s deep learning (深度学习/深
度神经网络
)”, says the director. “However, they are only ‘a piece of cake’. I won’t tell you a top
secret that our lab has invented a Deep Monkey (
深猴
) with more advanced technology. And
that guy is as smart as human!”
“Nani ?!” Little Tiger doubts about that as he is the smartest kid in his kindergarten; even so, he
is not as smart as human, “how can a monkey be smarter than me? I will challenge him.”
To verify their research achievement, the researchers of the Deep Lab are going to host an
intelligence test for Little Tiger and Deep Monkey.
The test is composed of N binary choice questions. And different questions may have different
scores according to their difficulties. One can get the corresponding score for a question if he
chooses the correct answer; otherwise, he gets nothing. The overall score is counted as the sum
of scores one gets from each question. The one with a larger overall score wins; tie happens
when they get the same score.
Little Tiger assumes that Deep Monkey will choose the answer randomly as he doesn’t believe
the monkey is smart. Now, Little Tiger is wondering “what score should I get at least so that I will
not lose in the contest with probability of at least P? ”. As little tiger is a really smart guy, he can
evaluate the answer quickly.
You, Deep Monkey, can you work it out? Show your power!
Input
The first line of input contains a single integer T (1 ≤ T ≤ 10) indicating the number of test cases.
Then T test cases follow.
Each test case is composed of two lines. The first line has two numbers N and P separated by a
blank. N is an integer, satisfying 1 ≤ N ≤ 40. P is a floating number with at most 3 digits after the
decimal point, and is in the range of [0, 1]. The second line has N numbers separated by blanks,
which are the scores of each question. The score of each questions is an integer and in the range
of [1, 1000]
The 2013 ACM/ICPC Asia Changchun Regional Contest
Output
For each test case, output only a single line with the answer.
Sample Input
1
3 0.5
1 2 3
Sample Output
3
剩余22页未读,继续阅读
资源评论
forgive_czf
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功