Блог пользователя Safrout

Автор Safrout, 12 лет назад, По-английски

Is the usage of multiple threads in Java allowed in the ICPC or no??

added after edit {

I know it won't differ in time but there is a powerful feature in Java that I want to know if I can use it or no.

The feature is the ability of changing the size of the memory stack for recursion.

I can set it for threads by this constructor

new Thread(null, new Runnable() {
    public void run() {
        new Solution().run();
    }
}, "1", 1 << 23).start();

Here the 1 << 23 is the new size for the memory Stack.

The whole solution will be written in the Solution().run() method.

So I don't need to do multiple threads and avoid time. I only need to make one single thread

}

Is this possible in the ICPC World Finals or not ?

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Serious test engines measure cpu time, but not astronomical time. Your total running time will be sum of cpu times for all threads plus other costs for using threads. So threads will be not as useful as you planned.