Search found 16 matches

by jtmh
Sat Sep 09, 2006 9:29 pm
Forum: Bugs and suggestions
Topic: stats not updating II
Replies: 2
Views: 2296

I noticed it, too. The ID of my submission is 4920338.
by jtmh
Sun Aug 27, 2006 9:27 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318271

That post seems no longer true because I got AC with unsigned long longs in C as well. That is, during the judgment, there are now
by jtmh
Fri Aug 25, 2006 12:08 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318271

[situation]
It could run well in Dev C++, but could't pass the demo of acm.
I already tried my best to find the bug but in vain.
Thanks for helping!


#include <iostream>

using namespace std;

int main(){
int i=0;
int j=0;


while(cin>>i>>j){
int count;
int val=0;
if(i>j){
int tmp;
tmp ...
by jtmh
Wed Aug 23, 2006 9:29 am
Forum: Off topic (General chit-chat)
Topic: I win !!
Replies: 361
Views: 155668

Me too :)
by jtmh
Sun Aug 20, 2006 8:40 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318271

Java support is mentioned here. It will be greatly improved in the coming new Judge.
by jtmh
Sat Aug 05, 2006 5:30 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318271

Instead of computing all the cycle lengths in advance, compute one only when necessary.
by jtmh
Mon Jul 31, 2006 8:47 am
Forum: Algorithms
Topic: how can i submit solutions
Replies: 2
Views: 1838

Re: how can i submit solutions

kamalkishore wrote:i dont know how can i get ID with suffix,
It is mentioned in the registration confirmation e-mail. You should have used it for account validation. Don't you remember it?
 
by jtmh
Fri Jul 28, 2006 8:35 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318271

I agree. :)
by jtmh
Thu Jul 27, 2006 10:51 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318271

diego andres de barros wrote:instead of while (scanf("%ld %ld",&i,&j)!=EOF)

the correct is while (scanf("%ld %ld",&i,&j)==2)
Both work, actually.
by jtmh
Tue Jul 25, 2006 8:32 pm
Forum: Volume 1 (100-199)
Topic: 121 - Pipe Fitters
Replies: 36
Views: 6643

Or use:

Code: Select all

while (cin >> a >> b)
{
	// process
}
by jtmh
Sat Jul 22, 2006 11:42 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318271

I see. I misunderstood its meaning. :oops: Thanks a lot.
by jtmh
Sat Jul 22, 2006 2:25 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318271

100 - Wrong assumption in the problem statement

The input description says:
You can assume that no opperation overflows a 32-bit integer.
But, actually, there is a total of 883 occurrences where a "3n + 1" operation overflows a 32-bit unsigned integer; in particular, a maximum value of 56,991,483,520 will be reached if the original n is 704,511 ...
by jtmh
Thu Jul 20, 2006 1:54 am
Forum: Other words
Topic: Registration (for the Online-Judge) problem
Replies: 2
Views: 2945

I had tried to find it, but it wasn't there. I will register again. Thank you very much.

Best regards,
Jin-tong
by jtmh
Tue Jul 18, 2006 10:43 am
Forum: C++
Topic: flush
Replies: 8
Views: 4501

Maybe, with files, it's easier to understand:
#include <iostream>
#include <fstream>

using namespace std;

int main()
{
ofstream outfile("__test__.txt");

outfile << "You will not see this string till outfile.flush() is run.";
cin.get(); // open __test__.txt to check if it contains the string ...
by jtmh
Sun Jul 16, 2006 11:24 am
Forum: C
Topic: data type... (long int, long long int)
Replies: 8
Views: 9370

If you compile on Windows, using "%I64d" instead of "%lld" may work.

Go to advanced search