Общий форумHave you used any formula? or some sort of binary search? Edited by author 21.10.2012 01:21 1. What did the question marks ("?") mean in the contest standings page? And they disappeared when the contest finished. 2. In the judge status page, do the memory and time fields show the longest and biggest values in all finished tests or the values of the last test? Thanks Ade 1. "?" means that there were no accepted submissions for this problem in first 4 hours and there were some submissions in the last hour. So results are effectively frozen at 4:00 mark. 2. Longest and biggest. Thank you for your clear answers. One further question: What's the purpose of the freezing? Thanks Ade It was made for "keeping the intrigue". You may argue whether it should or shouldn't be done in internet contests, but in real contests with prizes it definitely makes sense. Thank you very much. What I do is just following the others' steps. I always try to solve the next easiest (solved most times) problem. So I guess it only matters much for the top guys. Ade Subject. Yes please! Hopefully very soon! is this because I am using java ?? Java is slower compared to c or c++. This program is normal stack operation isn't it? or some other algo is to be followed?? can any one please describe the input-output given? Может ли между двумя соседними по стороне комнатами не быть пустоты (пробел)? то есть верно ли, что каждая комната всегда окружена какими-то стенами и углами? What's the condition they kill themselves? the total power > their resistance upper bound or the total power >= their resistance upper bound ? Thanks Ade Oh. I missed the word "survive". Test 4: crash (integer division by zero) int main() { int n; scanf("%d",&n); if (n>1000000 || n<1) return 1/(n-n); return 0; } Test 4 is fixed. Wrong verdicts will be rejudged. Any suggestions about test 8 data? It would be great, if somebody can provide corner case test. Thanks. Edited by author 14.10.2012 16:33 Edited by author 14.10.2012 16:33 7 6 1 1 1 1 1 5 5 1 3 Answer is 3. have you more than 3? why 3? {1,2,3,4,5,6} {1,2,3,4,5,7} {1,2,3,4,6,7} {1,2,3,5,6,7} {1,2,4,5,6,7} {1,3,4,5,6,7} dw bout him. My AC solution gives 6. Help! Test : 1 2 1 1 0.5 Answer: 1.1339745962155616 Eternal, your test is incorrect, because the posts on the corners of stadium will not give to the person with umbrella to stand up in this point. Or I am wrong? Edited by author 15.04.2011 20:02 test 28 is like that: 2 2 1 0 4 correct answer is 4.0 Just be careful with distances to borders :) This test helped me: 1 1 1 -0.5 100 it's a cheat! =) At least you should be able to write bruteforce in O(n^2 * 2^n) :) For a pair of numbers the number of actions is equal to <length of the first number> + <length of the second number> - 2*<length of the longest common prefix> (numbers are treated as binary strings) Bo`ladigan gap gapirgin-e!!! Your must understand hint of 'aropan'. And get answer = 2^L*(L - 3*2^L + L*2^L + 3) P.S.: Mathcad can help you to find sum of such expression as FOR(z=0,..l)z*2^z. It's only math problem. P.P.S.: To find 2^L use http://en.wikipedia.org/wiki/Exponentiation_by_squaring Edited by author 22.05.2012 22:17It's not in the FAQ. Is it completely arbitrary, and assigned by the problem's authors? Is it updated as new solutions are submitted? As far as I remember, it only depends on how many people solved the task(decreasing when there is a new "author") and the time it was added(increasing with time). But now there is also author's rating, so maybe it depends on it too. I have got problem with this task from my university algorithm course (translated from german): > John have got a party. He prepared $x$ glasses of vodka and $k*x$ > glasses of rum. > > Number of glasses is n. Each guests drink one > round of alcohol (one round is $k$ glasses of rum and $one$ of vodka) but > guest must chose glass that every full glass must have got one full > neighbor. > > Write the program which simulate John's party. The party ends when all > glasses are empty. > > In input we have got $n$ and $k$ which means number of glasses and number > of glasses of rum drunk in single turn). Simple Input : (assume that r is rum and v - vodka ). > 16 3 vvrrrvrvrrrrrrrr Simple Output : (we numbered glass 1...n) > 1 14 15 16 > 2 11 12 13 > 3 4 5 6 > 7 8 9 10 Explain : Guest 1 drink 1, 14, 15 and 16 glass. Guest 2 drink 2, 11, 12, 13 glass. etc. We write it in ascending order. Notice that we have got $\frac{n}{(k+1)}$ guests, $n$ glasses, $k$ glasses of rum in every round. And in all inputs $k+1$ divides $n$. And $n$ can be very big - about 2 000 000. And we have about 1-2s to answer the question. Find the fastest as possible algorithm to solve this problem. Thanks for every help. If you have got any questions, i will answer it. Edger. What does the program output for n=0? Hi All,
1. 1st player Take 2 stones left over is 8-2=6 2. 2nd player takes 1 stone left over is 6-1=5 3. 1st player takes either 1 (left over is 4)0r 4 stones (left over is 1) 4. Finally 2nd player takes remiang stones. Thus second player wins. Did I understand the problem statements properly? According to the output given in sample 1st player has won but how? Please could you explain. Regards Anupam Now I got it, in 3rd step player picks up 2 stones. Then it guarnatees win of 1st player. 4 3 1 1 3 1 4 or 1 3 4 1 3 1 4 sum of all is 17 and first player wins not second, can somebody explan? Edited by author 18.10.2012 17:08 Edited by author 18.10.2012 17:11 Program nitochka; var n,r,i:integer; x: array [1..100] of real; y: array [1..100] of real; s,sg:real; begin s:=0; readln(n,r); For i:=1 to n do readln(x[i],y[i]); sg:=2*pi*r; For i:=1 to n-1 do s:=s+sqrt(sqr(x[i]-x[i+1])+sqr(y[i]-y[i+1])); s:=s+sqrt(sqr(x[n]-x[1])+sqr(y[n]-y[1])); s:=s+sg; writeln(s:1:2); end. The example calculates correct Потому что ты не берешь из файла и не выводиш в файл (assign(.....)) can you write hear some examples? for 12 the answer is 2 is it true
ı understood Edited by author 18.10.2012 14:14 Edited by author 18.10.2012 14:14 There are only one trick in this problem, it's the position of the first and last digit, the first position can be smaller 0 and the last position can be larger than the length, so you can consider the following segment of code: if(first<0 || last > 0) { //stop the code and print output } Chào A!E mới hoc lập trình C.code mãi bài 1106. Two Teams mà vẫn con sai mấy trường họp...:(( a gui code cho e bài dấy dc ko thanks A! Email:phuongvut8@gmail.com Edited by author 17.10.2012 21:01 Edited by author 17.10.2012 21:01 |
|