Search found 42 matches

by arif_pasha
Tue Mar 18, 2008 2:05 pm
Forum: Volume 114 (11400-11499)
Topic: 11401 - Triangle Counting
Replies: 19
Views: 10270

You can remove your code from the post. (don't spoil the fun to solve a problem :D)
by arif_pasha
Sun Mar 09, 2008 8:21 pm
Forum: Volume 111 (11100-11199)
Topic: 11140 - Little Ali's Little Brother!
Replies: 28
Views: 14031

What would be the output for this kind of test case?

Code: Select all

3 3 1
**.
*.*
.**
5 5
**...
*....
.....
....*
...**
by arif_pasha
Sun Feb 17, 2008 9:29 pm
Forum: Volume 114 (11400-11499)
Topic: 11401 - Triangle Counting
Replies: 19
Views: 10270

Thanks.

For temporary variable i was using int instead of long long. that was overflowing. :oops:
by arif_pasha
Sun Feb 17, 2008 2:29 pm
Forum: Volume 114 (11400-11499)
Topic: 11401 - Triangle Counting
Replies: 19
Views: 10270

Can anyone confirm the result for the following set:

Code: Select all

9
10
11
12
50
100
1000
10000
100000
I Get:

Code: Select all

34
50
70
95
9500
79625
82958750
83295837500
51903307670168
Thanks
by arif_pasha
Fri Mar 09, 2007 9:07 pm
Forum: Volume 100 (10000-10099)
Topic: 10096 - The Richest Man of the Universe
Replies: 42
Views: 16512

After a lot of tries and of course a lot of WA's i decided to give up this problem.. :cry: :cry: :cry:
by arif_pasha
Thu Mar 08, 2007 8:25 am
Forum: Volume 111 (11100-11199)
Topic: 11191 - Square
Replies: 23
Views: 13389

Hi all, Can someone please tell me what wrong i am doing here. I tested with my own generated test data and compared with the output of Brute force algo. But getiing WA all the time..

Code: Select all

Code removed...
Thanx sohel. I should have noticed it... :oops:
by arif_pasha
Mon Mar 05, 2007 11:26 am
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 67071

1. use gets() to get the line.
2. use larger array size [say 110]

Hope it helps..
by arif_pasha
Thu Mar 01, 2007 12:49 am
Forum: Volume 3 (300-399)
Topic: 342 - HTML Syntax Checking
Replies: 31
Views: 12739

Thanks viniciusweb

I got it accepted after a lot of tries.. :D
I got WA for the first test ...

Arif
by arif_pasha
Wed Feb 28, 2007 7:22 pm
Forum: Volume 3 (300-399)
Topic: 342 - HTML Syntax Checking
Replies: 31
Views: 12739

Can anyone please give the output for the following test cases: 8 <A> 1st line <B> 2nd line <C> 3rd line </C> 4th line </B> 5th line <D> 6th line 7th line 8th line 1 <A>kk< 1 <A>kk</ 0 My Output Test Case 1 line 6: expected </D> Test Case 2 line 1: bad character in tag name. Test Case 3 line 1: bad ...
by arif_pasha
Tue Feb 27, 2007 12:01 am
Forum: Volume 5 (500-599)
Topic: 551 - Nesting a Bunch of Brackets
Replies: 56
Views: 12128

Thanks JAN. your output and explanation was really helpful.
I got AC at last. :)
by arif_pasha
Mon Feb 26, 2007 3:47 pm
Forum: Volume 5 (500-599)
Topic: 551 - Nesting a Bunch of Brackets
Replies: 56
Views: 12128

Thanks Jan for your reply. My Output: YES NO 8 NO 8 NO 2 YES YES YES NO 4 YES YES YES YES YES YES NO 2 NO 2 NO 6 I dont understand the output for the following inputs, can u explain those.. input your_output ({{}{}}[{(){}[]} NO 17 aaa(aaaa NO 9
by arif_pasha
Mon Feb 26, 2007 1:21 am
Forum: Volume 3 (300-399)
Topic: 324 - Factorial Frequencies
Replies: 23
Views: 4027

--> AlgoJo 1. Your program should terminate on input 0 try while(scanf("%d",&n)==1) { if(n==0)break; memset(res,'0',sizeof(res)); strcpy(t1,"2"); ........... 2. It produces incorrect result for input 1 3. It gets "compile error" for the function "itoa". itoa function is not ansi standard.. you shoul...
by arif_pasha
Sun Feb 25, 2007 11:28 pm
Forum: Volume 3 (300-399)
Topic: 343 - What Base Is This?
Replies: 72
Views: 21438

Change the printf function..
You have to print each output in a separate line..

try: printf(".....\n")
by arif_pasha
Sun Feb 25, 2007 11:12 pm
Forum: Volume 5 (500-599)
Topic: 551 - Nesting a Bunch of Brackets
Replies: 56
Views: 12128

Please someone give me the output of the test cases below

Can anyone AC'er give me the output for the following test cases:

Code: Select all

()(***)(**)
()(***)(*)
({{}{}}[{(){}[]}
([))
()(**)
()*
aaaaaaa
aaa(aaaa
*******
a*a*a*a
()a
a()
()*()
(*a{+}*)
**)
*(*
(*a++(*)

Thanks in advance.
by arif_pasha
Fri May 12, 2006 8:04 pm
Forum: Volume 2 (200-299)
Topic: 218 - Moth Eradication
Replies: 60
Views: 10560

Try this input:

Code: Select all

8
0 0
.5 0
1 0
1 .5
1 1
.5 1
0 1
0 .5
0
My Accepted code give this output:

Code: Select all

Region #1:
(0.0,1.0) - (0.5,1.0) - (1.0,1.0) - (1.0,0.5) - (1.0,0.0) - (0.5,0.0) - (0.0,0.0) - (0.0,1.0)
Perimeter length = 4.00
hope it helps

Go to advanced search