<s> '''<STR_LIT>''' <EOL> from time import clock <EOL> from math import sin , cos , sqrt <EOL> from runtime import * <EOL> def main ( ) : <EOL> times = test ( <NUM_LIT:3> ) <EOL> avg = sum ( times ) / len ( times ) <EOL> print ( avg ) <EOL> class Point : <EOL> def __init__ ( self , i ) : <EOL> self . x = sin ( i ) <EOL> self . y = cos ( i ) * <NUM_LIT:3> <EOL> self . z = ( self . x * self . x ) / <NUM_LIT:2> <EOL> def __repr__ ( self ) : <EOL> return "<STR_LIT>" % ( self . x , self . y , self . z ) <EOL> def normalize ( self ) : <EOL> norm = sqrt ( self . x * self . x + self . y * self . y + self . z * self . z ) <EOL> self . x /= norm <EOL> self . y /= norm <EOL> self . z /= norm <EOL> def maximize ( self , other ) : <EOL> if self . x < other . x : self . x = other . x <EOL> if self . y < other . y : self . y = other . y <EOL> if self . z < other . z : self . z = other . z <EOL> return self <EOL> def maximize ( points ) : <EOL> next = points [ <NUM_LIT:0> ] <EOL> for p in points [ <NUM_LIT:1> : ] : <EOL> next = next . maximize ( p ) <EOL> return next <EOL> def benchmark ( n ) : <EOL> points = [ None ] * n <EOL> for i in range ( n ) : <EOL> points [ i ] = Point ( i ) <EOL> for p in points : <EOL> p . normalize ( ) <EOL> return maximize ( points ) <EOL> POINTS = <NUM_LIT> <EOL> def test ( arg ) : <EOL> times = [ ] <EOL> for i in range ( arg ) : <EOL> t0 = clock ( ) <EOL> o = benchmark ( POINTS ) <EOL> tk = clock ( ) <EOL> times . append ( tk - t0 ) <EOL> return times <EOL> main ( ) </s>
