Search found 4 matches

by venusaur
Thu Apr 24, 2003 11:11 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 54579

My answer of #102 received [WA]

[java]import java.io.*; import java.util.*; class Main { public static String readln(int len) { byte lin[]=new byte[len]; int lg=0, car=-1; try { while(lg<len) { car=System.in.read(); // if(lg==0&&(car=='\r')||(car=='\n')) continue; // if((car<0)||(car=='\r')||(car=='\n')) break; if((car<0)||(car=='...
by venusaur
Thu Apr 24, 2003 1:18 am
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 163
Views: 17889

If you cast from double to int (or long) such a big integer, only first 13-14 digits will be right. In this situlation, you should emulate big integer operation; separate big integer and story at array of integer (for example, store 8 digits per one space of array). Then, you should implement arithm...
by venusaur
Wed Apr 23, 2003 6:05 pm
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 163
Views: 17889

double is right, but real number can't be used in Problem #113 . Problem #113 should be solved ONLY with integer. There is a class that supports such a big integer: java.math.BigInteger; but there is a problem: This class isn't supproted yet in the judge compiler; (I think) judge compliler supports ...
by venusaur
Wed Apr 23, 2003 3:50 pm
Forum: Java
Topic: Very annoying difference between Windows and Linux
Replies: 2
Views: 1961

Very annoying difference between Windows and Linux

In windows, "\r\n" means new line while "\n" in Linux Because of that, At first time I got some of [WA] signal when I posted my JAVA program. In Windows, I have to change readln() just like this [java]while(lg<len) { car=System.in.read(); if(lg==0&&(car=='\r')||(car=='\n')) continue; if((car<0)||(ca...

Go to advanced search