Cypry's Profile
Hi, I'm cypry (Ciprian Oprisa), I'm from Cluj-Napoca, Romania.
cypryoprisa@yahoo.com
Private Message
cypryoprisa
Thanks. Here's the first one(I was too lazy to translate the second one too, but I'll do it). It's quite easy, but the second one was hard.
Problem 1:
In a group of n persons, there are pairs of persons considered friends. Considering my friend's
friend is my friend, identify all the groups made by exactly k persons that are friends(directly or
indirectly).
Input datos:
-k is read from the keyboard
-there is a file called graph.txt that contains on the first line n(the number of persons), and on
the next lines are pairs of numbers which represents the friendship relations.
Output datos:
-the results should be written in the file group.txt
-on each line, there should be written a group of persons
Examples:
k=3
graph.txt
9
1 2
4 5
2 3
7 8
7 9
group.txt (this way it should look)
1 2 3
7 8 9
k=2
graph.txt
3
1 2
2 3
group.txt(it shouldn't contain anything)
Problem 1:
In a group of n persons, there are pairs of persons considered friends. Considering my friend's
friend is my friend, identify all the groups made by exactly k persons that are friends(directly or
indirectly).
Input datos:
-k is read from the keyboard
-there is a file called graph.txt that contains on the first line n(the number of persons), and on
the next lines are pairs of numbers which represents the friendship relations.
Output datos:
-the results should be written in the file group.txt
-on each line, there should be written a group of persons
Examples:
k=3
graph.txt
9
1 2
4 5
2 3
7 8
7 9
group.txt (this way it should look)
1 2 3
7 8 9
k=2
graph.txt
3
1 2
2 3
group.txt(it shouldn't contain anything)
Cypry has released 9 files
Title | Category | Avg | Updated |
---|---|---|---|
GoldSeeker | Miscellaneous | ![]() | June 28th, 2009 |
One Screen D-Mod Compilation | D-Mod, Miscellaneous | ![]() | October 18th, 2007 |
Honor Quest (The) | D-Mod, Romp | ![]() | September 26th, 2006 |
DinkC Editor | Development, Utility | ![]() | September 5th, 2006 |
EasyMP3 | Miscellaneous | N/A | August 21st, 2006 |
Dink Vs. Milder 2 | D-Mod, Demo | ![]() | June 10th, 2006 |
Cypry's Warrior Skills Pack | Development | ![]() | December 31st, 2005 |
WarCry | Miscellaneous | ![]() | August 31st, 2005 |
Dink vs. Milder | D-Mod, Romp | ![]() | June 15th, 2005 |