Search found 55 matches

by alu_mathics
Thu Apr 29, 2004 9:57 am
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 17204

why WA 10419.I have tested all the data of the board.my program works fine for all.But don't know why wa.
by alu_mathics
Sat Apr 03, 2004 6:26 am
Forum: Volume 6 (600-699)
Topic: 602 - What Day Is It?
Replies: 56
Views: 22405

My ac program gives the following outputs for your inputs. input: 2 28 0 2 29 0 1 1 1 9 10 2500 5 5 999 7 3 8888 2 27 1000 2 28 1000 2 29 1000 2 30 1000 3 1 1000 2 27 1400 2 28 1400 2 29 1400 2 30 1400 3 1 1400 2 27 1800 2 28 1800 2 29 1800 2 30 1800 3 1 1800 2 27 2000 2 28 2000 2 29 2000 2 30 2000 ...
by alu_mathics
Thu Apr 01, 2004 7:32 pm
Forum: Volume 103 (10300-10399)
Topic: 10392 - Factoring Large Numbers
Replies: 14
Views: 7826

Use the method of sqrt to factorize the given number(The bangla method :D ).It's really easy.Try to make this code efficient by some small changes.It's really easy and simple.
by alu_mathics
Sat Mar 13, 2004 3:08 pm
Forum: Volume 102 (10200-10299)
Topic: 10222 - Decode the Mad man
Replies: 30
Views: 9433

i made the followung changes.Its ok now.If u got ac inform me. #include <iostream.h> #include <stdio.h> int map_row1[12] = {113,119,101,114,116,121,117,105,111,112,91,93}; int map_row2[11] = {97,115,100,102,103,104,106,107,108,59,39}; int map_row3[9] = {122,120,99,118,98,110,109,44,46}; void convert...
by alu_mathics
Fri Mar 12, 2004 2:32 pm
Forum: Volume 100 (10000-10099)
Topic: 10034 - Freckles
Replies: 101
Views: 33033

try this.

scanf("%d",&test);

while(test--)
{
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf(...);//inputs
}

//your algo

printf("%.2lf\n",salida);
if(test)printf("\n");
}
by alu_mathics
Wed Mar 10, 2004 8:35 pm
Forum: Volume 4 (400-499)
Topic: 489 - Hangman Judge
Replies: 52
Views: 14909

Round 1
You lose.
Round 1
You lose.
Round 1
You lose.
by alu_mathics
Wed Mar 10, 2004 8:33 pm
Forum: Volume 4 (400-499)
Topic: 489 - Hangman Judge
Replies: 52
Views: 14909

Round 1
You lose.
Round 1
You lose.
Round 1
You lose.
by alu_mathics
Wed Mar 10, 2004 8:03 pm
Forum: Volume 104 (10400-10499)
Topic: 10474 - Where is the Marble?
Replies: 50
Views: 19800

input: 10 5 1 1 3 5 7 1 3 9 120 1 1 3 120 7 1234 10 12 1111 1111 1111 5 5 5 10 11 12 10 1111 5 10 11 12 1111 134 567 246 24 12 435 output: CASE# 1: 1 found at 1 3 found at 5 120 found at 10 7 found at 8 1234 not found CASE# 2: 1111 found at 8 5 found at 1 10 found at 4 11 found at 6 12 found at 7 11...
by alu_mathics
Wed Mar 10, 2004 7:46 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 29427

Three mistakes in a single program. Mind it this is like 100 but not 100. 1. max = cycle(m); x=m; for(i=m+1;i<=n;i++) { temp = cycle(i); if (temp > max){ max = temp; x=m; //No excuse. } } 2. The largest value in the sequence will not be larger than can be accomodated in a 32-bit Pascal . so u can us...
by alu_mathics
Wed Mar 10, 2004 1:14 pm
Forum: Volume 100 (10000-10099)
Topic: 10006 - Carmichael Numbers
Replies: 66
Views: 21060

The code i used for 10006 gives me TLE.
So i precalculate it .
I wanna know is there a better logic to avoid TLE.
by alu_mathics
Wed Mar 10, 2004 1:02 pm
Forum: Volume 101 (10100-10199)
Topic: 10192 - Vacation
Replies: 58
Views: 14866

input:
aaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa
WanBa said
"
father: abca
mother: abda
#
output:
Case #1: you can visit at most 8 cities.
Case #2: you can visit at most 0 cities.
Case #3: you can visit at most 9 cities.
by alu_mathics
Wed Mar 10, 2004 10:13 am
Forum: Volume 100 (10000-10099)
Topic: 10034 - Freckles
Replies: 101
Views: 33033

You can replace float by double.(infact all)
You wrote:
void muestraResultado(){
float salida=0;
int i;

for (i=1;i<=edgesOfTree[0].vertex1;i++){
salida+=sqrt(edges.weight);
}
printf("%.2lf\n",salida);
}
by alu_mathics
Wed Mar 10, 2004 10:05 am
Forum: Volume 104 (10400-10499)
Topic: 10474 - Where is the Marble?
Replies: 50
Views: 19800

I also got TLE using searching.Then i use memorization and got AC. Count the occurence of each number using array(size of 10000 and initially all 0).Then try to figure out your desire answer from this array. And remember its a problem of TOMAL bhai.So what looks easy actually it is not.He really mak...
by alu_mathics
Wed Mar 10, 2004 12:31 am
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 32010

try the followings: 100000 is not prime. 999999 is not prime. 99999 is not prime. 123 is not prime. 321 is not prime. 1 is not prime. 2 is prime. 3 is prime. 4 is not prime. 7 is prime. 5 is prime. 13 is emirp. 111 is not prime. 1111 is not prime. 22222 is not prime. 5555 is not prime. 867 is not pr...
by alu_mathics
Tue Mar 09, 2004 3:04 pm
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 41229

try this:

3

3
4 5
1 1
2 3

3
4 5
7 5
3 3

1
9 8

output:
925

1026

17

Go to advanced search