ENG
RUS
Timus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board
Discussion of Problem
1010
. Discrete Function
diduk
Help! I've got time limit in 5'th test
[1] // Problem
1010. Discrete Function
29 Mar 2007 22:47
Is it a rational decision?
for (i = 1; i < N; i++){
for (j = i+1; j <= N; j++){
tg = fabs((f[j]-f[i]) / (j-i));
if (tg > max){
max = tg;
imax = i;
jmax = j;
}
}
}
printf("%d %d\n", imax, jmax);
Sandro (USU)
No. 100000*100000 is too slow. There is a linear solution. (-)
// Problem
1010. Discrete Function
30 Mar 2007 00:18
© 2000–2025
Timus Online Judge Team
. All rights reserved.