## Search found 120 matches

Fri Aug 08, 2003 8:23 pm
Forum: Volume 3 (300-399)
Topic: 333 - Recognizing Good ISBNs
Replies: 166
Views: 21798
X is a valid character only if count=9, and your second mistake is if there are invalid ISBN you must print like this : printf(" is incorrect.\n"); try this : input : XX-0000000000-XX XX000000XXX0000XXXXX 1234567890 output : XX-0000000000-XX is correct. XX000000XXX0000XXXXX is correct. 1234567890 is...
Sun Jun 29, 2003 8:39 am
Forum: Volume 100 (10000-10099)
Topic: 10008 - What's Cryptanalysis?
Replies: 55
Views: 17466
hello r.z.

I think you must use scanf("\n"); instead of fflush(stdin); because maybe fflush(stdin) doesn't work in judge compiler. I'm not sure too about this, but I always do that.

GOOD LUCK...
Sat Jun 28, 2003 7:14 pm
Forum: Other words
Topic: problem E: SAMS' contest
Replies: 3
Views: 984
I use that to solve this problem.

for that contest I think judge fix their IO, so more contestant get AC in this problem. so you can check again your statistic in contest, maybe you got AC for this problem.
Wed Jun 25, 2003 6:30 am
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 23058
to hectorzeta and ozton...

your algorithm very slow for this problem. you cannot use O(n^6) or O(n^7) if n = 100 you will get TLE. you must optimize your algo in O(n^3) or O(n^4).

try to find them.
Fri Jun 20, 2003 1:53 pm
Forum: Volume 100 (10000-10099)
Topic: 10041 - Vito's Family
Replies: 90
Views: 29902
I'm not realy understand about your algo, but you can check with this IO :

Code: Select all

``````4
3
1 1 8
4
3 1 5 7
10
30 25 15 1 1 1 23 23 90 10
5
1 1 1 1 100``````
output :

Code: Select all

``````7
8
163
99``````
I think there is not tricky IO for this problem.
Wed Jun 18, 2003 3:06 pm
Forum: Volume 100 (10000-10099)
Topic: 10041 - Vito's Family
Replies: 90
Views: 29902
he..he..he..

r.z. I think you misunderstand again. for this problem you must print the minimum total distance.

ex :
input :

Code: Select all

``````1
7
5 1 7 1 9 1 10``````
output shouled be :

Code: Select all

``23``
Tue Jun 17, 2003 9:09 am
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 7194
I solve this problem with brute force. but I do something for optimize my brute force. I search begin at 1, after this if I got a answer, I multiply that with 4 to start search next answer again. with this way I got AC, without precalc. I got that from my observation, with my first code when that co...
Sat Jun 14, 2003 7:43 pm
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 162
Views: 16240
double can handle input more than that, 10^(+/-300)
Sat Jun 14, 2003 3:42 pm
Forum: Volume 103 (10300-10399)
Topic: 10340 - All in All
Replies: 129
Views: 31987
input:

Code: Select all

``````maaf matif
maaf mataf``````
output:

Code: Select all

``````No
Yes``````
good luck.
Fri Jun 13, 2003 7:11 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 184365
hello fibonacci.... your mistake are : 1. if i < j, you must swap them, but for output you must print like your input. if (i > j) { t = i; i = j; j = t; } ti = i; tj=j; you must put ti = i; tj = j; before swap. 2. if (total > max) max = ++total; total = 0; } if like this, when total = max, you canno...
Tue Jun 10, 2003 6:20 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 184365
hello R.Z..... first I saw your code you have a problem in I/O, range, and a little trick input : void main() { long int n1,n2,i,sum=0; scanf("%li %li",&n1,&n2); for(i=n1+1;i<n2;i++) { if(sum<jumlah(i)) sum=jumlah(i); } printf("%li %li %li",n1,n2,sum); } use this for input while(scanf("%li %li",&n1,...
Fri Jun 06, 2003 8:29 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 14087
1 2 3 1 is a true output too.

yellow mark mean there are more than 1 true output.
Sun Jun 01, 2003 6:29 am
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 20084
1. sort descending for each box dimension. 2. sort descending for each box. 3. use LDS to solve this problem. for point 1 adn 2 I mean like this: input: 1 5 2 6 3 7 4 2 6 1 7 4 8 4 2 8 4 6 point 1: 7 6 5 3 2 1 7 6 4 4 2 1 8 8 6 4 4 2 point 2: 8 8 6 4 4 2 7 6 5 3 2 1 7 6 4 4 2 1 after that you use LD...
Sat May 31, 2003 5:26 pm
Forum: Volume 4 (400-499)
Topic: 454 - Anagrams
Replies: 97
Views: 21454
hello deddy...

For input I use input[200][100], and for other array I use [100]
Fri May 30, 2003 3:04 pm
Forum: Volume 4 (400-499)
Topic: 454 - Anagrams
Replies: 97
Views: 21454
I send my .exe to you.

But my program cannot handle input like this. And I still got AC, I try to submit again my code to judge, tomorrow, and give me AC too.