Search found 5 matches

by ral
Mon Jul 16, 2007 9:58 pm
Forum: Volume 6 (600-699)
Topic: 658 - It's not a Bug, it's a Feature!
Replies: 15
Views: 11601

Hint: bitmask
by ral
Mon Jul 16, 2007 9:57 pm
Forum: Volume 6 (600-699)
Topic: 658 - It's not a Bug, it's a Feature!
Replies: 15
Views: 11601

You have to use bitmask to avoid TLE.
by ral
Sun Jun 17, 2007 5:20 pm
Forum: Volume 6 (600-699)
Topic: 663 - Sorting Slides
Replies: 18
Views: 12495

My program works in this test case.
by ral
Mon Jun 11, 2007 7:44 pm
Forum: Volume 6 (600-699)
Topic: 663 - Sorting Slides
Replies: 18
Views: 12495

Hi,

I don't know what I'm doing wrong. Can anyone help me?

My algorithm:

- Ford-Fulkerson method to get the maximum matching in the bipartite graph.
- Reverse all match edges.
- DFS for each slide "x": if find a cycle with "x", don't print the match.


#include <cstdio>
#include <cstdlib ...
by ral
Tue Jan 09, 2007 12:22 am
Forum: Volume 103 (10300-10399)
Topic: 10308 - Roads in the North
Replies: 30
Views: 13391

10308 - Roads in the North - WA

I'm getting WA but i don't know why.
Does anyone can help me with this problem?

My code:


#include <stdio.h>
#include <stdlib.h>
#define MAX_BUFF 1000
#define MAX 10000

struct Aresta {
int o;
int d;
int t;
} a[MAX];

int pos[MAX];

int compare (struct Aresta *a, struct Aresta *b)
{
if(a -> o ...

Go to advanced search