Search found 161 matches

by ayon
Mon Aug 21, 2006 1:48 pm
Forum: Volume 108 (10800-10899)
Topic: 10806 - Dijkstra, Dijkstra.
Replies: 24
Views: 17904

can anyone verify whether my algorithm is correct? i am getting wa, i checked all inputs posted in this board. - assign capacity 1 to each edges of the graph and simply run maxflow - if maxflow < 2 then Back to jail - remove edges where no flow occured(i.e where still have residual capacity) - run d...
by ayon
Sun Aug 13, 2006 7:36 am
Forum: Volume 110 (11000-11099)
Topic: 11072 - Points
Replies: 24
Views: 13855

the first set may have 100000 points, but is that also for second set? if the second set also have so many points, it should be tle using the convex hull algorithm above
by ayon
Thu Jul 20, 2006 9:54 am
Forum: Algorithms
Topic: 3-LCS problem
Replies: 6
Views: 2608

there must exist a recurrence relation for 3 LCS

Code: Select all

LCS(x, y, z) = 0, if x=0 or y=0 or z=0
               LCS(x-1, y-1, z-1) + 1, if S1[x]=S2[y]=S3[z]
               max(LCS(x-1,y,z),LCS(x,y-1,z),LCS(x,y,z-1)), otherwise;
these recurrence relation may or may not be correct
by ayon
Thu Jul 20, 2006 7:27 am
Forum: Volume 110 (11000-11099)
Topic: 11015 - 05-2 Rendezvous
Replies: 48
Views: 17007

the line
memset(mat,INF,MAX+1);
wont fill all elements of mat with 999999, it will fill a garbage value.
and better if you dont post your full ID with suffix
by ayon
Tue Jul 18, 2006 6:50 pm
Forum: Volume 4 (400-499)
Topic: 454 - Anagrams
Replies: 97
Views: 21492

because the last test case ends with EOF, not newline
by ayon
Tue Jul 18, 2006 12:16 pm
Forum: Algorithms
Topic: Graph problem
Replies: 12
Views: 3687

as there exists only 64 nodes, floyd-warshall can be applied very easily
by ayon
Mon Jul 17, 2006 7:43 pm
Forum: Algorithms
Topic: Graph problem
Replies: 12
Views: 3687

this problem is exactly like 439 - knight moves, right?
by ayon
Sun Jul 16, 2006 9:09 am
Forum: C
Topic: data type... (long int, long long int)
Replies: 8
Views: 7396

your compiler doesn't support long long data type correctly, but the judge's compiler does
by ayon
Wed Jul 12, 2006 7:40 pm
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 54081

buluculu or bulukulu ???
by ayon
Wed Jul 12, 2006 7:31 pm
Forum: Volume 4 (400-499)
Topic: 454 - Anagrams
Replies: 97
Views: 21492

tui amar ager post gulo porish ni?
use

Code: Select all

       while(1) 
      { 
         if(gets(s) == NULL)
              break;
         if(strcmp(s,"")==0) 
         { 
            break; 
         } 
         strcpy(a[i],s); 
         i++; 
      }
by ayon
Sat Jul 08, 2006 12:26 pm
Forum: Volume 110 (11000-11099)
Topic: 11040 - Add bricks in the wall
Replies: 9
Views: 2584

did you submit this for judging with C ? you declared some variables below scanf(), C will give you CE, but C++ wont
by ayon
Thu Jul 06, 2006 2:05 pm
Forum: Volume 105 (10500-10599)
Topic: 10591 - Happy Number
Replies: 61
Views: 20982

itoa() function is not allowed in unix, you have to write the function yourself, but better process is using sprintf() function as
sprintf(str, "%d", n);
by ayon
Tue Jul 04, 2006 5:02 pm
Forum: Algorithms
Topic: array sorted or not (bentley)
Replies: 2
Views: 1052

say the array length is n, and you have m processors(computers) that can work simultaneously. then you can decide whether tha array is sorted or not in n/m times. x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 ^ ^ ^ ^ p1 p2 p3 p4 the 1st processor p1 checks the array[x1...x4] the 2nd processor p2 checks the...
by ayon
Tue Jul 04, 2006 4:43 pm
Forum: Volume 103 (10300-10399)
Topic: 10391 - Compound Words
Replies: 40
Views: 17505

what should be the result for the input?

ab
abab
abab

output:

abab
or,
abab
abab ?
by ayon
Mon Jul 03, 2006 6:45 pm
Forum: Volume 2 (200-299)
Topic: 271 - Simply Syntax
Replies: 46
Views: 12537

no <conio.h> is allowed, no getch() is allowed

Go to advanced search