| Show all threads Hide all threads Show all messages Hide all messages |
| Пустые стены | PetrSU #1: Ioffe, Filev, Shapovalov | 1912. Titan Ruins: Passing through Walls | 20 Oct 2012 14:37 | 1 |
Пустые стены PetrSU #1: Ioffe, Filev, Shapovalov 20 Oct 2012 14:37 Может ли между двумя соседними по стороне комнатами не быть пустоты (пробел)? то есть верно ли, что каждая комната всегда окружена какими-то стенами и углами? |
| What's the condition they kill themselves? | Ade | 1917. Titan Ruins: Deadly Accuracy | 20 Oct 2012 14:20 | 3 |
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". |
| Tests don't fit in limitations on 'n' | Yermak | 1915. Titan Ruins: Reconstruction of Bygones | 20 Oct 2012 13:56 | 2 |
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. |
| WA8 | FOS team [Podgorny & Mishchenko] | 1903. Unidentified Ships | 20 Oct 2012 08:31 | 4 |
WA8 FOS team [Podgorny & Mishchenko] 14 Oct 2012 16:26 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 Re: WA8 Berezhko German 16 Oct 2012 07:52 7 6 1 1 1 1 1 5 5 1 3 Answer is 3. have you more than 3? Re: WA8 Vit Demidenko 18 Oct 2012 10:44 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} Re: WA8 VenusWithArms 20 Oct 2012 08:31 dw bout him. My AC solution gives 6. |
| I have wa28, as well as many authors, who knows what is this test?? | -AlexandeR- (TNU) | 1412. Autumn Tide | 19 Oct 2012 23:18 | 6 |
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 |
| any hints? | d3m0n1c | 1862. Very Wealthy Mole | 19 Oct 2012 23:15 | 8 |
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:17 |
| How is a problem's difficulty calculated? | tyomitch | | 19 Oct 2012 23:14 | 2 |
It'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. |
| Help with task | Edger | | 19 Oct 2012 20:29 | 1 |
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. |
| Help me... | Cezar Mocan | 1149. Sinus Dances | 19 Oct 2012 17:23 | 6 |
What does the program output for n=0? |
| can anyone explain me the sample | anupam ghosh | 1180. Stone Game | 18 Oct 2012 21:53 | 2 |
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. |
| why??? | Ahmet Faruk Ozkan OTTOMAN(Devlet - i Âliye)) | 1087. The Time to Take Stones | 18 Oct 2012 17:07 | 1 |
why??? Ahmet Faruk Ozkan OTTOMAN(Devlet - i Âliye)) 18 Oct 2012 17:07 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 |
| Why it is wrong? Pascal. | Mad_Sanek | 1020. Rope | 18 Oct 2012 16:49 | 2 |
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? | Ahmet Faruk Ozkan OTTOMAN(Devlet - i Âliye)) | 1180. Stone Game | 18 Oct 2012 14:11 | 3 |
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 |
| if Wa on test#2,try this case | ykwd | 1057. Amount of Degrees | 18 Oct 2012 12:41 | 1 |
|
| Hint for this problem ! | Phan Hoai Nam | 1003. Parity | 17 Oct 2012 21:00 | 2 |
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 |
| WA#2 TEST. WHATS WRONG??????? | Bagrat<#RAU#> | 1370. Magician | 17 Oct 2012 19:17 | 2 |
#include <iostream.h> int main() { int N,M,i,t; cin>>N>>M; int *mas=new int [N]; int *mas2=new int [N]; for(i=1;i<=N;i++) cin>>mas[i]; for(i=1;i<=N;i++) { t=i+M; if(t>N) { t-=N; } mas2[t]=mas[i]; } if(N>10) { for(i=3;i<=N;i++) cout<<mas2[i]; } else { for(i=1;i<=N;i++) cout<<mas2[i]; } return 0; } If you wnat to use cin and cout you must write using namespace std; |
| Please give answers to the tests: | Yermak | 1908. Brute-force Search | 17 Oct 2012 17:34 | 3 |
1 ab 1 abcd 2 a b 2 ab bc 4 aa ab ba bb 6 a ba bb ca cb cc Edited by author 15.10.2012 02:26 Edited by author 15.10.2012 02:40 |
| Problem 1206 "Sum of digits". New tests have been added (+) | Vladimir Yakovlev (USU) | 1206. Sum of Digits of the Sum of Numbers | 17 Oct 2012 10:41 | 4 |
New tests were added to the problem. All possible inputs are checked now :) Problem statement was updated: limitation "0 < K <= 50" was replaced by "2 <= K <= 50". There wasn't a case K=1 in the tests. AC submissions were rejudged, 44 of them lost AC. I think who write true program with long arithmetics hasn,t lost ACC!!! Thanks. I know why I wa 1 |
| Easy to solve HINT | AzizIO | 1712. Cipher Grille | 17 Oct 2012 02:36 | 1 |
Code in C#!!! first of ALL just print and reverse print .... 3 times static string [,] reverse(string[,] arr) { string[,] tmp = new string [4,4];
for (int i = 0; i < 4; i++) { for (int j = 0; j < 4 ; j++) { tmp[i,j] = arr[4-j-1,i]; } } return tmp; } in this case i wrote code for 4x4 array!!! you can change your code to tmp[i,j] = arr[3-j,i] if u want reverse nxn array change all 4 to n GooD Luck! sorry for my english!! Edited by author 17.10.2012 02:39 |
| Чем бы заменить решето? | Alexsander827 | 1356. Something Easier | 17 Oct 2012 01:04 | 1 |
|