## Search found 29 matches

Thu Apr 28, 2011 7:37 pm
Forum: Volume 119 (11900-11999)
Topic: 11960 - Divisor Game
Replies: 19
Views: 5526

### Re: 11960 Divisor Game Getting WA!!

Actually the problem is a simple precalculating problem... 1. First of all u generate the divisor number using seieve div(n)= n1^(p1+1) * n2^(p2+1)......) 2. next u precalculate maxdiv 1 to range suppose div[] is a calculating of number of divisor mdiv[1]=1; mind[1]=1; if div[2] >=mdiv[1] { mdiv[2]=...
Tue Apr 26, 2011 9:00 pm
Forum: Volume 118 (11800-11899)
Topic: 11888 - Abnormal 89's
Replies: 11
Views: 6309

### Re: 11888 - Abnormal 89's

Hi anas
if You solve this problem O(n) , you have to try using KMP(only just Prefix function)

ASU(SUST)
Tue Apr 26, 2011 8:52 pm
Forum: Volume 119 (11900-11999)
Topic: 11946 - Code Number
Replies: 49
Views: 9434

### Re: 11946- Code Number

Hi rafai u arise some problem.... 1. please while(1) change--->while(gets(a)) 2.problem says print a blank line between test case not at all so be careful and edit ur blank line 3.garbage variable or function be delete....... ASU(SUST) :)
Fri Apr 22, 2011 10:26 pm
Forum: Volume 119 (11900-11999)
Topic: 11962 - DNA II
Replies: 5
Views: 1853

### Re: 11962 - DNA-II WA

Hi Nazeen you have some problem arise. i) firstly your output format is wrong plz change ( ; -> : ) ii) you can get precision error for power funtion. so my suggest you use a linear loop for power function iii) long long must Accepted iv) cheek this input: 1 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT output: Ca...
Thu Aug 19, 2010 11:34 am
Forum: Volume 117 (11700-11799)
Topic: 11753 - Creating Palindrome
Replies: 8
Views: 4092

### Re: 11753 - Creating Palindromes

Hi simon
How it's possible in adhoc. i solve it with Recursion , but time nedded 0.63. please can u tell ur process.
u can tell this address. thimpu_cse@yahoo.com
Tue Jul 06, 2010 12:41 pm
Forum: Volume 118 (11800-11899)
Topic: 11805 - Bafana Bafana
Replies: 23
Views: 7586

### Re: 11805-Bafana Bafana

Hi apurba,
i think u forward wrong way
input
1
5 2 2
output: 4
plz think at right way
ASU(SUST)
Sun Feb 07, 2010 8:33 pm
Forum: Volume 117 (11700-11799)
Topic: 11770 - Lighting Away
Replies: 27
Views: 8754

### Re: WA in problem 11770

Getting WA? #include<stdio.h> long front,rear,f[10000],grid[10000][10000],ind[10000],q[100000],m,n,t,l,p[11000],a,b,visit[10000],c=0,cas=1; void dfs(long k) { long u,l; u=k; for(l=1; l<p ; l++) { if(!visit[grid [l]]) { visit[grid [l]]=1; //printf("%ld ",grid [l]); dfs(grid [l]); } } } void t_sort()...
Sun Feb 07, 2010 8:57 am
Forum: Volume 117 (11700-11799)
Topic: 11709 - Trust groups
Replies: 9
Views: 4343

### Re: 11709 Trust Groups

I have a problem with 11709. It seems to be a easy question -- finding out the number of sets where people in the set trust each other But I am getting WA continuously. Can anyone help to check my code? Thanks really much! Charles #include <iostream> #include <map> using namespace std; map<string, ...
Sun Feb 07, 2010 8:50 am
Forum: Volume 117 (11700-11799)
Topic: 11709 - Trust groups
Replies: 9
Views: 4343

### Re: 11709 Trust Groups

Why WA!!! Please give me some test case. Thanks. #include<stdio.h> #include<string.h> #include<stdlib.h> struct TT { char x[30]; }; TT nam[1009]; char temp[30]; long sam[1009][1009],A[1009][1009]; long n,m,i,j,visit[1009],ind[1009]; long p1,p2,count; int cmp( const void *a, const void *b ) { TT *p ...
Sun Feb 07, 2010 8:38 am
Forum: Volume 117 (11700-11799)
Topic: 11770 - Lighting Away
Replies: 27
Views: 8754

### Re: WA in problem 11770

Getting WA? #include<stdio.h> long front,rear,f[10000],grid[10000][10000],ind[10000],q[100000],m,n,t,l,p[11000],a,b,visit[10000],c=0,cas=1; void dfs(long k) { long u,l; u=k; for(l=1; l<p ; l++) { if(!visit[grid [l]]) { visit[grid [l]]=1; //printf("%ld ",grid [l]); dfs(grid [l]); } } } void t_sort()...
Sun Feb 07, 2010 8:29 am
Forum: Volume 117 (11700-11799)
Topic: 11770 - Lighting Away
Replies: 27
Views: 8754

### Re: WA in problem 11770

I am getting wa in this.I am not sure if my process is ok. I used BFS.I color every node with bfs except the nodes which were the starting node of the bfs'.And then last i checked how many uncolored node is there. is it ok?? #include<stdio.h> #include<vector> #include<algorithm> using namespace std...
Fri Jan 15, 2010 5:06 pm
Forum: Volume 117 (11700-11799)
Topic: 11733 - Airports
Replies: 23
Views: 7642

### Re: 11733 - Airports

Hi try this input checking.. its help u i think..
4
3 2 120
1 2 20
2 3 120
5 2 100
1 3 20
3 5 100
5 2 120
1 3 20
3 5 100
4 3 10
1 2 5
2 3 15
3 4 0
Case #1: 260 2
Case #2: 420 4
Case #3: 480 3
Case #4: 25 2
ASU(SUST)
"Teme jabo bole to Shopno deki ni"
Fri Dec 25, 2009 8:03 pm
Forum: Volume 116 (11600-11699)
Topic: 11661 - Burger Time?
Replies: 37
Views: 11181

### Re: 11661-Burger Time. ...Why WA?????

Hi,
ur program cannot produce proper output..
check this input...
6
D...RD
10
D.......RD
5
D...Z
ans:
1
1
0
ASU(sust)
Fri Dec 25, 2009 7:19 pm
Forum: Volume 117 (11700-11799)
Topic: 11736 - Debugging RAM
Replies: 5
Views: 2421

### Re: debugging ram

HI, its a easy base conversion problem. look the input carefully .... 4 4 ab 2 Cd 2 ef 3 gh 1 0101 1111 1111 0101 1010 1010 1010 1000 4 Ab Cd ef gh b=4 is the number of bits in a byte and v =4 is the total number of variables in the RAM where robot is used. now ab=2, its means it contains 2 bytes in...