Search found 2 matches

by Greus
Thu Aug 12, 2010 12:07 am
Forum: Volume 114 (11400-11499)
Topic: 11417 - GCD
Replies: 11
Views: 7660

Re: 11417 - GCD

your solution is wrong because of this part of the code:

Code: Select all

if(N==1)
      {
      
         G=1;
      }
you should change it for this one:

Code: Select all

if(N==1)
      {
      
         G=0;
      }
and maybe your solution get TLE because of the recursive function gcd, good luck
by Greus
Sun Sep 16, 2007 2:07 am
Forum: Volume 103 (10300-10399)
Topic: 10330 - Power Transmission
Replies: 43
Views: 20804

Re: 10330 Power Transmission

could some one help me!!! why my code receive wrong answer??? This is my code #include <stdio.h> #include <list> #include <algorithm> #define MAXNODES 105 #define NULO -1 #define INFINITO 300000 using namespace std; typedef struct{ int flujo; int capacidad; }FLUJO; FLUJO grafo[MAXNODES][MAXNODES]; i...

Go to advanced search