Search found 3 matches

by shady_mokhtar
Sat Sep 13, 2008 4:26 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 37193

Re: 104...I give up

hey
i didn't know how to solve the problem using floyd warshall but when i saw your code i undersanded it but i want to know how to do it O(n^3), do you know how ???
by shady_mokhtar
Sun Sep 07, 2008 1:45 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 37193

Re: 104 Memory Limit Exceeded

i am solving it brute force using binary numbers by a loop till 1<<n (1^20=1048576) so it doesn't take so much time...here is my code check it please
#include<iostream.h>

int main()
{
int flag,s,i,j,t,n,seq[22],finseq[22],maxx,l,f,k;
double mult,table[21][21];
while(cin>>n)
{
for(i=0;i<n;i ...
by shady_mokhtar
Sat Aug 30, 2008 11:56 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 37193

104....time limit

i am solving it brute force using binary numbers by a loop till 1<<n (1^20=1048576) so it doesn't take so much time...here is my code check it please

#include<iostream.h>

int main()
{
int flag,s,i,j,t,n,seq[22],finseq[22],maxx,l,f,k;
double mult,table[21][21];
while(cin>>n)
{
for(i=0;i<n;i ...

Go to advanced search