Search found 9 matches

by chops
Wed Oct 26, 2005 10:39 pm
Forum: Volume 100 (10000-10099)
Topic: 10060 - A hole to catch a man
Replies: 22
Views: 8253

please give me some I/O.
Thanks in advance.
by chops
Tue Oct 25, 2005 10:29 pm
Forum: Volume 2 (200-299)
Topic: 202 - Repeating Decimals
Replies: 82
Views: 25270

Thanks a lot that was the only problem.
Got accepted. :D
by chops
Mon Oct 24, 2005 11:30 pm
Forum: Volume 2 (200-299)
Topic: 202 - Repeating Decimals
Replies: 82
Views: 25270

hi

i passed all the test cases found in the board.but WA.
please help.

#include<stdio.h>
#include<string.h>

#define YES 1
#define NO 0



int gcd(int a,int b)
{
int c;
for(;a%b;c=b,b=a%b,a=c);
return b;
}


void main()
{
int x,y,found,z,ans,digit[3001],temp[3001],a,b;

/*freopen("d:\\out202 ...
by chops
Fri Jul 01, 2005 6:00 pm
Forum: Volume 100 (10000-10099)
Topic: 10020 - Minimal coverage
Replies: 57
Views: 27268

can someone help me.
I got WA.


#include<stdio.h>
#include<stdlib.h>
#include<math.h>

#define SIZE 100001
#define EPS 1e-6

typedef struct {
double l,r;
char one[17];
char two[17];

}point;



point arr[SIZE];
int pos[SIZE];

void refresh()
{
long i;
for(i=0;i<SIZE;i++){arr[i].l=arr[i].r ...
by chops
Wed Jun 15, 2005 10:45 pm
Forum: Off topic (General chit-chat)
Topic: I win !!
Replies: 361
Views: 155449

what is happening here
by chops
Wed Jun 15, 2005 10:23 pm
Forum: Volume 107 (10700-10799)
Topic: 10763 - Foreign Exchange
Replies: 45
Views: 24770

here is the code.it gets wrong answer.help please.


#include<stdio.h>
#include<string.h>
#include<stdlib.h>

#define SIZE 500005

typedef struct{
long a,b;

}pair;

pair arr[SIZE];
int fnd[SIZE];

int comp(const pair * a,const pair *b)
{
if(a->a > b->a)return 1;
else if(a->a < b->a)return -1 ...
by chops
Thu Mar 03, 2005 7:08 pm
Forum: Volume 4 (400-499)
Topic: 482 - Permutation Arrays
Replies: 159
Views: 53310

482-help me find the bug

here is my got.got wrong answer.help

#include<stdio.h>
#include<string.h>
#include<assert.h>
#include<stdlib.h>

#define SIZE 1000001

long pos[SIZE];
char val[SIZE][30];
char inp[SIZE*12];

void main()
{
long i,j,N;
char *q;

gets(inp);
sscanf(inp,"%ld",&N);
while(N--)
{
gets(inp);
q ...
by chops
Sun Jan 30, 2005 9:33 pm
Forum: Algorithms
Topic: Please tell me the number of KMP's application problems,thx.
Replies: 4
Views: 2509

thanks a lot.
that little thing didnt came to my mind.
i thought there was problem in my implementation.
by chops
Sat Jan 29, 2005 11:03 pm
Forum: Algorithms
Topic: Please tell me the number of KMP's application problems,thx.
Replies: 4
Views: 2509

hi ,i used KMP for this problem(10679).
it gets lime limit exceeded.

is my implementation wrong.please help

#include<stdio.h>
#include<malloc.h>
#include<string.h>

char p[100010],q[1100];
long f[1100];
long lenp,lenq;

void refresh()
{
int i;
q[0]=0;
for(i=0;i<1100;i++)
{
f =0;
}
}

void ...

Go to advanced search