시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB222100.000%

문제

Consider the function f(x)=tan(sin(x))-sin(tan(x))+cos(x)5-0.5 defined on the interval [a,b], and nb≥1 a series of subintervals [xi,xi+1], i=1,nb, where x1=a and xnb+1=b. Find the number of subintervals that contain “observable” roots of f(x). A root in a subinterval [xi,xi+1] is “observable” if the existence of that root can be decided without inspecting the behavior of f(x) for xi<x<xi+1, i.e. a subinterval is a black box and you cannot compute inside the interval.

입력

The program input is from a text file. Each data set in the file stands for a particular interval [a,b] of f(x) and specifies the limits a, b (real numbers) and the integer number nb of subintervals.

출력

For each data set the program prints the number of subintervals that contain “observable” roots of f(x). Each result is printed on the standard output from the beginning of a line.

White spaces can occur freely in the input. The input data are correct and terminate with an end of file. An input/output sample for the function f(x)=1-x2 is in the table bellow. 

예제 입력 1

-2 2 2
0 100 5
-1 1 1

예제 출력 1

2
1
1

채점 및 기타 정보

  • 예제는 채점하지 않는다.