Search found 142 matches

by lnr
Fri Oct 17, 2008 8:10 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 31143

Re: 488 TLE

To vinocit
Problem says:
NOTE: There is a blank line after each separate waveform, excluding the last one.
See the output format.
by lnr
Fri Oct 17, 2008 8:01 pm
Forum: Volume 4 (400-499)
Topic: 401 - Palindromes
Replies: 196
Views: 31617

Re: 401 palindromes WA help

To pushpit.saxena

Try these.
input:

Code: Select all

ISSEJML11JML322I
SV2OSV2
8SZSJYYL2528
output:

Code: Select all

ISSEJML11JML322I -- is a mirrored string.

SV2OSV2 -- is a mirrored string.

8SZSJYYL2528 -- is a mirrored string.
by lnr
Fri Oct 17, 2008 7:48 pm
Forum: Volume 4 (400-499)
Topic: 401 - Palindromes
Replies: 196
Views: 31617

Re: 401- Palindromes WA. I'm going crazy

To Obaida
Problem says:
In addition, after each output line, you must print an empty line.
May be you are not printing an extra blank line.
See the output format of this problem.
There are other threads for this problem.
See those also to be sure about the output format.
by lnr
Fri Oct 17, 2008 7:39 pm
Forum: Volume 4 (400-499)
Topic: 401 - Palindromes
Replies: 196
Views: 31617

Re: 401 palindromes WA help

To samin.
Problem says:
In addition, after each output line, you must print an empty line.
May be you are not printing the blank line.
See the output format in this post above and in the problem.
Compare the format with yours.
by lnr
Fri Oct 10, 2008 12:13 pm
Forum: Volume 113 (11300-11399)
Topic: 11367 - Full Tank?
Replies: 13
Views: 8083

Re: 11367 - Full tank?

Would someone give hint ?
by lnr
Thu Oct 09, 2008 1:15 pm
Forum: Volume 4 (400-499)
Topic: 489 - Hangman Judge
Replies: 52
Views: 14518

Re: confuse 489 with online judge

Hi linux.

Input:

Code: Select all

1
cheese
ch
-1
Output:

Code: Select all

Round 1
You chickened out.
by lnr
Thu Oct 09, 2008 1:05 pm
Forum: C++
Topic: Problems with random numbers
Replies: 4
Views: 2640

Re: Problems with random numbers

Without "cstdlib" rand()/static_cast<double>(RAND_MAX) works. In spite of using "cstdlib" Microsoft Visual C++ 2008 does not support drand48(). #include<iostream> #include<cstdlib> using namespace std; int main() { //cout<<rand()/static_cast<double>(RAND_MAX)<<endl; cout<<drand48()<<endl; return 0; }
by lnr
Thu Oct 09, 2008 4:17 am
Forum: C++
Topic: Problems with random numbers
Replies: 4
Views: 2640

Re: Problems with random numbers

Thanks mf.
But drand48() gets compile time error.
by lnr
Wed Oct 08, 2008 8:40 pm
Forum: C++
Topic: Problems with random numbers
Replies: 4
Views: 2640

Problems with random numbers

Can someone please tell me how to generate random numbers between 0 to 1?
by lnr
Wed Oct 08, 2008 7:17 am
Forum: Volume 113 (11300-11399)
Topic: 11398 - The Base-1 Number System
Replies: 23
Views: 9676

Re: 11398 - The Base-1 Number System

To x140l31 Submit your code again. I did not know that GNU C++ compiler supports and operator. while (cin >> block and block != "~") is similar to while (cin >> block && block != "~") Returning a value from int main() is a good practice. You will get accepted. May be you submitted wrong code before....
by lnr
Wed Oct 08, 2008 6:43 am
Forum: Volume 100 (10000-10099)
Topic: 10098 - Generating Fast
Replies: 62
Views: 14001

Re: Efficient Java IO..Please Help

To GUC.HassanMohamed

Taking input seems alright to me.
May be taking input in java is slower than C or C++.
by lnr
Wed Oct 08, 2008 6:35 am
Forum: Volume 113 (11300-11399)
Topic: 11398 - The Base-1 Number System
Replies: 23
Views: 9676

Re: 11398 - The Base-1 Number System

I am very sorry.

Input:

Code: Select all

000 00 0 00 000 #
~
Output:

Code: Select all

0
I updated the output.
by lnr
Wed Oct 08, 2008 5:45 am
Forum: C
Topic: Bsearch---built in
Replies: 4
Views: 4647

Re: Bsearch---built in

I am very sorry.
Yes you are absolutely right.
by lnr
Tue Oct 07, 2008 5:32 pm
Forum: C
Topic: Bsearch---built in
Replies: 4
Views: 4647

Re: Bsearch---built in

To nikhil

Code: Select all

binary_search() from STL.
by lnr
Tue Oct 07, 2008 5:17 pm
Forum: C
Topic: Needing a little help - Problem with Files
Replies: 2
Views: 4087

Re: Needing a little help - Problem with Files

To leoisl EOF is always at the last. If the (m.txt )file content is like this 4 6 7 567 3 3 5 7 7 8 3 5 Running this code: #include <iostream> #include <string> using namespace std; int main() { freopen("m.txt","r",stdin); char ch; int i,c; c=0; while(cin>>i) { ++c; cout<<i<<' '; if(c%20==0) cout<<e...

Go to advanced search