DFS: The Castle

February 20, 2013 Search No comments

The Castle
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)

Total Submission(s) : 20 Accepted Submission(s) : 13

Problem Description
1 2 3 4 5 6 7

#############################

1 # | # | # | | #

#####—#####-[……]

Read more

DFS: Sticks

February 20, 2013 Search No comments

Sticks
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)

Total Submission(s) : 12 Accepted Submission(s) : 7

Problem Description
George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return s[……]

Read more

DFSRed and Black

February 20, 2013 Search No comments

Red and Black
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 60000/30000K (Java/Other)
Total Submission(s) : 20 Accepted Submission(s) : 17
Problem Description
There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black[……]

Read more

DFS: Nightmare

February 20, 2013 Search No comments

Nightmare
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 42 Accepted Submission(s) : 18
Problem Description
Ignatius had a nightmare last night. He found himself in a labyrinth with a time bomb on him. The labyrinth has an exit, Ignatius[……]

Read more

BFS: Knights Move

February 20, 2013 Search No comments

Knight Moves
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 30 Accepted Submission(s) : 19
Problem Description
A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knigh[……]

Read more

BFSCatch That Cow

February 20, 2013 Search No comments

Catch That Cow

Time Limit : 4000/2000ms (Java/Other)

Nim()

February 20, 2013 Game Theory No comments

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

Nim

n1
NimPennies
34532145
Chales Leonard Bouton

11

K12

Nim

Nim
Nim(Combinatorial Games)Impartial Combinatorial GamesICGICG12(move)3 4ICG3

Nim[……]

Read more

what is in your name

February 20, 2013 Network Flow No comments

What’s In A Name?
Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 2083 Accepted: 741
Description
The FBI is conducting a surveillance of a known criminal hideout which serves as a communication center for a number of men and women of nefarious intent. Using sophisticated decryptio[……]

Read more

USACO 4.2.1 Ditch

February 20, 2013 Network Flow No comments

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

USACO 4.2.1 Ditch DD_engi

(Augmenting Path) (Push Relabel) Improved SAP

1. Ford – Fulkerson

Ford – Fulkerson Ford – Fulkerson

G(V,E) s t FF[……]

Read more

SAP

February 20, 2013 Network Flow No comments

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

1. Maximum Flow: Augmenting Path Algorithms Comparison
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=maxFlowRevisited
2. P321 ( retreat()< or 1. > )
—[……]

Read more

Girls ans Boys

February 20, 2013 Network Flow No comments

Girls and BoysTime Limit:5000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u
SubmitStatus
Description
In the second year of the university somebody started a study on the romantic relations between the students. The relation “romantically involved” is defined between one girl and one[……]

Read more

Machine Schedule

February 20, 2013 Network Flow No comments

Machine ScheduleTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u
SubmitStatus
Description
As we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduling problems differ widely in the nature of the[……]

Read more

Divisibility

February 20, 2013 Network Flow No comments

Description
As we know,the fzu AekdyCoin is famous of math,especially in the field of number theory.So,many people call him “the descendant of Chen Jingrun”,which brings him a good reputation.
AekdyCoin also plays an important role in the ACM_DIY group,many people always ask him questions about nu[……]

Read more

Air Raid

February 20, 2013 Network Flow No comments

Air RaidTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u
SubmitStatus
Description
Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town’s stre[……]

Read more

February 20, 2013 Network Flow No comments

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

http://www.matrix67.com/blog/archives/39

1

http://www.matrix67.com/blog/archives/116

K

February 20, 2013 Network Flow No comments

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

1.
1.
2.p1,p2,…pk,P1pkp1,p2…pk-11p1,p2…pk()
3.

=-

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)Min(s)egMin(babba) = 4p1, p2p1s[0]p2s[1]

(1) p1, p2p1s[0], p2s[1]

(2) k = 0s[p1+k] s[p2+k] k++(k)s[p1+k] s[p2+k]

(A). s[p1+k] > 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;
}