prince u told u were getting TLE
so i told abt that.
well u r getting WA cos
for input
1 20
Between 1 and 20, 18 generates the longest sequence of 20 values.
20 1
Between 1 and 20, 18 generates the longest sequence of 20 values.
got it?
i hope u will AC now.
take care
Search found 47 matches
- Wed Mar 31, 2004 7:53 pm
- Forum: Volume 3 (300-399)
- Topic: 371 - Ackermann Functions
- Replies: 196
- Views: 51118
- Wed Mar 10, 2004 6:30 pm
- Forum: Algorithms
- Topic: can any body inform me the best prime generating algorithm ?
- Replies: 17
- Views: 7769
thanx joey
thanx joey.
i know about Sieve of Eratosthenes & can do it in bitwise for long range.
but i didn't hear that name Seat of Eratosphean.
anyway if anyone knows better algo than sieve, please tell me about this.
i know about Sieve of Eratosthenes & can do it in bitwise for long range.
but i didn't hear that name Seat of Eratosphean.
anyway if anyone knows better algo than sieve, please tell me about this.
- Wed Mar 10, 2004 6:22 pm
- Forum: Volume 3 (300-399)
- Topic: 371 - Ackermann Functions
- Replies: 196
- Views: 51118
algo of 371
i used same algo in 371 & 100.
different
special case 1. cycle length 3.
data type
for 100 int
for 371 unsigned long.
(cause input range is 32 bit integer)
hope u will get AC now
different
special case 1. cycle length 3.
data type
for 100 int
for 371 unsigned long.
(cause input range is 32 bit integer)
hope u will get AC now
- Wed Mar 10, 2004 6:15 pm
- Forum: Volume 3 (300-399)
- Topic: 371 - Ackermann Functions
- Replies: 196
- Views: 51118
mohiul alam prince
ya i have seen that u are using double.
but stupid buddy i told about m & n.(where u r getting input)
they told input range will 32 bit integer.
so i told u to use unsigned long substitute of long.
like that->>>
scanf("%lu%lu", &m ,&n);
& mr sohel i can use unsigned long, which supports Turbo C ...
but stupid buddy i told about m & n.(where u r getting input)
they told input range will 32 bit integer.
so i told u to use unsigned long substitute of long.
like that->>>
scanf("%lu%lu", &m ,&n);
& mr sohel i can use unsigned long, which supports Turbo C ...
- Tue Mar 09, 2004 7:55 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10490 - Mr. Azad and his Son!!!!!
- Replies: 20
- Views: 14043
the problemsetter is sucks
in this problem u can get AC in short time by handle 6 perfect number as special case && primes less than 32.
)

- Tue Mar 09, 2004 7:54 pm
- Forum: Volume 4 (400-499)
- Topic: 424 - Integer Inquiry
- Replies: 96
- Views: 38497
calvin
just change tmp[100]
hope u will get Ac if u use tmp[1000]
& pls remove ur code from forum
hope u will get Ac if u use tmp[1000]
& pls remove ur code from forum
- Tue Mar 09, 2004 7:43 pm
- Forum: Volume 4 (400-499)
- Topic: 445 - Marvelous Mazes
- Replies: 93
- Views: 21928
- Tue Mar 09, 2004 7:23 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10008 - What's Cryptanalysis?
- Replies: 55
- Views: 27221
sohel
it's simply a nice way that u teach someone.
)
you should realize the person is a new comer & everyone isn't much intelligent like u.
)

you should realize the person is a new comer & everyone isn't much intelligent like u.

- Tue Mar 09, 2004 7:16 pm
- Forum: Algorithms
- Topic: can any body inform me the best prime generating algorithm ?
- Replies: 17
- Views: 7769
?????????
what is Seat of Eratosphean?
please tell me about this:)
please tell me about this:)
- Tue Mar 09, 2004 7:10 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10070 - Leap Year or Not Leap Year and ...
- Replies: 233
- Views: 83830
Ferdous
your output
for
55000
2200
This is bulukulu festival year.
This is bulukulu festival year.
output should be
This is an ordinary year.
This is an ordinary year.
for
55000
2200
This is bulukulu festival year.
This is bulukulu festival year.
output should be
This is an ordinary year.
This is an ordinary year.
- Tue Mar 09, 2004 6:43 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10302 - Summation of Polynomials
- Replies: 29
- Views: 18933
thanks everyone
guys i was in real problem. i was getting WA. i was using data type as long long. but i changed it into long double then got AC.
& in long double the output for 50000 is 1562562500624999900.
& in long double the output for 50000 is 1562562500624999900.
- Tue Mar 09, 2004 6:31 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10302 - Summation of Polynomials
- Replies: 29
- Views: 18933
kurnia
i think u use Turbo C++
that why you got
when i declare variable using double my compiler give the answer
1562562500624999940 which is WA
then when i changed it to long long the answer is
85550656 which is AC
long long doesn't work in TC & long long count as long in TC. if you use Dev you ...
that why you got
when i declare variable using double my compiler give the answer
1562562500624999940 which is WA
then when i changed it to long long the answer is
85550656 which is AC
long long doesn't work in TC & long long count as long in TC. if you use Dev you ...
- Fri Mar 05, 2004 6:45 pm
- Forum: Volume 3 (300-399)
- Topic: 371 - Ackermann Functions
- Replies: 196
- Views: 51118
about 371
long's range 2^31-1
in the problem they told about 32 bit number.
how can u hold the number in long???
u can use unsigned long
or double
in the problem they told about 32 bit number.
how can u hold the number in long???
u can use unsigned long
or double
- Mon Feb 02, 2004 11:55 am
- Forum: Volume 105 (10500-10599)
- Topic: 10515 - Powers Et Al.
- Replies: 124
- Views: 45277
must use string
ya you are right. you have to read m & n as a string. u cann't hold a 10^101 number in double.
just remember
1235483654865224%4=0
24%4=0
so you can only use last digit of string m & last 2 digit of string n.
anyway sorry cause i didn't give any large input in my input set that why it was ...
just remember
1235483654865224%4=0
24%4=0
so you can only use last digit of string m & last 2 digit of string n.
anyway sorry cause i didn't give any large input in my input set that why it was ...
- Sat Jan 17, 2004 12:13 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10038 - Jolly Jumpers
- Replies: 445
- Views: 152629
INPUT && OUTPUT
INPUT
4 1 4 2 3
5 1 4 2 -1 6
10 1 2 3 4 5 6 7 8 9 10
10 1 2 4 7 11 16 22 29 37 46
10 -1 -2 -4 -7 -11 -16 -22 -29 -37 -46
10 -1 -1 -4 -7 -11 -16 -22 -29 -37 -46
1 1
2 1 2
2 2 1
4 0 4 2 3
4 1 3 2 4
1 2
6 1 4 3 7 5 10
OUTPUT
Jolly
Not jolly
Not jolly
Jolly
Jolly
Not jolly
Jolly ...
4 1 4 2 3
5 1 4 2 -1 6
10 1 2 3 4 5 6 7 8 9 10
10 1 2 4 7 11 16 22 29 37 46
10 -1 -2 -4 -7 -11 -16 -22 -29 -37 -46
10 -1 -1 -4 -7 -11 -16 -22 -29 -37 -46
1 1
2 1 2
2 2 1
4 0 4 2 3
4 1 3 2 4
1 2
6 1 4 3 7 5 10
OUTPUT
Jolly
Not jolly
Not jolly
Jolly
Jolly
Not jolly
Jolly ...