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 ?
http://icpc.baylor.edu/regionals/rules check these ;)
I can't find something about it there.
But I have doubts about it with some people.
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.
I know it's not useful in time.
But in Java it gives me other powerful tools by just making one thread.
I don't care about the time I only care about the allowability of using it.
Can you, please, explain for me and other readers, what features is it?
The feature is changing the size of the memory stack for recursion.
You can use this in java in your main method
the
1 << 23
is the new size of 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.
But I didn't get it.
Is it allowed in the ICPC finals or not ?
I don't know about ICPC final, but as I remember we used it in semifinals and quarterfinals (NEERC).