Search found 111 matches

by arsalan_mousavian
Fri Sep 22, 2006 3:54 pm
Forum: Volume 110 (11000-11099)
Topic: 11099 - Next Same-Factored
Replies: 24
Views: 10718

0 is an invalid input , as it is mentioned in the problem statement that input will be a positive intger my AC program output as same as you , maybe you didn't used long long , because for some input ( e.g maximum prime less than 1000000 ) the answer will be input*input that is more than 2000000 but...
by arsalan_mousavian
Thu Sep 21, 2006 9:25 pm
Forum: Volume 110 (11000-11099)
Topic: 11099 - Next Same-Factored
Replies: 24
Views: 10718

Re: 11099

I need a hint to solve this problem whitout getting tle. please help. consider the case that maximum power for each prime factor is 1 ( like 5 , 7 , 6 = 2^1*3^1 ) what is the output ? otherwise you can solve it simply and also you can memoize for each input you read , so if there is multiple input ...
by arsalan_mousavian
Thu Sep 21, 2006 8:14 pm
Forum: Volume 110 (11000-11099)
Topic: 11099 - Next Same-Factored
Replies: 24
Views: 10718

about Problem A :
the map has 2 character , it is not mentioned that these 2 characters are l and w , there can be 2 arbitrary characters , but the character at (X,Y) shows land and the other character shows water

about problem F :

input :
24

output :
36
your output :
48
hope it helps
by arsalan_mousavian
Thu Sep 14, 2006 1:16 am
Forum: Volume 106 (10600-10699)
Topic: 10616 - Divisible Group Sums
Replies: 39
Views: 19258

i 've got WA on this problem , and my program handles all the IO above , can someone post some tricky IO ?

EDIT :i got AC , and i don't need any IO anymore :lol:
thanks in Advance
Arsalan
by arsalan_mousavian
Sat Aug 12, 2006 9:10 pm
Forum: C++
Topic: Strange OJ Compiler Message
Replies: 2
Views: 1605

Strange OJ Compiler Message

during the contest , i have submit my code and the result was CE , and when i check my mail i see some thing strange OJ Compiler message was no such a file or directory after the contest i have submited my code without any changes and i got AC can someone tell me what does it mean ? you know it is s...
by arsalan_mousavian
Sat Aug 12, 2006 6:42 pm
Forum: Volume 110 (11000-11099)
Topic: 11070 - The Good Old Times
Replies: 42
Views: 15230

during the contest i've got several CE on this problem , and when i checked my mail, it was written No Such a File or Directory but after contest i submit it without any changes and i got AC , can somebody tell me why this happens? because it was very awful during the contest
by arsalan_mousavian
Tue Aug 08, 2006 6:48 am
Forum: Volume 110 (11000-11099)
Topic: 11061 - Playing War
Replies: 41
Views: 10776

i think it should be min ( defend , attack -1 ) , since the attackers should always keep one soldier in their territory , by the way i got still WA , can someone check my code plz ? Note, that there may be different numbers of attacker's and defender's armies in one attack. Suppose somewhere before...
by arsalan_mousavian
Mon Aug 07, 2006 7:26 pm
Forum: Volume 110 (11000-11099)
Topic: 11061 - Playing War
Replies: 41
Views: 10776

on each level they roll the dice attakers hava the probabillity of 15/36 to kill one defender ( becauese there is 15 pair of numbers between 1 and 6 that the first one is greater than the second one ) and defender has the probabilty of 21/36 to kill one attacker Well, but in each attack both of the...
by arsalan_mousavian
Mon Aug 07, 2006 2:19 pm
Forum: Volume 110 (11000-11099)
Topic: 11061 - Playing War
Replies: 41
Views: 10776

on each level they roll the dice attakers hava the probabillity of 15/36 to kill one defender ( becauese there is 15 pair of numbers between 1 and 6 that the first one is greater than the second one ) and defender has the probabilty of 21/36 to kill one attacker Well, but in each attack both of the...
by arsalan_mousavian
Mon Aug 07, 2006 11:42 am
Forum: Volume 110 (11000-11099)
Topic: 11061 - Playing War
Replies: 41
Views: 10776

i got WA on this problem , can some one read my code and tell me if my approach is correct or not ? Could you explain us how did you get the following formula? ..... prob [ attack ][ defend ] = ( double ) ( 15 . 0 / 36 . 0 ) * prob [ attack ][ defend - 1 ] + ...........................................
by arsalan_mousavian
Mon Aug 07, 2006 9:29 am
Forum: Volume 110 (11000-11099)
Topic: 11061 - Playing War
Replies: 41
Views: 10776

i got WA on this problem , can some one read my code and tell me if my approach is correct or not ? #include <iostream> #include <cmath> using namespace std ; double prob [2000][1001] ; int result [1001] ; int main () { for ( int i=0 ; i<2000 ; i++ ) prob [i][0] = 1 ; for ( int i=0 ; i<=1000 ; i++ )...
by arsalan_mousavian
Mon Aug 07, 2006 9:23 am
Forum: Volume 110 (11000-11099)
Topic: 11058 - Encoding
Replies: 28
Views: 15533

Re: Thanx

thanx Dear Arsalan.I got AC. But is there faster algorithm for this problem? i don't think so , because this problem is so easy , it's a kind of simulation problem , and no need to think in order to solve it , but if you change your "cr" first dimension from 1005 to 100 ,and when you update the arr...
by arsalan_mousavian
Sun Aug 06, 2006 7:29 pm
Forum: Volume 110 (11000-11099)
Topic: 11060 - Beverages
Replies: 96
Views: 33326

maybe you sort the drinks by name , because the drinks on each level in sample is given by the order of input , but you output them in sorted order for example if B and A are in the same level and B is given before A in the input you should print B , A not A , B
by arsalan_mousavian
Sun Aug 06, 2006 7:15 pm
Forum: Volume 110 (11000-11099)
Topic: 11058 - Encoding
Replies: 28
Views: 15533

Re: 11058 : Encoding

Ashkankhan wrote:can any body give i/o for this problem.I got WA :cry:
hi dear ashkan ,
it's good to see you , i think this problem is so trivial , maybe you did a little mistake , and i am not so good in generating IO ( i wish i could :wink: ), but you can PM me your code , and i'll check it 4 u
yours
Arsalan
by arsalan_mousavian
Sun Aug 06, 2006 2:29 am
Forum: Volume 110 (11000-11099)
Topic: 11063 - B2-Sequence
Replies: 73
Views: 40479

thanks a lot , you know it is about 4AM here and i made this silly mistakes

Go to advanced search