Search found 136 matches

by jan_holmes
Wed Jun 06, 2007 8:46 pm
Forum: Volume 112 (11200-11299)
Topic: 11207 - The easiest way
Replies: 27
Views: 13358

Try this case..

Code:
2
1 10000
10 10
0


My output is

Code:
2
I'm confuse about this test case. Can anyone explain it to me ? Thx...
by jan_holmes
Fri Apr 20, 2007 10:01 pm
Forum: C
Topic: About EOF
Replies: 3
Views: 5609

string s; while (cin >> s) { //statement } or if you want to have a blank space(s), u can use : char s[255]; while (cin.getline(s,255)) { //statement } EDIT : oops... I didn't pay attention that both codes I wrote above are for C++ :oops: Anyway u can use this for C : char s[255]; while (gets(s)) {...
by jan_holmes
Fri Apr 20, 2007 9:51 pm
Forum: C++
Topic: freopen--stdin??
Replies: 7
Views: 4627

I don't think there is a way to get the stdin/stdout back once u have used "freopen()". Correct me if I'm Wrong :o
by jan_holmes
Fri Mar 02, 2007 5:24 pm
Forum: Volume 9 (900-999)
Topic: 993 - Product of digits
Replies: 19
Views: 12277

Hi, I just solved this problem... but I was shocked knowing that my code got AC with 0.002 secs... because the way I used is just a raw recursion (without memoization) and I think for 10^9, my code needed more time to produce the correct output. What do you think ? Is it possible that the limit for ...
by jan_holmes
Sun Feb 18, 2007 6:25 pm
Forum: Volume 111 (11100-11199)
Topic: 11166 - Power Signs
Replies: 14
Views: 6902

There is a greedy approach also
Can you explain a bit about greedy method you used to solve the problem ?
by jan_holmes
Sat Feb 17, 2007 9:06 pm
Forum: Volume 111 (11100-11199)
Topic: 11166 - Power Signs
Replies: 14
Views: 6902

Thx for your quick reply. I'll try to think about it.
by jan_holmes
Sat Feb 17, 2007 8:54 pm
Forum: Volume 111 (11100-11199)
Topic: 11166 - Power Signs
Replies: 14
Views: 6902

11166 - Power Signs

Is this problem related to BigInteger (because the input can be as large as 2^5000) ?
by jan_holmes
Mon Feb 05, 2007 4:26 pm
Forum: Algorithms
Topic: need IDA* explanation
Replies: 1
Views: 1485

need IDA* explanation

Hi, Can anyone give me a brief explanation about IDA* (Iterative Deepening A*) algorithm ?
by jan_holmes
Mon Feb 05, 2007 1:25 pm
Forum: Volume 5 (500-599)
Topic: 524 - Prime Ring Problem
Replies: 74
Views: 19090

I don't know if it is the problem, but "extern int count" might lead to CE...
by jan_holmes
Sun Jan 21, 2007 5:07 pm
Forum: Volume 111 (11100-11199)
Topic: 11158 - Elegant Permuted Sum
Replies: 23
Views: 14990

I don't think DP is really needed to solve this problem...(at least, I didn't use it to solve this problem). Just think about the simple one (Hint : sort the numbers with smart brute force would be enough).
by jan_holmes
Sun Jan 21, 2007 5:14 am
Forum: Volume 111 (11100-11199)
Topic: 11158 - Elegant Permuted Sum
Replies: 23
Views: 14990

ACed.... Thx for the testcases... :)
by jan_holmes
Sat Jan 20, 2007 10:25 pm
Forum: Volume 111 (11100-11199)
Topic: 11158 - Elegant Permuted Sum
Replies: 23
Views: 14990

11158 - Elegant Permuted Sum

Anyone can give some tricky testcases ?
by jan_holmes
Tue Jan 16, 2007 4:52 pm
Forum: C++
Topic: Problem with long long data type
Replies: 1
Views: 1761

Problem with long long data type

Hi, I have a simple code like this : //libraries and templates int main () { long long t1 = 1; for (int i=0;i<10;i++) t1*=20; cout << t1 << "\n"; printf("%lld\n",t1); return 0; } the output is : 10240000000000 797966336 Why ? (shouldn't it be 10240000000000 and 10240000000000 ?). Thanks... Btw, I'm ...
by jan_holmes
Sat Jan 06, 2007 1:49 pm
Forum: Java
Topic: Comparator and Comparable interface
Replies: 0
Views: 2403

Comparator and Comparable interface

I wonder what are the differences between Comparator and Comparable interfaces ?? (of course besides the implementation :P) And what are the advantages and disadvantages of each interface ? Thx...
by jan_holmes
Mon Jan 01, 2007 10:49 pm
Forum: Volume 100 (10000-10099)
Topic: 10090 - Marbles
Replies: 43
Views: 22280

Could anyone of you tell me the output of this :

Code: Select all


1000
21 2
21 3
0

Thx... :)[/code]

Go to advanced search