For windows, the compiler provided with cygwin is most similar than any other i know.
Why do you need to consider long long. Simply use double; i got AC using double.
![:wink:](./images/smilies/icon_wink.gif)
Moderator: Board moderators
Code: Select all
1
2147352578 0
Code: Select all
Case 1:
-32767 -32767
Code: Select all
6
2147352578 0
0 0
1 0
0 -1
1 1
-1 -3
Case 1:
-32767 -32767
Case 2:
0 0
Case 3:
0 -1
Case 4:
Impossible.
Case 5:
Impossible.
Case 6:
Impossible.
My program was correct about you inputs...Dreamer#1 wrote:Are you still getting WA?
Code: Select all
2
0 2
0 3
Code: Select all
Case 1:
1 -1
Case 2:
1 -1
This loop is slow to go through for every input...cytmike wrote:I got TLE no matter i preprocess or calculates it every time.
Can anybody teach me the correct algo?
![]()
[cpp]
for (int h=1;h<=p;h++)
{
cout<<"Case "<<h<<":\n";
double i,s;
cin>>i>>s;
int hp=0,sky=0;
for (int h=floor(sqrt((i+s)/2));h<=32768&&sq[h]<=i+s;h++)
{
[/cpp]