×

# TSORT: getting abnormal behaviour in ideone

 0 when i run the following code on ideone it gave me time exceeded error and on codechef it runs fine!! Since both codechef and ideone use s same sphere online judge i don't understand the difference in such a behaviour #include int arr[1000001]; void init() { for(int i=0; i<1000001; i++) arr[i] = 0; } // testing new implementation int main() { int t, no_char, j, num = 0; char buffer[10000]; scanf("%d\n", &t); while(t) { no_char = fread(buffer, sizeof(char), 10000, stdin); for(j=0; j

 0 Hello @vijay40, Actually, IDEone has some restrictions that can be a bit "tighter" than one can expect, i.e., what runs fine here might give some troubles on IDEone.. I recommend you read the IDEone FAQ, in order to have an idea of what is, or is not allowed: Ideone FAQ I hope this can help you, Bruno answered 21 Feb '13, 21:02 3★kuruma 17.7k●72●143●209 accept rate: 8%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×1,912
×554
×46
×38

question asked: 21 Feb '13, 10:05

question was seen: 1,663 times

last updated: 21 Feb '13, 21:02