Search found 37 matches

by algoJo
Thu Mar 06, 2008 9:14 pm
Forum: Volume 5 (500-599)
Topic: 532 - Dungeon Master
Replies: 39
Views: 14517

Accepted in another oj, RE in UVa oj

I'm using bfs, but I wonder which part of my code which made me got Runtime Error, would someone kind to enlighten me?
I've test my solution and got accepted in another oj

#include<cstdio>
#include<cstring>
#include<cstdlib>
#define MAX 100
#define F(i,s,e) for(i=s;i<e;i++)

struct node{
int r ...
by algoJo
Fri Jul 06, 2007 3:42 pm
Forum: Volume 111 (11100-11199)
Topic: 11148 - Moliu Fractions
Replies: 19
Views: 15552

Hi what the output for:
INPUT

8
What is the product of 2 , 6/55 and 3-1/3 ?
A cookie weighs exactly 18-2/5 g. What is the weight of a packet of 12 cookies?
What is the product of 2 , 6/55 and 3-0/3 ?
A cookie weighs exactly 0-2/5 g. What is the weight of a packet of 12 cookies?
-there_can_be ...
by algoJo
Fri Jun 22, 2007 7:10 am
Forum: Volume 2 (200-299)
Topic: 250 - Pattern Matching Prelims
Replies: 15
Views: 9657

Thanks for replying helloneo.. :D
I still got WA :(
this is how I implement the EPS

Code: Select all

if(res2+1e-6<=smallCol+1e-6&&res+1e-6<=smallRow+1e-6)   {smallRow=res;smallCol=res2;ansR=r;ansC=c;}
is it rite?
hmm...., is there any tricky input on this problem...
by algoJo
Fri Jun 22, 2007 6:41 am
Forum: Volume 2 (200-299)
Topic: 250 - Pattern Matching Prelims
Replies: 15
Views: 9657

Why it always get WA...

Hi, I think this problem is straightforward, but it gives me multiple WA..., can anyone give me some hints? I'm very very curious bout this problem...
Thanks :D


#include<stdlib.h>
#include<stdio.h>
#define MAX 26
#define INF 1000000000000

long double arr[MAX][MAX];
int Row,Col;
int ansR,ansC ...
by algoJo
Thu May 31, 2007 4:06 am
Forum: Volume 105 (10500-10599)
Topic: 10515 - Powers Et Al.
Replies: 124
Views: 45174

I got Runtime Error :o , can someone show me why?

Code: Select all

AC-ed
thanks for replying Jan :lol:
by algoJo
Sat May 26, 2007 6:39 pm
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 30176

Can anyone show me a tricky input?

I got multiple WA on this problem.
Can someone check the correctness of this I/O set?

INPUT

2
33 21 45
33 55
1
2 1
1 2
12 45 1 2 4 7 5 11 21 99 12 47

56 12 48
75 2 1 44 53 84 21 46 82 43 99 49 89 7 9
1 2 3 6 7 8 4 5
1 3 19 4 95 62 42 43 13 2
1 2 3 4 5 6 7 8 9 10 11 12 14 13 15 16 17 18 19 ...
by algoJo
Tue May 15, 2007 2:09 pm
Forum: Volume 7 (700-799)
Topic: 726 - Decode
Replies: 36
Views: 13908

Hi, I got multiple RE and MLE on this problem, can someone show me some hints?

#include<cstdlib>
#include<cstdio>
#include<cstring>
#define MAX 40001

struct node{
char alpha;
int total;
}arr[26],rra[26];



char kar[]="abcdefghijklmnopqrstuvwxyz";
char coto[]="abcdefghijklmnopqrstuvwxyz ...
by algoJo
Sun Apr 29, 2007 6:47 am
Forum: Volume 4 (400-499)
Topic: 497 - Strategic Defense Initiative
Replies: 144
Views: 44322

critical I/O set

Hi, can someone check this I/O set:

INPUT

11

1
2
3
4
5

5
4
3
2
1

1



1
3
4
2
5
6

100
45
46
47
48
49
11
1

1
6
2
3
5

3
2

10

1
3
4
2
5
6


OUTPUT

Max hits: 5
1
2
3
4
5

Max hits: 1
1

Max hits: 1
1

Max hits: 0

Max hits: 0

Max hits: 5
1
3
4
5
6

Max hits ...
by algoJo
Sun Apr 22, 2007 8:03 am
Forum: Volume 102 (10200-10299)
Topic: 10293 - Word Length and Frequency
Replies: 18
Views: 11135

Hi, I got RE for this problem...
any hints??
Thanks.. :D

#include<stdio.h>
#include<string.h>
#define MAX 100

char arr[10000][MAX];
int res[50];

void compute(int L){
int i,j,len,flag=0;
int temp=0;
for(i=0;i<L;i++)
{
len=strlen(arr[i]);
if(!flag)
{
res[temp]++;temp=0;
}
for(j=0;j<len ...
by algoJo
Mon Apr 16, 2007 8:13 am
Forum: Volume 1 (100-199)
Topic: 159 - Word Crosses
Replies: 32
Views: 6708

Hi I've always got PE in this problem, can someone tell me what's wrong?
INPUT:

MATCHES CHEESECAKE PICNIC EXCUSES
EXCUSES PICNIC MATCHES CHEESECAKE
EXCUSES PICNIC CHEESECAKE MATCHEX
PEANUT BANANA VACUUM GREEDY
BALL CATAM BALL BA
CATAM BALL BA BALL
CATAM BALL BALL BA
CHEESECAKE MATCHES PICNIC ...
by algoJo
Sat Apr 14, 2007 1:15 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 59819

u must use big integer to solve this problem...
try these:
INPUT:
5000

OUTPUT:

The Fibonacci number for 5000 is ...
by algoJo
Sat Mar 31, 2007 2:39 am
Forum: Volume 2 (200-299)
Topic: 292 - Presentation Error
Replies: 8
Views: 18776

292 - Presentation Error

Hi there, can anyone post more I/O set, and is this I/O set right??
INPUT

11
1 2
Just one line?
Just one line?

2 2
The first characters of the alphabet are:
[abcde]
Here they come:
a b c d e
1 1
That's it: [abcde]
That's it: AbCdE
1 1
[2] and [3] make [5]
I guess 2 and 3 are less than 50.
1 1 ...
by algoJo
Tue Mar 27, 2007 6:23 pm
Forum: Volume 4 (400-499)
Topic: 469 - Wetlands of Florida
Replies: 63
Views: 32266

I used this form to take the input

int tcas,R,C;
char temp[128];

scanf("%d\n",&tcas);
while(tcas--)
{
while(1)
{
gets(temp);
if(temp[0]!='W'&&temp[0]!='L') break;
....
....
}
sscanf(temp,"%d %d",&R,&C);
....
while(gets(temp))
{
if(!strlen(temp)) break;
sscanf(temp,"%d %d",&R,&C ...
by algoJo
Tue Mar 27, 2007 3:03 am
Forum: Volume 101 (10100-10199)
Topic: 10101 - Bangla Numbers
Replies: 122
Views: 45302

Try these:
INPUT

000001
00000101
0101
001000
001001
001011
1000
1001
1011
0
1
12


OUTPUT

1. 1
2. 1 shata 1
3. 1 shata 1
4. 1 hajar
5. 1 hajar 1
6. 1 hajar 11
7. 1 hajar
8. 1 hajar 1
9. 1 hajar 11
10. 0
11. 1
12. 12


check your output format and be sure that there is no extra ...
by algoJo
Sat Mar 17, 2007 7:07 pm
Forum: C
Topic: quicksort built in
Replies: 8
Views: 10492

Can anybody show what's wrong with this code:

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

typedef struct{
int a,key;
}tdata;

tdata data[10];

int cmp(const void *va,const void *vb){
tdata *a=(tdata*)va;
tdata *b=(tdata*)vb;
return a->key-b->key;
}

void fill(void){
int i;
for(i ...

Go to advanced search