Search found 6 matches

by gmo
6 years ago
Forum: Bugs
Topic: Java and real numbers
Replies: 3
Views: 3418
Gender: None specified

Re: Java and real numbers

Problem 1023 Financial Management http://coj.uci.cu/24h/problem.xhtml?abb=1023 is giving runtime error.
Tried with an already AC code, its exactly the same code just a copy paste and got Runtime Error...

there are other problems like this one, all of them involving real numbers.
by gmo
6 years ago
Forum: Bugs
Topic: Java and real numbers
Replies: 3
Views: 3418
Gender: None specified

Java and real numbers

Scanners throws Runtime error when reading real numbers either with nextFloat, or nextDouble. also System.out.printf and DecimalFormat get wrong answer when printing a real number up to the n'th decimal place. previously accepted problems get runtime error for this reason even when the code is EXACT...
by gmo
6 years ago
Forum: Suggestions
Topic: Virtual contests improvements(free problems side)
Replies: 2
Views: 2219
Gender: None specified

Virtual contests improvements(free problems side)

hi, i just recently tried the free problems template of the virtual contests and it worked like a charm, however there's something that would make them better: 1.if the creator deletes the contest before it starts delete it from the other contestants list. Reason: making mistakes on the setup is hel...
by gmo
6 years ago
Forum: Archive (done)
Topic: Custom problemset in virtual contests
Replies: 1
Views: 1682
Gender: None specified

Custom problemset in virtual contests

it would be great that when creating a virtual contest you, besides being able to select a real contest, could create your own contest with problems of the 24h archive. selecting certain topic/dificulty/etc related problems from the archive and making your own problemset to practice/train under the ...
by gmo
7 years ago
Forum: Java
Topic: Arrays
Replies: 1
Views: 2494
Gender: None specified

Re: Arrays

try this:
Object[] array = (Object[]) arrayList.toArray(new Object[0]);

i.e for int's
Integer[] a = (Integer[]) arrayList.toArray(new Integer[0]);

you have to use class name instead of data type. works for custom classes too. :D
by gmo
7 years ago
Forum: Java
Topic: Sorting
Replies: 1
Views: 2260
Gender: None specified

Re: Sorting

I don't know if you already know it, but Collections.sort() does the trick you can even use your own Comparator class to make the sort.

Go to advanced search