-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/BionicRADAR/ProgCompetition
- Loading branch information
Showing
19 changed files
with
279 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/notes/.~lock.ProblemSet.odt# | ||
/bin/* | ||
/bin/AMine$charList.class | ||
/bin/AMine$charNode.class |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cs.wheaton.edu/ACCA/Contest2014/Admin for admin login | ||
cs.wheaton.edu/ACCA/Contest2014 for team login | ||
|
||
Admin Password: admin2014 | ||
Judge Password: judge2014 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import java.util.ArrayList; | ||
import java.util.Random; | ||
|
||
|
||
public class MineGenerator { | ||
public static void main(String[] args) { | ||
Random r = new Random(238947); | ||
int numIn = 4; | ||
int numOut = 4; | ||
int range = 5; | ||
int maxDanger = 50; | ||
int numVertices = 20; | ||
ArrayList<Vertex> vertices = new ArrayList<Vertex>(); | ||
ArrayList<Edge> edges = new ArrayList<Edge>(); | ||
for (int i = 0; i < numVertices; i++) { | ||
vertices.add(new Vertex((char) ('A' + i), r.nextInt(maxDanger), 'N')); | ||
if (i < numIn) | ||
vertices.get(i).inOut = 'I'; | ||
else if (i >= numVertices - numOut) | ||
vertices.get(i).inOut = 'O'; | ||
} | ||
for (int i = 0; i < vertices.size(); i++) { | ||
Vertex v = vertices.get(i); | ||
if (v.inOut == 'O') | ||
continue; | ||
if (v.edges.isEmpty() && v.inOut != 'I') { | ||
int randBack = range; | ||
if (i > range) | ||
randBack = i; | ||
Edge back = new Edge(vertices.get(i - r.nextInt(randBack - 1) - 1), v, r.nextInt(maxDanger)); | ||
v.edges.add(back); | ||
back.other(v).edges.add(back); | ||
} | ||
} | ||
} | ||
|
||
static class Vertex { | ||
int danger; | ||
ArrayList<Edge> edges; | ||
char inOut, name; | ||
Vertex(char name, int danger, char inOut) { | ||
this.danger = danger; | ||
this.inOut = inOut; | ||
this.name = name; | ||
} | ||
|
||
public String toString() { | ||
return name + " " + inOut + " " + edges.size() + " " + danger; | ||
} | ||
} | ||
|
||
static class Edge { | ||
int danger; | ||
Vertex v1, v2; | ||
Edge(Vertex v1, Vertex v2, int danger) { | ||
this.v1 = v1; | ||
this.v2 = v2; | ||
this.danger = danger; | ||
} | ||
Vertex other(Vertex v) { | ||
if (v == v1) | ||
return v2; | ||
return v1; | ||
} | ||
|
||
public String toString() { | ||
return v1.name + " " + v2.name + " " + danger; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
10 16 | ||
A I 1 2 | ||
B I 0 2 | ||
C N 2 3 | ||
D N 1 6 | ||
E N 0 3 | ||
F N 3 4 | ||
G N 5 4 | ||
H N 15 3 | ||
I O 3 2 | ||
J O 6 3 | ||
A C 6 | ||
A D 2 | ||
B D 1 | ||
B E 0 | ||
C F 0 | ||
C G 9 | ||
D F 24 | ||
D G 4 | ||
D H 6 | ||
D E 2 | ||
E H 8 | ||
F I 1 | ||
F J 5 | ||
G I 6 | ||
G J 9 | ||
H J 4 | ||
|
||
0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Enter date: 02/26/2011 | ||
02/26/2011 is a Saturday | ||
Enter date: 11/01/1984 | ||
11/01/1984 is a Thursday | ||
Enter date: 11/19/2014 | ||
11/19/2014 is a Wednesday | ||
Enter date: 11/20/2014 | ||
11/20/2014 is a Thursday | ||
Enter date: 11/21/2014 | ||
11/21/2014 is a Friday | ||
Enter date: 11/22/2014 | ||
11/22/2014 is a Saturday | ||
Enter date: 11/23/2014 | ||
11/23/2014 is a Sunday | ||
Enter date: 11/24/2014 | ||
11/24/2014 is a Monday | ||
Enter date: 11/25/2014 | ||
11/25/2014 is a Tuesday | ||
Enter date: 12/25/0001 | ||
12/25/0001 is a Tuesday | ||
Enter date: 02/14/1655 | ||
02/14/1655 is a Sunday | ||
Enter date: 06/01/1950 | ||
06/01/1950 is a Thursday | ||
Enter date: 08/17/2250 | ||
08/17/2250 is a Saturday | ||
Enter date: 02/29/2012 | ||
02/29/2012 is a Wednesday | ||
Enter date: 01/01/0001 | ||
01/01/0001 is a Monday | ||
Enter date: 00/00/0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
02/26/2011 | ||
11/01/1984 | ||
11/19/2014 | ||
11/20/2014 | ||
11/21/2014 | ||
11/22/2014 | ||
11/23/2014 | ||
11/24/2014 | ||
11/25/2014 | ||
12/25/0001 | ||
02/14/1655 | ||
06/01/1950 | ||
08/17/2250 | ||
02/29/2012 | ||
01/01/0001 | ||
00/00/0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Enter squiggle: AAA | ||
FGD | ||
Enter squiggle: AZAA | ||
GHMM | ||
Enter squiggle: HELLO | ||
MMRPT | ||
Enter squiggle: AAAAAAAAAAAAAAAAAAAAAAAAA | ||
XCMSQQZKMQLYNSYSLGJCMYLWZ | ||
Enter squiggle: BCDFGHJKLMNPQRSTVWXYZ | ||
BCDFGHJKLMNPQRSTVWXYZ | ||
Enter squiggle: AEIOUAEIOUAEIOUAEIOUAEIOU | ||
RYKWHMVSHWCWVQHQCQNGRGZKT | ||
Enter squiggle: AHWEUIOGHKLCHOXIUEWTLKJSH | ||
CLPYWMDYSQSWHCNQCWWTLKJSH | ||
Enter squiggle: PROGRAM | ||
SXXKWGM | ||
Enter squiggle: COMPETE | ||
JYVBTZL | ||
Enter squiggle: WHEATONCOLLEGE | ||
DJHGBCKQPFHCTS | ||
Enter squiggle: QUIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
AAA | ||
AZAA | ||
HELLO | ||
AAAAAAAAAAAAAAAAAAAAAAAAA | ||
BCDFGHJKLMNPQRSTVWXYZ | ||
AEIOUAEIOUAEIOUAEIOUAEIOU | ||
AHWEUIOGHKLCHOXIUEWTLKJSH | ||
PROGRAM | ||
COMPETE | ||
WHEATONCOLLEGE | ||
QUIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Enter Three Integers: 3 3 4 | ||
Invalid p | ||
Enter Three Integers: -1 2 3 | ||
Invalid n | ||
Enter Three Integers: 3 2 -4 | ||
Invalid m | ||
Enter Three Integers: 2 1 -1 | ||
Valid | ||
Enter Three Integers: 2 -1 1 | ||
Invalid p | ||
Enter Three Integers: 2 1 0 | ||
Valid | ||
Enter Three Integers: 2 0 3 | ||
Invalid m | ||
Enter Three Integers: 1 2 3 | ||
Invalid p | ||
Enter Three Integers: 5 0 -4 | ||
Invalid m | ||
Enter Three Integers: 5 4 -2 | ||
Valid | ||
Enter Three Integers: 5 4 2 | ||
Valid | ||
Enter Three Integers: 2 2 2 | ||
Invalid p | ||
Enter Three Integers: 3 2 2 | ||
Valid | ||
Enter Three Integers: 3 2 -2 | ||
Valid | ||
Enter Three Integers: 3 2 0 | ||
Valid | ||
Enter Three Integers: 3 2 1 | ||
Valid | ||
Enter Three Integers: 3 2 -1 | ||
Valid | ||
Enter Three Integers: 0 1 1 | ||
Invalid n | ||
Enter Three Integers: 0 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
3 3 4 | ||
-1 2 3 | ||
3 2 -4 | ||
2 1 -1 | ||
2 -1 1 | ||
2 1 0 | ||
2 0 3 | ||
1 2 3 | ||
5 0 -4 | ||
5 4 -2 | ||
5 4 2 | ||
2 2 2 | ||
3 2 2 | ||
3 2 -2 | ||
3 2 0 | ||
3 2 1 | ||
3 2 -1 | ||
0 1 1 | ||
0 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Enter integer: 5 | ||
Diagonal sum = 101 | ||
Enter integer: 11 | ||
Diagonal sum = 961 | ||
Enter integer: 1 | ||
Diagonal sum = 1 | ||
Enter integer: 3 | ||
Diagonal sum = 25 | ||
Enter integer: 1001 | ||
Diagonal sum = 669171001 | ||
Enter integer: 101 | ||
Diagonal sum = 692101 | ||
Enter integer: 555 | ||
Diagonal sum = 114124001 | ||
Enter integer: 723 | ||
Diagonal sum = 252217705 | ||
Enter integer: 999 | ||
Diagonal sum = 665168997 | ||
Enter integer: 13 | ||
Diagonal sum = 1565 | ||
Enter integer: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
5 | ||
11 | ||
1 | ||
3 | ||
1001 | ||
101 | ||
555 | ||
723 | ||
999 | ||
13 | ||
0 |