Algorithm

Subway Tree System

February 20, 2013 Graph Theory No comments

Subway tree systems

Time Limit:

note: This article comes from the Internet. Please contact me via lethic@163.com if there is any infringement.
lethic@163.com.

Min(s)Min(s[……]

Read more

2-sat Katu puzzil

Katu Puzzle

Time Limit:

Topological Sorting

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
:
(1)(0).
(2),.
(3),.
*/
bool TopologicalSort(int a[][101]){ //True
    int n = a[0][0], i, j;
    int into[101], ans[101];
    memset(into, 0, sizeof(into));
    memset(ans, 0, sizeof(ans));
    for (i = 1; i <= n; i++){
        for (j = 1; j <= n; j++){
            if (a[i][j] > 0)
            into[j]++;//
        }
    }
    into[0] = 1;
    for (i = 1; i <= n; i++){
        j = 0;
        while (into[j] != 0){
            j++;              //0j
            if (j > n)
                return false;
        }
        ans[i] = j;           //j
        into[j] = -1;          //j-1
        for (int k = 1; k <= n; k++){
            if (a[j][k] > 0)
            into[k]--;         //j
        }
    }
    for (i = 1; i <= n; i++){
        cout << ans[i] << " "; //
    }
    cout << endl;
    return true;
}

SPFA + DPThe Ghost Blows Light

The Ghost Blows Light
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1017 Accepted Subm[……]

Read more

Forming Teams(CF#133)

Forming Teams
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

One day n stude[……]

Read more

SPFA: As Long As Binbin Loves Sangsang

As long as Binbin loves Sangsang
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 753 Acc[……]

Read more

tarjan 2-sat: party

PartyTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
SubmitStatus

Description
n12n 2n

Input
n n (n

tarjandfsTriangle Love

Triangle LOVE
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 1462 Accepted Submission(s[……]

Read more

2-SAT

note: This article comes from the Internet. Please contact me via lethic@163.com if there is any infringement.
lethic@163.com.

///1

2-SATn2nn[……]

Read more

TarjanNetwork

Network
Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 6744 Accepted: 3158

Description
A Telephone Line Company (TLC) is est[……]

Read more

tarjan Road Construction

H – Road Construction

Time Limit:2000MS

Tarjan://///LCA()

1.

2.

3.

4.()

5.

6.

7.

<>kk-1

8.11G

Tarjan

1.

Tarjandfnlow

low[u]:=min(low[u],dfn[v])(u,v)vu

low[u]:=min([……]

Read more

note: This article comes from the Internet. Please contact me via lethic@163.com if there is any infringement.
lethic@163.com.

Tarjan

note: This article comes from http://www.byvoid.com/blog/scc-tarjan/. Please contact me via lethic@163.com if there is any infringement.
http://www.b[……]

Read more

SPFA: Invitation Cards

February 19, 2013 Graph Theory 1 comment

Invitation Cards
Time Limit:8000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u
SubmitStatus

Description
In the age of television,[……]

Read more

Floyd Arbitrage

Arbitrage
Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u
SubmitStatus

Description
Arbitrage is the use of discrepanc[……]

Read more

Bellman-Ford || SPFA :Wormholes

E – Wormholes
Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u
SubmitStatus

Description

While exploring his many far[……]

Read more

Kruskal :The Unique MST

The Unique MST
Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 14402 Accepted: 4981

Description
Given a connected undirected[……]

Read more

note: This article comes from the Internet. Please contact me via lethic@163.com if there is any infringement.
lethic@163.com.

GTGTGG
URAL1416M1[……]

Read more