ENG  RUSTimus 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 1318. Logarithm

TLE on test case 8
Posted by tryit1 26 Aug 2008 12:36

my algo was store double for table[4]=log10{ 2^96,2^64,2^32,0}
in table.

arr[i][4],arr[j][4]

i from 1 to n
j from i+1 to n
    k from 0 to 4
    {
        a=arr[i][k],barr[j][k]
        if(!a)
           sum+= floor( log10(a) + table[k]),break;
    }

This gets TLE on case 8 can someone tell me better algorithm or test cases.