| Show all threads Hide all threads Show all messages Hide all messages |
| who can explain me sample? Why "reality our ",but not "reality your it our real" | T_be_GP | 1002. Phone Numbers | 8 Jun 2011 21:03 | 2 |
I done it. But i can't understand it. Thxs It's asking us to turn the input into a minimal sequence of words without leftover, not to find all of the words that can be found somewhere in the input. |
| Look out!!! | HybridTheory | 1248. Sequence Sum | 8 Jun 2011 20:15 | 5 |
If you get wrong answer on test #6,you should notice that there may be a '+' following the 'e'. oh!, thanks... it's give my chance to look at my self... what the bullshit is it! |
| WA 25 | Timur Sitdikov (MSU Tashkent) | 1435. Financial Error | 8 Jun 2011 12:20 | 1 |
WA 25 Timur Sitdikov (MSU Tashkent) 8 Jun 2011 12:20 If WA 25, try this: 1 1010 1100 Error in record #1. Correct number is: 1100. |
| if you get WA, please see this | liusiqi | 1011. Conductors | 8 Jun 2011 08:56 | 1 |
ok, I wanne say that double is not a precise number in computer. there must be many unusual mistakes if you use double... so, a better way is read them as strings,and then translate them to a long long number,which is 100 times as big as the input number. so,now you can solve this without the trouble of precise.... p.s. you can also times the double with 100, but I think you will get a TLE.... sorry for my english.... |
| I thought test #4 wass conflicting with the description of the problem - I was wrong | Leonid (SLenik) Andrievskiy | 1821. Biathlon | 7 Jun 2011 22:50 | 1 |
Sorry, it was a very stupid bug in my program Edited by author 07.06.2011 22:52 |
| How to do it faster? | AterLux | 1315. MDPAR and MIIAR | 6 Jun 2011 21:10 | 1 |
How to solve this (1315) faster than 0.1 sec? Which algo for this? My algo like this: For each cell i store: type (air, water or rock) and swim-air-capacity (number of cells can swim from this point) After load I have map with air and rocks First I filling topmost air-spaces with water and continue graph-fill to left to right and downwards, to determine which air-cells filled with water Second, I make air-capacity for start-cell is D+1, and thent I start BFS-fill of map like this: while cell-air-capacity is more than 0, i fill neighbour-cells: if neighbour-cell is air, set air-capacity to (D + 1), if water, and that air-capacity less than in this cell - then set air-capacity to value of this cell, decreased by 1. If one of cells in topmost row filled with Air-capacity 2 or more, then result "Can be rescued by himself" This algo takes 0,328 sec. But I can see in statistic there 0,031 and 0,045 sec results. Which algo can do it faster? Excuse my English ) Edited by author 06.06.2011 21:22 |
| Question | Alisher | 1567. SMS-spam | 6 Jun 2011 12:59 | 2 |
Can we have any numbers in our input text??? No. Read problem description: "Slogan consists of words, spaces, commas, full stops and exclamation marks. All the words consist of lowercase english letters". And no any numbers there. |
| I have WA#4 I can't find... | Night | 1613. For Fans of Statistics | 6 Jun 2011 01:21 | 6 |
Solution deleted by author Edited by author 06.06.2011 01:53 you are blowing balloons in this excercise May be there: L = 0;R = n; must be L = 1;R = n; I still get wrong answer. I don't know C++ well enough. Algorithm seems to be ok Are you sure in construction sort(arr,arr+n); not sort(arr,arr[n]); ? Oh thanks ... I already find my mistake. sort(arr,arr+n) are wrong sort(arr+1,arr+n+1); acceped |
| BE CAREFUL WITH THIS when you got WA7! | vbird | 1027. D++ Again | 5 Jun 2011 23:25 | 1 |
test 7 only has a single '(', nothing more. When you are using linux and read from file, be careful with that an '\n' will be added. |
| Shortest Path Algorithm does work | Marshall Mathers | 1772. Ski-Trails for Robots | 5 Jun 2011 21:32 | 1 |
|
| Crash #9 | Alisher | 1120. Sum of Sequential Numbers | 5 Jun 2011 21:09 | 1 |
Could someone explain me why I've got Crash #9? I was trying all tests here but I've got nothing. #include <iostream> #include <fstream> #include <algorithm> using namespace std; int n, a[111111], b[111111], i, l = 0, sum, index = 1; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif cin >> n; for(i=1;i<=100000;i++) { a[i] = a[i-1] + i; } while(true) { sum = a[index] - a[l] + l; if(sum == n) { int e = index - l + 1; if(l == 0) l++, e--; cout << l << " " << e; return 0; } if(sum > n) { l++; } else { index++; } } return 0; } Edited by author 05.06.2011 21:10 |
| Test 6 | Marginean Ciprian | 1772. Ski-Trails for Robots | 5 Jun 2011 08:25 | 2 |
Test 6 Marginean Ciprian 24 Sep 2010 15:40 I was talking bullshit if you read this before. Test 6 has k = 0, that was my problem. Edited by author 24.09.2010 19:18 |
| This problem can be solved easily with mathematica :) | Sevenk | 1753. Bookshelf | 5 Jun 2011 06:27 | 2 |
|
| Test13 | rauf (coder) | 1080. Map Coloring | 4 Jun 2011 22:45 | 2 |
Test13 rauf (coder) 19 Oct 2010 11:14 Someone advices this test 4 4 0 3 0 4 0 0 when I try it output is 0101 is it right? |
| Lucky Tickets prblm help | ashwin | 1044. Lucky Tickets. Easy! | 4 Jun 2011 17:19 | 4 |
Hello all i am new to programming problems and i want to improve. I am having trouble understanding this problem. The ticket is lucky if the sum of first half of digits is equal to the sum of next half of digits rite?? that is if the number is 23 then 2+0 must be equal to 3+0 rite??? if that is the case i am having trouble regarding my program in my program i break up the digits for example for 2 digit numbers i have two vars d1 and d2 i have a loop from n=10 to n<=99 if the number is 24(i am considering only two digit numbers) then d1 is 2 and d2 is 4 and then i check the condition using if((d1+0)==(d2+0)) count++; i know my code would be very long for nums with more than 2 digits but even for this i am not getting the answer..I just dont understand the mathematics part of this program on how to split the numbers and how to run the loop. any help would be greatful No. You are some wrong: E.g.: number 0000 is lucky - couse 0 + 0 = 0 + 0 numbe 1221 is lucky - couse 1 +2 = 2 +1 see ? Sum of first half of digits must be uqual to sum of second half. understand ? So if to do it with brut-force you'll have O(n^n) as I see. Hi thanks for replying... For two digit numbers how do i split them???? if the number is 24 then i should check whether 2+0==4+0?? How do i initiate a loop then?? Also i read in the discussions here that many program uses pow() fucntion and they calculate with N/2 numbers.. I dont understand that can anybody plz explain that?? You shouldn't check whether 2+0==4+0, use one of these ways: 1. int count = 0; for( int number = 0; number <= 99; number++ ){ //Loop through all tickets int d1 = number/10; // High bit int d2 = number%10; // Low bit if( d1==d2 ) count++; } 2. int count = 0; for( int d1 = 0; d1 <= 9; d1++ ) for( int d1 = 0; d1 <= 9; d1++ ) count++; But for n>2 it will be impossible to use this solution. I think you can found solution of this problem in Google. |
| Can I see the tests? | Gelioscope | | 4 Jun 2011 00:35 | 1 |
How to see tests for the program? |
| How to get memory less than 16 mb? | Hrayr | 1056. Centers of the Net | 3 Jun 2011 23:12 | 1 |
I used graf[n][n] and got MLE on test9.My solution is O(n^2). Edited by author 05.06.2011 15:08 |
| Empty lines in 1074 | Igor Dex | 1074. Very Short Problem | 2 Jun 2011 22:48 | 6 |
It is not clear if empty lines can be used in the input. Is the next example possible? <empty line> 5 # Yes it possible. A length of the string S doesn't exceed 100 symbols, but it not guaranteed not to be empty. Extra hint for you: try this: -7293874219874982174982174987321E-18446744073709551616 10 # Thank you, AterLux. That test is OK. I tried other tests from the forum. They are OK too. Anyway I have WA12. Moreover, is the next example with just 2 lines possible? # 1 It seems that it's possible. Do we have to write "Not a floating point number" because according to the statement we need to answer on each pair lines of the input? That's hair-splitting # means end of input, you need not to process this pair, also you need not to read second line in this pair. My both AC solution (Pascal & Java) will not output anything with your example. But, as we know, 12th test is not empty. When you get "Crash (Access violation)" - in most cases it mean reading or writing out of array bounds - so check it sizes. check you can process 100-character string and can output 200-character at line Be carefull with greatest numbers, + and - before numbers (and exponent too!), check "Nafpn" answer for double -- or ++ or -+ and so on also check you output 0.000 (without minus) when trimming -0.0000xxxx. |
| Oh,my God! What's the 15th test data? | Li_Ke[NEU] | 1133. Fibonacci Sequence | 2 Jun 2011 19:01 | 1 |
Who can help me? I dont't konw how to change my code now! Can anyone show your c++ code to me? Thank you very much! |
| Spaces in 1074 | Igor Dex | 1074. Very Short Problem | 1 Jun 2011 23:05 | 2 |
It is clear that we can't have leading spaces in case correct real number. But is it possible to have spaces after correct number till the end of the string? Example: 1.2e-3SSS 5 # No. Trailing as leading spaces not satisfy the syntactical description. |