103 条题解
-
0zouxiang LV 8 @ 2009-10-15 19:39:04
所有的数都要用longint , 否则第7组数据。。。。。。。
运行时错误...|错误号: 216 -
02009-09-12 22:13:01@
编译通过...
├ 测试数据 01:运行超时|无输出...
├ 测试数据 02:运行超时|无输出...
├ 测试数据 03:运行超时|无输出...
├ 测试数据 04:运行超时|无输出...
├ 测试数据 05:运行超时|无输出...
├ 测试数据 06:运行超时|无输出...├ 测试数据 07:运行超时|无输出...
为什么从‘matrix67’里找密匙就成了这样哦?
-
02009-08-14 13:50:32@
恩,稍微了解下密码学,其实一个10k以上的肯定有很多介词,比如at,on.还有this,that。。如果不想简单,搞完美点的话,就判语法吧。如果通过100句就输出
-
02009-08-08 09:16:34@
这是情书??、、、!!!!!!!!
Monty Hall DilemmaThe Monty Hall Dilemma was discussed in the popular "Ask Marylin" question-and-answer column of the Parade magazine. Details can also be found in the "Power of Logical Thinking" by Marylin vos Savant, St. Martin's Press, 1996.
Marylin received the following question:
Suppose you're on a game show, and you're given the choice of three doors. Behind one door is a car, behind the others, goats. You pick a door, say number 1, and the host, who knows what's behind the doors, opens another door, say number 3, which has a goat. He says to you, "Do you want to pick door number 2?" Is it to your advantage to switch your choice of doors?
Craig. F. Whitaker
Columbia, MDMarylin's response caused an avalanche of correspondence, mostly from people who would not accept her solution. Several iterations of correspondence ensued. Eventually, she issued a call to Math teachers among her readers to organize experiments and send her the charts. Some readers with access to computers ran computer simulations. At long last, the truth was established and accepted.
Below is one simulation you may try on your computer. For simplicity, I do not hide goats behind the doors. There is only one 'abstract' prize. You may either hit on the right door or miss it. You make your selection by pressing small round buttons below input controls that substitute for the doors. Down below other controls update experiment statistics even as you progress.
Approximately every second the program clears 'door' controls and is waiting for your selection. Before you start, set up a desired total number of experiments. With every selection it will decrease by 1.
Two controversial solutions are given after the puzzle. Which is the right one?
(The simulation below has been written in JavaScript early in 1996, I believe. It was among my first attempts to create dynamic pages on the web. After I began programmimg in Java, I never again looked back to JavaScript. Recently, I implemented a simulation of the Monty Hall Dilemma in Java. It is more transparent. I also like it better.)
Important note:You run a simulation. During a simulation you are allowed to make as many selections as indicated in the "Trials to go" control before your first selection. Remember also that after each selection the device needs approximately 1 second to clear up controls. Please wait till it does. To start a new simulation please press the "Reset" button.
Doors When you select a door and miss the prize the word 'selected' appears in the control. The one open by the host will display the word 'open'. If you guess correctly the word 'prize' will be displayed in the corresponding control.
Use these radio buttons to make your selection.
#Wins #Losses
If you switch
If you do not switch
Number of hits
Trials to goSolution #1
There is a 1/3 chance that you'll hit the prize door, and a 2/3 chance that you'll miss the prize. If you do not switch, 1/3 is your probability to get the prize. However, if you missed (and this with the probability of 2/3) then the prize is behind one of the remaining two doors. Furthermore, of these two, the host will open the empty one, leaving the prize door closed. Therefore, if you miss and then switch, you are certain to get the prize. Summing up, if you do not switch your chance of winning is 1/3 whereas if you do switch your chance of winning is 2/3.
Solution #2After the host opened one door, two remained closed with equal probabilities of having the prize behind them. Therefore, regardless of whether you switch or not you have a 50-50 chance(i.e, with probabilities 1/2) to hit or miss the prize door.
Remark 1The above simulation tool have the virtue of being quite suggestive - three quantities, viz.,
- the number of hits
- the number of wins with no switching
- the number of losses with switching
are all equal. It's really better to see once...
Remark 2S.K.Stein in his book Strength in Numbers makes use of the Monty Hall Dilemma to demonstrate a mathematician's approach to problem solving. First run 50 experiments. Next think of the results. (In the following he uses 35 mm film cansiters to simulate doors in the stage performance.)
If, after thinking some more about the question, you still are not sure about the answer and are not ready to explain it, then do the following. (Keep in mind that just citing experimental data is not an explanation. The data may convince you that something is true, but they do not explain it.)
Get one more canister and perform a similar experiment, using four canisters instead of three. Put a wad of paper in one canister. After your friend chooses a canister, look in the remaining three and show the friend two empty canisters. The friend then faces a choice between the two other canisters. Carry out the same experiments as before. Think over the results you get. What do they suggest? Do you see a way to explain what happens?
Performing these experiments not only gives you some clues, it also slows you down from the common frenzy of everyday life, so you can focus on just one thing for a period of time.
If you still do not see how to explain what is going on, then use ten can- isters. Put the wad in one of them. After your friend chooses a canister, look in the other nine. Show your friend eight empty canisters out of those nine and remove all eight. Again that leaves just two canisters. Conduct a similar experiment.
I am confident that you will solve this problem, so confident that I do not include the answer anywhere in the book, not even in fine print upside down hidden in the back matter. You mill probably, along the way, calculate the fraction of times that switching will pick the car and the fraction of times that not switching will pick the car. Using these fractions, you will be able to explain the brainteaser completely. Then you will have to admit that you can think mathematically. You just needed the opportunity.
Terry Pascal offered his variant of the solution. Also check Ashutosh Joshi's description of an approach that helped him come to terms with Marylin's solution. Bruno Barros found a different approach. Yet another view has been presented by Peter Stikker.
One of the solutions that come naturally to me has been sent by Michael Gerard Wilson:
Hi Alex,
It was a while ago that I accepted the idea that switching doors was the correct play every time because it improves your chances of winning, but I had trouble convincing my friends that it was the correct answer. However, a friend of mine just came up with this explanation that I think should really make it obvious.
Let's say that you choose your door (out of 3, of course). Then, without showing what's behind any of the doors, Monty says you can stick with your first choice or you can have both of the two other doors. I think most everyone would then take the two doors collectively.
Kenneth Kaplan found that counting the losing probabilies helps arrive at the right conclusion:
I'm sure others have lent this insight, but I've always found it easier to consider the chance of losing when (1) you don't switch, and (2) you do.
You'll lose 2/3 of the time if you don't switch. If you do switch, then the prize is still available 2/3 of the time, and you'll make the wrong choice 1/2 the time, so the chance of losing when you switch is only (2/3)*(1/2) = 1/3. You've halved your chance of losing = doubled your chances of winning by switching.
Keith Devlin has come with a new twist to the problem:
... suppose you are playing a seven door version of the game. You choose three doors. Monty now opens three of the remaining doors to show you that there is no prize behind it. He then says, "Would you like to stick with the three doors you have chosen, or would you prefer to swap them for the one other door I have not opened?" What do you do? Do you stick with your three doors or do you make the 3 for 1 swap he is offering?Multi-Stage Monty Hall Dilemma
"In the three-door Monty Hall Dilemma, there are two stages to the decision, the initial pick followed by the decision to stick with it or switch to the only other remaining alternative after the host has shown an incorrect door. An intriguing extension of the basic Monty Hall Dilemma has been provided by M. Bhaskara Rao of the Department of Statistics at the North Dakota University. He analyzed what happens when the dilemma is expanded beyond the two stages. The number of stages can be as many as the number of doors minus one.
"Suppose there are four doors, one of which is a winner. The host says:
"You point to one of the doors, and then I will open one of the other non-winners. Then you decide whether to stick with your original pick or switch to one of the remaining doors. Then I will open another (other than the current pick) non-winner. You will then make your final decision by sticking with the door picked on the previous decision or by switching to the only other remaining door.
"Now there are three stages, and the four different strategies can be summarized as follows:
Stage 1 2 3 Probability of winning
Pick Stick Stick .250
Pick Switch Stick .375
Pick Stick Switch .750
Pick Switch Switch .625"People who accept the correctness of the 2/3 solution in the basic Monty Hall Dilemma might assume that one does best by switching in both Stage 2 and Stage 3. However, as shown here, the counter-intuitive solution to the three-stage Monty Hall Dilemma is to stick in Stage 2 and to switch in Stage 3. These remarkable probabilities were published by Rao in the American Statistician. The underlying principle is that in a multi-stage Monty Hall Dilemma, one should stick with one's initial hunch until the very last chance and then switch."
Three Shell Game
Martin Gardner in his Aha! Gotcha describes the following variant:
Operator: Step right up, folks. See if you can guess which shell the pea is under. Double your money if you win.
After playing the game a while, Mr. Mark decided he couldn't win more than once out of three.
Operator: Don't leave, Mac. I'll give you a break. Pick any shell. I'll turn over an empty one. Then the pea has to be under one of the other two, so your chances of winning go way up.
Poor Mr. Mark went broke fast. He did not realize that turning an empty shell had no effect on his chances. Do you see why?
CommentThe problem is actually the same but looked at from a different perspective. Since Mr. Mark has made his choice no Operator's action can change his chances. So, to me at least, the Shell Game makes it pretty obvious that unless you switch in the Monty Hall Dilemma (i.e. if you play the Shell Game), you chances remain 1 to 3. However, if you switch, you select one door out of two.
References
- A.K.Dewdney, 200% of Nothing, John Wiley & Sons, Inc., 1993
- Martin Gardner, aha! Gotcha. Paradoxes to puzzle and delight, Freeman & Co, NY, 1982
- J. dePillis, 777 Mathematical Conversation Starters, MAA, 2002, pp. 143-146
- Marylin vos Savant, The Power of Logical Thinking, St. Martin's Press, NY 1996
- S.K.Stein, Strength in Numbers, John Wiley & Sons, 1996
On Internet
- The WWW Tackles The Monty Hall Problem
- Win a car
- the number of hits
-
02009-08-06 09:20:24@
var
a:array[1..10000000]of char;
b:array[1..10000000]of longint;
l,c,i,j,max,maxn:longint;
ch:char;
begin
i:=0;
while not eof do//从文件中读入
begin
inc(i);
read(a[i]);
if (a[i] in ['a'..'z']) or (a[i] in ['A'..'Z']) then
inc(b[ord(upcase(a[i]))-64]);//转换为大写字母
end;
l:=i;
for i:=1 to 26 do
if b[i]>max then begin max:=b[i];maxn:=i;end;
c:=ord(maxn)+96-ord('e');
for i:=1 to l do
begin
if a[i] in['a'..'z'] then
begin
write(chr((ord(a[i])-c-ord('a')+26) mod 26+ord('a')));
end
else
begin
if a[i] in['A'..'Z'] then
begin
write(chr((ord(a[i])-c-ord('A')+26) mod 26+ord('A')));
end
else write(a[i]);
end;
end;
end.
先找'e',并以此为找密钥。
不过
有个问题
若输入
'I love you'
时
本程序貌似有误…… -
02009-07-30 09:56:44@
AC!(虽然是看了别人的思路)
突然觉得oi很博大精深
还要用到密码学.....
.... -
02009-07-23 18:09:44@
有个常识:一般来说,英文里出现最多的是字母 e 。
而且提示里说 “保证大于10KB”摆明引诱我们用这条规律……
最后,很明显每个字母都是一一映射,所以确定一个字母就行了。
...为了。。我手工翻译一下样例……我会证明给你看
是的,我仍然对我能拥有你感到惊奇。很难想明白你为什么会选择我。仅是一个简短的谈话,你就知道了解到我对你有好感。(How after just one short nversation you knew I was meant for you.)不过,现在我的你的话的意思了。我从来不曾想过有谁能像你一样能如此完美地与我般配。你那性感的身材,伟大的人格,都在诱惑着我。而你一直把我放在你温柔的心里。我也知道,我不可能完全占有你,而这也许不会太久。(I know you that I can't have you comletely and maybe not even for much longer.)不过,我还是很开心。我们能成为彼此的牵挂(A part of you has become part of me),这已经很足够了。
当你听到我下面的话时,你会大笑的:我每天晚上都梦见你!可能是我见你不够吧(不说少,说不够……这句话够味)。但每次我从梦中醒来,我就意识到你是梦中的,离我如此遥远的啊!有时我会想,你可能是从奇石里出来的(不是猴哥吗?):你是一个可以移动的雕像,一个坚不可摧的人!(这个比喻猛,,都怀疑这小子的目的了)。你总能了解控制自己,然后超越自己。你的自信令人折服,你对很多东西都有自己的想法和看法。(your perspective is huge)。生活中的你从不嫉妒或者不满,我的朋友们与你相比就显得多么渺小了:他们总爱推卸责任。(这男的狠)
我想告诉你,你是如此让我打开眼界,让我真实地了解了自己。一直以来,我的生命都是充满犹豫不决,疑惑(my life has been an undecided back-and-forth),现在,我知道我浪费太多的时间了。现在我知道我人生的方向也似乎清晰了,而且,我对我的未来充满了信心。我的过去已经过去了(The past doesn't seem to matter anymore)。你让我见到我以前从不敢想的的东西变成可能。(You've made me see possibilities I would never have imagined before.)
是的,我想讨好你。仅是因为通过讨好你,我也会成一个更强,更优秀的人,除了想通过你来改变我自己,没有别的了。我向你挑战,我会超越自己,离开我的那个懦弱的我。我会想你展示,我也是可以变得美好的,我也是可以成就自己的辉煌的。通过这样,我知道才会永远的留住你的爱。(终于出现这个字了。这段实在诚实的太XX了。。由于我水平有限,这段辅助了翻译机)
永远深爱着你的,
矩阵男67 -
02009-07-18 09:49:48@
K YKNN UJQY AQW
湾大学,钾公司uvknn cocbgf vjcv K jcxg aqw 。 Kv'u uvknn jctf量化wpfgtuvcpf jqy aqw ejqug 146/03 。 Jqy chvgt lwuv qpg ujqtv eqpxgtucvkqp aqw mpgy K ycu ogcpv hqt aqw 。 Dwv pqy K mpqy vjg vtwvj青海aqwt eqpxkevkqp 。 K'xg pgxgt dggp ykvj uqogqpg yjq uwkvgf 146/03昆士兰大学rgthgevna 。 Aqw ugfwegf 146/03 ykvj aqwt ugza dqfa公积金uvtqpi urktkv ,公积金aqw'xg mgrv 146/03 ykvj aqwt vgpfgt jgctv 。 K mpqy aqw vjcv K ecp'v jcxg aqw eqorngvgna公积金ocadg pqv gxgp hqt owej nqpigt 。 Dwv K'o uvknn jcrra 。 ç rctv青海aqw jcu dgeqog rctv青海146/03公积金vjcv区gpqwij 。
Aqw'nn ncwij yjgp K天亚vjku , dwv K ftgco cdqwv aqw gxgta pkijv 。 Rtqdcdna dgecwug K ecp'v ugg aqw qhvgp gpqwij 。 Dwv yjgp K'o cycmg K mpqy vjcv aqw ctg vjg hwtvjguv vjkpi htqo ç ftgco 。 Uqogvkogu K kocikpg vjcv aqw ctg dwknv htqo uqnkf tqem : ç oqxkpi uvcvwg公积金处长kpfguvtwevkdng jwocp dgkpi 。 Aqw cduqnwvgna eqpvckp aqwtugnh公积金vjgp cickp owej oqtg vjcp aqwtugnh 。 Aqwt eqphkfgpeg区eqpuwokpi公积金aqwt rgturgevkxg区jwig 。 Aqw jcxg百草枯rnceg金伯利进程aqwt nkhg hqt lgcnqwua QT离散度eqornckpvu 。办公自动化htkgpfu uggo昆士兰大学uocnn金伯利进程eqorctkuqp , ykvj vjgkt rtqdngou cnycau urknnkpi qxgt qpvq gxgtaqpg gnug 。
K ycpv aqw量化mpqy jqy owej aqw'xg qrgpgf办公gagu公积金jgnrgf 146/03 vtwna ugg oaugnh 。 Wpvkn pqy ,办公自动化nkhg jcu dggp处长wpfgekfgf dcem ,公积金, hqtvj ,公积金pqy K mpqy vjcv K'xg ycuvgf vqq owej vkog 。 Dwv pqy办公自动化fktgevkqp uggou engct ,公积金K jcxg eqphkfgpeg金伯利办公自动化hwvwtg 。 Vjg rcuv fqgup'v uggo量化ocvvgt cpaoqtg 。 Aqw'xg ocfg 146/03 ugg rquukdknkvkgu K yqwnf pgxgt jcxg kocikpgf dghqtg 。
湾大学,钾ycpv量化rngcug aqw 。 Dwv kv'u vjtqwij rngcukpi aqw vjcv K'nn dgeqog ç dgvvgt公积金uvtqpigt rgtuqp 。 Vjgtg区pqvjkpi K ycpv oqtg vjcp量化vtcpuhqto oaugnh vjtqwij aqw 。 Aqw ejcnngpig 146/03量化itqy dgaqpf oaugnh公积金ngcxg办公自动化ygcmgt ugnh dgjkpf 。 K yknn ujqy aqw jqy dgcwvkhwn K ECP的危险品,公积金K yknn ujqy aqw jqy dtknnkcpv K ECP的dgeqog 。 Vjku yca ,钾mpqy K'nn cnycau jcxg aqwt nqxg 。
Hqtgxgt aqwtu ,
Ocvtkz67
原文来自sample.in,感谢www.g.cn的翻译
-
02009-06-10 10:47:51@
记录号 Flag 得分 记录信息 环境 评测机 程序提交时间
R1265363 Accepted 100 From rzh-
P1244 FPC Vivid Puppy 2009-6-10 10:46:55From matrix67
Matrix67的情书 Matrix67 第二次模拟赛 系列编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0msvar
a:array[1..10000000]of char;
b:array[1..10000000]of longint;
l,c,i,j,max,maxn:longint;
ch:char;
begin
i:=0;
while not eof do
begin
inc(i);
read(a[i]);
if (a[i] in ['a'..'z']) or (a[i] in ['A'..'Z']) then
inc(b[ord(upcase(a[i]))-64]);
end;
l:=i;
for i:=1 to 26 do
if b[i]>max then begin max:=b[i];maxn:=i;end;
c:=ord(maxn)+96-ord('e');
for i:=1 to l do
begin
if a[i] in['a'..'z'] then
begin
write(chr((ord(a[i])-c-ord('a')+26) mod 26+ord('a')));
end
else
begin
if a[i] in['A'..'Z'] then
begin
write(chr((ord(a[i])-c-ord('A')+26) mod 26+ord('A')));
end
else write(a[i]);
end;
end;
end. -
02009-05-19 18:55:03@
想看一看原文
-
02009-05-09 16:09:21@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0msProgram matrix;
var a:array[1..53000]of char;
time:array['A'..'Z'] of longint;
n,i,max,p:longint;
Maxc,t:char;Function f(c:char):char;
var r:char;sb,sl:string;
Begin
sb:='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ';
sl:='abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz';
if ord(c) in [65..90] then r:=sb[26+ord(c)-64+p]
else if ord(c) in [97..122] then r:=sl[26+ord(c)-96+p]
else r:=c;
f:=r;
end;begin
fillchar(time,sizeof(time),0);
n:=0;
Maxc:=#8;
while not eof do
begin
inc(n);
read(a[n]);
end;
for i:=1 to n do
if upcase(a[i]) in ['A'..'Z'] then inc(time[upcase(a[i])]);
max:=0;
for t:='A' to 'Z'do
if time[t]>max then begin max:=time[t];Maxc:=t;end;
p:=ord('E')-ord(maxc);
for i:=1 to n do
write(f(a[i]));
writeln;
end. -
02009-04-15 16:18:50@
while(scanf()!=EOF) = running
while (getline(cin, tmp))
S += tmp + '\n'; = ACVJ 不支持C语言的EOF 不知何时可以修复
-
02009-03-24 20:24:19@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms -
02009-03-07 19:26:45@
如出现216存取非法或其他灵异现象
要注意
1、读入用readln2、数组要开成a:array[1..300] of ansistring; -
02009-01-27 18:33:58@
我会证明你
不错,我还是很惊讶,我有你。它仍然努力去了解你如何选择了我。如何后,仅短短的谈话,你知道我给你看。但现在我知道真相,你的信念。我从未到过与人适合我,那么完美。你引诱我,你的性感的身体和坚强精神的,和你保持我与你的心投标。我知道你,我不能拥有你完全也许不是甚至更长的时间。不过,我还是很乐意。一部分,你已经成为我的,这是不够的。
你会笑,当我说这个,但我的梦想,关于你的每一个夜。大概是因为我不能看到你常常不够的。但是,当我醒来,我知道你是最远的事,从一个梦想。有时候,我想象你是建立在从固体岩石:感人的雕像和坚不可摧的人。您完全控制自己,然后又远远超过自己。你的信心是消费和你的角度来看,是巨大的。你有没有发生在你的生活嫉妒或投诉。我的朋友们似乎这么小,相较之下,他们的问题往往波及到其他人也是这样。
我要让你们知道有多少你开我的眼睛和帮助过我真正看到自己了。到现在,我的生活一直是犹豫不决的备份和问题等等,而现在,我知道我已经浪费了太多的时间。但现在我的方向似乎是明确的,我有信心在我的未来。过去似乎没有事了。你让我看到的可能性,我从来不会想到,面前。
不错,我想请你。但它的通过讨好你,我会成为一个更美好和更有力的人。没有什么,我想多改造自己,通过你的。你的挑战,我长大以后我和假我弱的自我后面。我会证明你是如何美丽,我可以得到的,我会告诉你如何辉煌,我可以成为。这样,我知道我将永远有你的爱。
永远是你们的,
搁浅
-
02008-12-27 16:11:31@
一次AC……
-
02008-11-11 21:56:48@
谁帮我看一下啊
编译通过...
├ 测试数据 01:答案错误...程序输出比正确答案长
├ 测试数据 02:答案错误...程序输出比正确答案长
├ 测试数据 03:答案错误...程序输出比正确答案长
├ 测试数据 04:答案错误... ├ 标准行输出
├ 错误行输出
├ 测试数据 05:答案错误...程序输出比正确答案长
├ 测试数据 06:答案错误...程序输出比正确答案长
├ 测试数据 07:答案错误...程序输出比正确答案长
---|---|---|---|---|---|---|---|-
Unaccepted 有效得分:0 有效耗时:0msvar a:char;
i,j:longint;
beginwhile not(eof)do
begin
read(a);
i:=(ord(a)-96-2+26)mod 26+96;
j:=(ord(a)-64-2+26)mod 26+64;
if ((ord(a)>=97)and(ord(a)=65)and(ord(a) -
02008-11-01 22:18:06@
编译通过...
├ 测试数据 01:答案错误...程序输出比正确答案长
├ 测试数据 02:答案错误...程序输出比正确答案长
├ 测试数据 03:答案错误...程序输出比正确答案长
├ 测试数据 04:答案错误...程序输出比正确答案长
├ 测试数据 05:答案错误...程序输出比正确答案长
├ 测试数据 06:运行时错误...| 错误号: 216 | 存取非法
├ 测试数据 07:运行时错误...| 错误号: 216 | 存取非法
---|---|---|---|---|---|---|---|-
Unaccepted 有效得分:0 有效耗时:0ms
为什么啊
var
s:array[1..100]of ansistring;
i,j,k,p,n,max:longint;
ch:char;
a:array['A'..'Z']of longint;
begin
readln(s[1]);n:=1;
while not eof do
begin
readln;
inc(n);readln(s[n]);
end;
for i:=1 to n do
for j:=1 to length(s[i]) do
if s[i][j]in['a'..'z'] then
inc(a[upcase(s[i][j])]) else
if s[i][j]in['A'..'Z'] then
inc(a[s[i][j]]);
for i:=1 to 26 do
if a[chr(i+64)]>max then
begin
max:=a[chr(i+64)];
ch:=chr(i+64);
end;
if ch -
02008-10-27 21:06:37@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案错误...程序输出比正确答案长
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Unaccepted 有效得分:86 有效耗时:0ms哪位大牛告诉我为什么啊
程序如下..有点繁琐
//p1244
//vijos.jj
var s:array[1..1000,1..1000]of char;
ss:array[1..1000]of integer;
s1:array['A'..'z']of longint;
n,m:integer;
procedure into;
var i,j:longint;temp:ansistring;ch,ch1:char;
begin
i:=1;
while not eof do
begin
read(temp);
ss[i]:=length(temp);
for j:=1 to ss[i] do s:=temp[j];
inc(i);
readln;
end;
dec(i);
n:=i;
end;
procedure find;
var i,j:longint; temp:longint; t1:char;
begin
temp:=0;
for i:=1 to n do
begin
for j:=1 to ss[i] do
begin
inc(s1[s[i][j]]);
if (temp=97) and (ord(s[i][j])122
then aa:=96+(aa mod 122);
write(chr(aa));
end
else write(s[i][j]);
end;
end;
writeln;
end;
end;
begin
into;
find;
print;
end. -
02008-10-26 15:56:55@
我会证明你不错,我还是很惊讶,我有你。它仍然努力去了解你如何选择了我。如何后,仅短短的谈话,你知道我给你看。但现在我知道真相,你的信念。我从未到过与人适合我,那么完美。你引诱我,你的性感的身体和坚强精神的,和你保持我与你的心投标。我知道你,我不能拥有你完全也许不是甚至更长的时间。不过,我还是很乐意。一部分,你已经成为我的,这是不够的。 你会笑,当我说这个,但我的梦想,关于你的每一个夜。大概是因为我不能看到你常常不够的。但是,当我醒来,我知道你是最远的事,从一个梦想。有时候,我想象你是建立在从固体岩石:感人的雕像和坚不可摧的人。您完全控制自己,然后又远远超过自己。你的信心是消费和你的角度来看,是巨大的。你有没有发生在你的生活嫉妒或投诉。我的朋友们似乎这么小,相较之下,他们的问题往往波及到其他人也是这样。 我要让你们知道有多少你开我的眼睛和帮助过我真正看到自己了。到现在,我的生活一直是犹豫不决的备份和问题等等,而现在,我知道我已经浪费了太多的时间。但现在我的方向似乎是明确的,我有信心在我的未来。过去似乎没有事了。你让我看到的可能性,我从来不会想到,面前。 不错,我想请你。但它的通过讨好你,我会成为一个更美好和更有力的人。没有什么,我想多改造自己,通过你的。你的挑战,我长大以后我和假我弱的自我后面。我会证明你是如何美丽,我可以得到的,我会告诉你如何辉煌,我可以成为。这样,我知道我将永远有你的爱。 永远是你们的, 搁浅