Search found 14 matches

by passwd
Fri Aug 29, 2003 3:23 am
Forum: Volume 100 (10000-10099)
Topic: 10004 - Bicoloring
Replies: 93
Views: 45247

my program is working OK for this input ...

Can someone give-me some inputs that my program doesn
by passwd
Sat Aug 23, 2003 2:59 am
Forum: Volume 100 (10000-10099)
Topic: 10004 - Bicoloring
Replies: 93
Views: 45247

10004

hi,

I
by passwd
Mon Jun 09, 2003 1:41 am
Forum: Volume 4 (400-499)
Topic: 439 - Knight Moves
Replies: 33
Views: 14986

439 WA

hi,

I'm trying to solve p 439 , but I'm getting WA ! Can someone help me please ??

here is the code in C:

[c]

#include <stdio.h>
/*#define DEBUG*/
#define NUM 800

int dentro(int l,int c) {
return (l>=0 && l<8 && c>=0 && c<8);
}

void marca(int v[8][8],int j,int k,int valor) {
int p,q;
int l ...
by passwd
Tue May 27, 2003 2:51 am
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 43837

hi, I'm trying to solve this problem too , but I'm getting WA and I don't
know why ??

someone can help me ??

[c]
#include <stdio.h>
/*#define DEBUG*/

long reverse(long n) {
long fator=1;
long aux=n,resp=1;
while(aux!=0) { fator*=10; aux = aux / 10; }
fator/=10;
/* printf("aux: %d fator:%d \n ...
by passwd
Tue May 27, 2003 2:50 am
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 43837

hi, I'm trying to solve this problem too , but I'm getting WA and I don't
know why ??

someone can help me ??

[c]
#include <stdio.h>
/*#define DEBUG*/

long reverse(long n) {
long fator=1;
long aux=n,resp=1;
while(aux!=0) { fator*=10; aux = aux / 10; }
fator/=10;
/* printf("aux: %d fator:%d \n ...
by passwd
Fri Mar 28, 2003 10:12 pm
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 33275

thanks !! I got AC too , the problem was in the mail !!
by passwd
Thu Mar 27, 2003 6:10 pm
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 33275

I rewrite my code using another algorithm, but still WA :evil:
and I don't know where is the problem ...

[c]
#include <stdio.h>
#include <math.h>
int main() {
unsigned long n,m;
while(fscanf(stdin,"%d%d",&n,&m)==2) {
if( n==0 && m==0 ) break;
if(n==m) fprintf(stdout,"%d things taken %d at a ...
by passwd
Wed Mar 26, 2003 7:59 pm
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 33275

369 , Why WA ?

hi, I'm trying to solve p 369 but I'm getting WA , why ?

I have used long , unsigned long, long double , but still WA ...

[c]
#include <stdio.h>
/*#define DEBUG*/

int mdc(int _m,int _n) {
int resto;
do {
resto = _m % _n;
_m=_n;
_n=resto;
} while(resto!=0);
return(_m);
}

void reduz(int *n ...
by passwd
Tue Mar 25, 2003 2:04 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 33275

P 369 , why time limit ?

hi, I'm getting time limit in this problem and I don't know why ?

/*---start---*/
[c]
#include <stdio.h>
/*#define DEBUG*/

long fact(long x) {
int i;
for(i=x-1;i!=1;--i) x*=i;
#ifdef DEBUG
printf("fact: %d\n",x);
#endif
return x;
}


long mdc(long _m,long _n) {
long resto;
do {
resto = _m ...
by passwd
Tue Jan 14, 2003 5:56 pm
Forum: Volume 2 (200-299)
Topic: 257 - Palinwords
Replies: 16
Views: 7440

P 257 - Why time limit ?

hi,

I'm trying to solve problem 257(paliwords) but I got time limit ,
I confirmed the code a lot of times and I don't know where is
the problem ...

[c]
#include <stdio.h>
#include <string.h>

/*#define DEBUG*/

typedef struct cel {
struct cel* prox;
char word[257];
} Lista;
typedef Lista ...
by passwd
Tue Jan 14, 2003 5:48 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 108633

P 101 Why WA ?

hi,

I'm trying to solve problem 101, but I'm getting wrong answer,
anyone can help me ?

[c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/*#define DEBUG*/

typedef struct celula {
int key;
struct celula *prox;
struct celula *ant;
} node;
typedef node *lista;

void listKill(lista ...
by passwd
Sat Dec 07, 2002 7:34 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 116567

Re: Re: P 102 - Worg answer, why ?

I know that the problem says if more than one order of brown, green,
and clear bins yields the minimum number of movements then
the alphabetically first string representing a minimal configuration
should be printed


but I don
by passwd
Thu Dec 05, 2002 11:35 pm
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 51691

P 108 - Time Limit Exceeded

hi,

I'm getting Time Limit Exceeded, and I don't know why ...
If someone knows, please, advice !

[c]
#include <stdio.h>
/*#define DEBUG*/

int main() {

int n;
int i,j;

scanf("%d", &n);

{
int v[n][n];
int k=0,m=0,maxsum=-1,aux=0,p,q;
if(n==0) { printf("0\n"); exit(0); };
for(i=0;i<n;i ...
by passwd
Thu Dec 05, 2002 11:27 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 116567

P 102 - Worg answer, why ?

hi,

I'm trying to solve problem 102 , but I'm getting wrong answer and I
don't know why , it seem to be correct ...
I'm sendind the source code, please, if someone can help me ...

[c]
#include <stdio.h>

int main() {

unsigned long int b[3];
unsigned long int g[3];
unsigned long int c[3 ...

Go to advanced search