Show all threads Hide all threads Show all messages Hide all messages 
If you have WA2  Andrew Sboev  1010. Discrete Function  27 May 2019 21:32  7 
1) Maybe, you are reading long long variable with this command : scanf("%d",&arr[i]); It is not right. You should do, for example, it with next command scanf("%I64d",&arr[i]); 2) Maybe, you were confused by statement. You have to choose such two points so line that passing through this points has maximal absolute value of inclination, not just inclination. 3) Maybe, you are doing something like this : for ( int i = 1 ; i <= n ; ++i ) { long long d = abs2(arr[i+1]  arr[i]); if ( d > x ) { x = d; m1 = i; } } There is a mistake in first line. Right way is for ( int i = 1 ; i < n ; ++i ) { It was my biggest mistake, because the problem itself is so simple. Thannnnnnnnnnnnnnnnnk youuuuuuuuuuuuuu verrrrrrrrrrrrry mucccccccccccccch! Thannnnnnnnnnnnnnnnnk youuuuuuuuuuuuuu verrrrrrrrrrrrry mucccccccccccccch! Thanks a lot! The definition of inclination is ambiguous in the problem statement. Thanks a lot! I have ignored "absolute value" too. Thannnnnnnnnnnnnnnnnk youuuuuuuuuuuuuu verrrrrrrrrrrrry mucccccccccccccch! Thannnnnnnnnnnnnnnnnk youuuuuuuuuuuuuu verrrrrrrrrrrrry mucccccccccccccch! 
what wrong with my code..._  noname  1010. Discrete Function  5 Aug 2017 19:28  2 
[code deleted] Edited by moderator 02.01.2020 18:17 cout<<"enter a number for the lines "<<endl; Surely that is wrong 
long is not enough  AfraidDiablo  1010. Discrete Function  20 Nov 2016 00:09  2 
In C++, you'd better use "long long" instead of "long". 
WA3  Dusayarov Alisher  1010. Discrete Function  9 Oct 2014 16:12  1 
WA3 Dusayarov Alisher 9 Oct 2014 16:12 What is test 3??? Help me!!! Please!!! 
'Each value of the function is longint '..en..it's right i think  100919CN  1010. Discrete Function  27 Dec 2012 20:08  1 
if 'a' and 'b' are both longint,abs(ab) can be __int64. 
.  Evgeniy Yuryev  1010. Discrete Function  21 Jul 2012 01:21  1 
. Evgeniy Yuryev 21 Jul 2012 01:21 AC) Edited by author 21.07.2012 01:25 
help ??? WA #4  lasha peradze Free University  1010. Discrete Function  26 Jan 2012 19:57  1 
#include<iostream> #include<cstdlib> #include<cstdio> #include<cmath> long a[100000]; long b[100000]; long c[100000]; int d[100000]; using namespace std; int main(){ int n; int max; cin>>n; int i; for (i=0; i<n; i++){ cin>>a[i]; d[i]=1; } for (i=0; i<n1; i++){ float r=1+(a[i+1]a[i])*(a[i+1]a[i]); c[i]=sqrt(r);
} for (i=0; i<n2; i++){ if ((a[i]a[i+1])==(a[i+1]a[i+2])){ c[i+1]+=c[i]; d[i+1]=d[i]+1; //cout<<d[i]<<" "; } } max=c[0]; int t=0; for (i=0; i<n1; i++){ if (max<c[i]) { max=c[i]; t=i; } } // cout<<d[0]<<" "<<d[1]<<" "<<d[2]<<" "<<d[3]<<" "; cout<<t+2d[t]<<" "<<t+2; system("pause"); } 
Why WA2? May be, someone had same problem?  Kit  1010. Discrete Function  27 Nov 2011 21:47  8 
Why WA2? May be, someone had same problem? My program here: [code deleted] Edited by author 28.03.2005 22:30 Edited by moderator 02.01.2020 18:24 Yahooo!!! I have surmised! "inclination"  it is absolute value, without sign! But author should mentioned it in the task, in my opinion. Yes,you're right! Thank you very much.! The author should mentioned.It is a big problem.I think. yeah,I think it is important. 
Any idea where the mistake is?  Pawel Wanat  1010. Discrete Function  26 Feb 2011 19:10  5 
This code gets WA on test 2: [code deleted] & this gets AC: [code deleted] :) Edited by moderator 02.01.2020 18:26 Try to use scanf("%I64d", &tab[i]); Oh! It's like in dev :) thx for info. . The operating system may be windows, not linux, but why it return WA instead of CE? Edited by author 27.07.2009 20:46 Cause your solution is wrong. 
long long wa@test2,,,and __int64 got AC,,  acmore  1010. Discrete Function  27 Jun 2010 16:25  2 
I also have this weird problem. Long long variables got WA@2, and if changed to long double everything is AC... 
Test 2#  Element  1010. Discrete Function  6 Mar 2010 13:35  2 
Just change longint into int64. Oh,my god! Don't the author say all values are longint? 
C compiler does not follow C99 Standard  Tony Beta Lambda  1010. Discrete Function  25 Feb 2010 12:24  3 
C99 7.20.6.1: long long int llabs(long long int j); but when I submit my code with use of llabs, I got CE. fmax(double,double) also doesn't work well LLONG_MAX will get CE too. 
Be careful with ABS if you use long long!  Tracy.Ennal.Tasgen  1010. Discrete Function  25 Jul 2009 06:14  3 
If you use long long,ABS does not work,as this got WA on #2 [code deleted] But this got AC! [code deleted] Edited by moderator 02.01.2020 18:27 This solution isn't good at all.May be there will be points a[0] and a[n] that maxn=abs2(a[0]a[n]).Your program don't work this time. 
To those who get WA on testcase2  lonelycorn  1010. Discrete Function  19 Jul 2009 19:23  7 
remeber that "Each value of the function is longint (signed long in C++)",so if value[i]=maxlongint and value[j]=maxlongint then abs(value[i]value[j])>maxlongint so DO use long long or int64.(i got WA just because of it for 10 times) so do i i got wa for nearly ten times Edited by author 19.07.2009 19:24 
who WA 2?? come in！I will help you!  junsuper  1010. Discrete Function  6 Mar 2009 10:00  4 
input 5 1 1 1 1 1 correct answer 1 2 This test I'm right 。But I WA 2 again 
"inclination" = abs(inclination)  Jason911  1010. Discrete Function  30 Nov 2008 03:06  2 
I WAed many times for this........ RPWT.................._ 囧。。。 Thanks a lot, I've sent my solution 8 times before reading this post, and of course they have failed. 
if WA for test 2  rakeshvarna  1010. Discrete Function  23 Nov 2008 00:50  1 
i used long in java and got AC 
don't use longint  panfei  1010. Discrete Function  1 Nov 2008 18:24  1 
1、The value of the function can be a real. Use extended to solve the problem and you will get AC. 2、The progblem says that the line is above the points between the begining and the end of the line,not 'all of the points'. May the force be with you. 
Does "inclination" mean a or tan(a)？  sweetstrawberry  1010. Discrete Function  15 Jun 2008 21:57  1 

Can you explain this question emilbek_4@netmail.kg  Emilbek  1010. Discrete Function  26 May 2008 16:11  1 
