ACM (UVa): 10107


Data type:
Double

Algorithm:
Incoming inputs will be inserted as sorted. To do so, I used Insertion Sort, best suited in this case.
For every input, the program has to produce an output. U can use floor () function in C/C++ to print the integer part. Input will be terminated by EOF

Critical Input:
2147483647
2147483647
0
963
852
741
123
159

Critical Output:
2147483647
2147483647
2147483647
1073742305
963
907
852
796

Advertisements

One thought on “ACM (UVa): 10107

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s