diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2024-09-30 16:08:27 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-09-30 16:08:27 +0530 |
commit | 3496b0ed08c51e37e135e686b1632fd86f930c2c (patch) | |
tree | 1da44792489607070f3b4ca14d82af05b73e362b |
(init): Initialize repository.
650 files changed, 4582 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..89f9ac0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +out/ diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..5dd12d4 --- /dev/null +++ b/build.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +shopt -s extglob + +mkdir -p out + +if [[ "$1" != '' ]]; then + cd $1 +fi + +echo "Start build: $(date)" +echo + +for d in $(ls -d !(build.sh|out|*.py)); do + echo "Building $d" + cd $d && zip -r "../../out/$d.zip" * > /dev/null && cd .. +done + +echo +echo "End build: $(date)" diff --git a/problems/aweirdclock.py b/problems/aweirdclock.py new file mode 100644 index 0000000..5175306 --- /dev/null +++ b/problems/aweirdclock.py @@ -0,0 +1,30 @@ +def transform_time(readable_text): + mapping = { + 'O': '0', '0': '0', + 'i': '1', '1': '1', + '2': '2', + 'E': '3', + 'h': '4', + 'S': '5', '5': '5', + '9': '6', + 'L': '7', + '8': '8', + '6': '9' + } + + reversed_text = readable_text[::-1] + reversed_hours, reversed_minutes = reversed_text.split(":") + + hours = int("".join(mapping[c] for c in reversed_hours)) + minutes = int("".join(mapping[c] for c in reversed_minutes)) + + if hours >= 24: + print(f"Error {hours} hours") + if minutes >= 60: + print(f"Error {minutes} minutes") + + if hours < 24 and minutes < 60: + print(f"{hours}:{minutes:02d}") + +readable_text = input() +transform_time(readable_text) diff --git a/problems/aweirdclock/attachments/template.c b/problems/aweirdclock/attachments/template.c new file mode 100644 index 0000000..2f9fd8f --- /dev/null +++ b/problems/aweirdclock/attachments/template.c @@ -0,0 +1,17 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + char readable_text[6]; + scanf("%[^\n]", readable_text); + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("HH:MM\n"); + + return 0; +} diff --git a/problems/aweirdclock/attachments/template.cpp b/problems/aweirdclock/attachments/template.cpp new file mode 100644 index 0000000..b4d0fd0 --- /dev/null +++ b/problems/aweirdclock/attachments/template.cpp @@ -0,0 +1,17 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + string readable_text; + getline(cin, readable_text); + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "HH:MM" << endl; +} diff --git a/problems/aweirdclock/attachments/template.java b/problems/aweirdclock/attachments/template.java new file mode 100644 index 0000000..285b023 --- /dev/null +++ b/problems/aweirdclock/attachments/template.java @@ -0,0 +1,16 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + String readableText = in.nextLine(); + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("HH:MM"); + } +} diff --git a/problems/aweirdclock/attachments/template.js b/problems/aweirdclock/attachments/template.js new file mode 100644 index 0000000..81a29ad --- /dev/null +++ b/problems/aweirdclock/attachments/template.js @@ -0,0 +1,6 @@ +const readableText = readline(); + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('HH:MM'); diff --git a/problems/aweirdclock/attachments/template.py b/problems/aweirdclock/attachments/template.py new file mode 100644 index 0000000..cb73100 --- /dev/null +++ b/problems/aweirdclock/attachments/template.py @@ -0,0 +1,9 @@ +import sys +import math + +readable_text = input() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("HH:MM") diff --git a/problems/aweirdclock/data/secret/1.ans b/problems/aweirdclock/data/secret/1.ans new file mode 100644 index 0000000..9722497 --- /dev/null +++ b/problems/aweirdclock/data/secret/1.ans @@ -0,0 +1 @@ +12:34 diff --git a/problems/aweirdclock/data/secret/1.in b/problems/aweirdclock/data/secret/1.in new file mode 100644 index 0000000..dec8ae3 --- /dev/null +++ b/problems/aweirdclock/data/secret/1.in @@ -0,0 +1 @@ +hE:2i diff --git a/problems/aweirdclock/data/secret/10.ans b/problems/aweirdclock/data/secret/10.ans new file mode 100644 index 0000000..33935c4 --- /dev/null +++ b/problems/aweirdclock/data/secret/10.ans @@ -0,0 +1 @@ +Error 64 hours diff --git a/problems/aweirdclock/data/secret/10.in b/problems/aweirdclock/data/secret/10.in new file mode 100644 index 0000000..5e4507a --- /dev/null +++ b/problems/aweirdclock/data/secret/10.in @@ -0,0 +1 @@ +15:h9 diff --git a/problems/aweirdclock/data/secret/11.ans b/problems/aweirdclock/data/secret/11.ans new file mode 100644 index 0000000..83cb9a8 --- /dev/null +++ b/problems/aweirdclock/data/secret/11.ans @@ -0,0 +1 @@ +Error 64 minutes diff --git a/problems/aweirdclock/data/secret/11.in b/problems/aweirdclock/data/secret/11.in new file mode 100644 index 0000000..d762849 --- /dev/null +++ b/problems/aweirdclock/data/secret/11.in @@ -0,0 +1 @@ +h9:O2 diff --git a/problems/aweirdclock/data/secret/12.ans b/problems/aweirdclock/data/secret/12.ans new file mode 100644 index 0000000..c56449b --- /dev/null +++ b/problems/aweirdclock/data/secret/12.ans @@ -0,0 +1 @@ +Error 96 minutes diff --git a/problems/aweirdclock/data/secret/12.in b/problems/aweirdclock/data/secret/12.in new file mode 100644 index 0000000..a9f7709 --- /dev/null +++ b/problems/aweirdclock/data/secret/12.in @@ -0,0 +1 @@ +96:51 diff --git a/problems/aweirdclock/data/secret/13.ans b/problems/aweirdclock/data/secret/13.ans new file mode 100644 index 0000000..d5e97a3 --- /dev/null +++ b/problems/aweirdclock/data/secret/13.ans @@ -0,0 +1 @@ +1:01 diff --git a/problems/aweirdclock/data/secret/13.in b/problems/aweirdclock/data/secret/13.in new file mode 100644 index 0000000..dd75df7 --- /dev/null +++ b/problems/aweirdclock/data/secret/13.in @@ -0,0 +1 @@ +iO:i diff --git a/problems/aweirdclock/data/secret/14.ans b/problems/aweirdclock/data/secret/14.ans new file mode 100644 index 0000000..3c4074d --- /dev/null +++ b/problems/aweirdclock/data/secret/14.ans @@ -0,0 +1 @@ +7:07 diff --git a/problems/aweirdclock/data/secret/14.in b/problems/aweirdclock/data/secret/14.in new file mode 100644 index 0000000..fbf83f3 --- /dev/null +++ b/problems/aweirdclock/data/secret/14.in @@ -0,0 +1 @@ +LO:L diff --git a/problems/aweirdclock/data/secret/15.ans b/problems/aweirdclock/data/secret/15.ans new file mode 100644 index 0000000..1c0bb66 --- /dev/null +++ b/problems/aweirdclock/data/secret/15.ans @@ -0,0 +1 @@ +5:01 diff --git a/problems/aweirdclock/data/secret/15.in b/problems/aweirdclock/data/secret/15.in new file mode 100644 index 0000000..23ef4f2 --- /dev/null +++ b/problems/aweirdclock/data/secret/15.in @@ -0,0 +1 @@ +iO:S diff --git a/problems/aweirdclock/data/secret/16.ans b/problems/aweirdclock/data/secret/16.ans new file mode 100644 index 0000000..b6bd817 --- /dev/null +++ b/problems/aweirdclock/data/secret/16.ans @@ -0,0 +1 @@ +7:10 diff --git a/problems/aweirdclock/data/secret/16.in b/problems/aweirdclock/data/secret/16.in new file mode 100644 index 0000000..1d20a0e --- /dev/null +++ b/problems/aweirdclock/data/secret/16.in @@ -0,0 +1 @@ +Oi:L diff --git a/problems/aweirdclock/data/secret/17.ans b/problems/aweirdclock/data/secret/17.ans new file mode 100644 index 0000000..2e1685f --- /dev/null +++ b/problems/aweirdclock/data/secret/17.ans @@ -0,0 +1,2 @@ +Error 96 hours +Error 64 minutes diff --git a/problems/aweirdclock/data/secret/17.in b/problems/aweirdclock/data/secret/17.in new file mode 100644 index 0000000..bb7cf99 --- /dev/null +++ b/problems/aweirdclock/data/secret/17.in @@ -0,0 +1 @@ +h9:96 diff --git a/problems/aweirdclock/data/secret/18.ans b/problems/aweirdclock/data/secret/18.ans new file mode 100644 index 0000000..9f2ff45 --- /dev/null +++ b/problems/aweirdclock/data/secret/18.ans @@ -0,0 +1,2 @@ +Error 64 hours +Error 96 minutes diff --git a/problems/aweirdclock/data/secret/18.in b/problems/aweirdclock/data/secret/18.in new file mode 100644 index 0000000..cb8bb31 --- /dev/null +++ b/problems/aweirdclock/data/secret/18.in @@ -0,0 +1 @@ +96:h9 diff --git a/problems/aweirdclock/data/secret/2.ans b/problems/aweirdclock/data/secret/2.ans new file mode 100644 index 0000000..d78c6fc --- /dev/null +++ b/problems/aweirdclock/data/secret/2.ans @@ -0,0 +1 @@ +13:24 diff --git a/problems/aweirdclock/data/secret/2.in b/problems/aweirdclock/data/secret/2.in new file mode 100644 index 0000000..5bc15f3 --- /dev/null +++ b/problems/aweirdclock/data/secret/2.in @@ -0,0 +1 @@ +h2:Ei diff --git a/problems/aweirdclock/data/secret/3.ans b/problems/aweirdclock/data/secret/3.ans new file mode 100644 index 0000000..db90e65 --- /dev/null +++ b/problems/aweirdclock/data/secret/3.ans @@ -0,0 +1 @@ +5:06 diff --git a/problems/aweirdclock/data/secret/3.in b/problems/aweirdclock/data/secret/3.in new file mode 100644 index 0000000..6d34487 --- /dev/null +++ b/problems/aweirdclock/data/secret/3.in @@ -0,0 +1 @@ +9O:S diff --git a/problems/aweirdclock/data/secret/4.ans b/problems/aweirdclock/data/secret/4.ans new file mode 100644 index 0000000..fed3c5e --- /dev/null +++ b/problems/aweirdclock/data/secret/4.ans @@ -0,0 +1 @@ +0:56 diff --git a/problems/aweirdclock/data/secret/4.in b/problems/aweirdclock/data/secret/4.in new file mode 100644 index 0000000..234699b --- /dev/null +++ b/problems/aweirdclock/data/secret/4.in @@ -0,0 +1 @@ +9S:0 diff --git a/problems/aweirdclock/data/secret/5.ans b/problems/aweirdclock/data/secret/5.ans new file mode 100644 index 0000000..c28ffb7 --- /dev/null +++ b/problems/aweirdclock/data/secret/5.ans @@ -0,0 +1 @@ +17:28 diff --git a/problems/aweirdclock/data/secret/5.in b/problems/aweirdclock/data/secret/5.in new file mode 100644 index 0000000..0c00bd9 --- /dev/null +++ b/problems/aweirdclock/data/secret/5.in @@ -0,0 +1 @@ +82:L1 diff --git a/problems/aweirdclock/data/secret/6.ans b/problems/aweirdclock/data/secret/6.ans new file mode 100644 index 0000000..26ca7f8 --- /dev/null +++ b/problems/aweirdclock/data/secret/6.ans @@ -0,0 +1 @@ +18:27 diff --git a/problems/aweirdclock/data/secret/6.in b/problems/aweirdclock/data/secret/6.in new file mode 100644 index 0000000..458b256 --- /dev/null +++ b/problems/aweirdclock/data/secret/6.in @@ -0,0 +1 @@ +L2:81 diff --git a/problems/aweirdclock/data/secret/7.ans b/problems/aweirdclock/data/secret/7.ans new file mode 100644 index 0000000..9325d87 --- /dev/null +++ b/problems/aweirdclock/data/secret/7.ans @@ -0,0 +1 @@ +20:39 diff --git a/problems/aweirdclock/data/secret/7.in b/problems/aweirdclock/data/secret/7.in new file mode 100644 index 0000000..4146bf0 --- /dev/null +++ b/problems/aweirdclock/data/secret/7.in @@ -0,0 +1 @@ +6E:02 diff --git a/problems/aweirdclock/data/secret/8.ans b/problems/aweirdclock/data/secret/8.ans new file mode 100644 index 0000000..8c431b3 --- /dev/null +++ b/problems/aweirdclock/data/secret/8.ans @@ -0,0 +1 @@ +23:09 diff --git a/problems/aweirdclock/data/secret/8.in b/problems/aweirdclock/data/secret/8.in new file mode 100644 index 0000000..4d8cc36 --- /dev/null +++ b/problems/aweirdclock/data/secret/8.in @@ -0,0 +1 @@ +60:E2 diff --git a/problems/aweirdclock/data/secret/9.ans b/problems/aweirdclock/data/secret/9.ans new file mode 100644 index 0000000..2ec56a9 --- /dev/null +++ b/problems/aweirdclock/data/secret/9.ans @@ -0,0 +1 @@ +Error 96 hours diff --git a/problems/aweirdclock/data/secret/9.in b/problems/aweirdclock/data/secret/9.in new file mode 100644 index 0000000..ca29dd7 --- /dev/null +++ b/problems/aweirdclock/data/secret/9.in @@ -0,0 +1 @@ +51:96 diff --git a/problems/aweirdclock/domjudge-problem.ini b/problems/aweirdclock/domjudge-problem.ini new file mode 100644 index 0000000..999f41f --- /dev/null +++ b/problems/aweirdclock/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "A Weird Clock" +timelimit = 1 +points = 5 diff --git a/problems/aweirdclock/problem.pdf b/problems/aweirdclock/problem.pdf Binary files differnew file mode 100644 index 0000000..3abf629 --- /dev/null +++ b/problems/aweirdclock/problem.pdf diff --git a/problems/boatraceanalysis/attachments/template.c b/problems/boatraceanalysis/attachments/template.c new file mode 100644 index 0000000..0fa2b86 --- /dev/null +++ b/problems/boatraceanalysis/attachments/template.c @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int n; + scanf("%d", &n); fgetc(stdin); + for (int i = 0; i < n; i++) { + char analysis[1025]; + scanf("%[^\n]", analysis); fgetc(stdin); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("one line per boat with its position or one line per analysis causing an error\n"); + + return 0; +} diff --git a/problems/boatraceanalysis/attachments/template.cpp b/problems/boatraceanalysis/attachments/template.cpp new file mode 100644 index 0000000..2cb2feb --- /dev/null +++ b/problems/boatraceanalysis/attachments/template.cpp @@ -0,0 +1,21 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + string analysis; + getline(cin, analysis); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "one line per boat with its position or one line per analysis causing an error" << endl; +} diff --git a/problems/boatraceanalysis/attachments/template.java b/problems/boatraceanalysis/attachments/template.java new file mode 100644 index 0000000..eba7341 --- /dev/null +++ b/problems/boatraceanalysis/attachments/template.java @@ -0,0 +1,22 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int n = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < n; i++) { + String analysis = in.nextLine(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("one line per boat with its position or one line per analysis causing an error"); + } +} diff --git a/problems/boatraceanalysis/attachments/template.js b/problems/boatraceanalysis/attachments/template.js new file mode 100644 index 0000000..7889d24 --- /dev/null +++ b/problems/boatraceanalysis/attachments/template.js @@ -0,0 +1,9 @@ +const n = parseInt(readline()); +for (let i = 0; i < n; i++) { + const analysis = readline(); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('one line per boat with its position or one line per analysis causing an error'); diff --git a/problems/boatraceanalysis/attachments/template.py b/problems/boatraceanalysis/attachments/template.py new file mode 100644 index 0000000..2c704f2 --- /dev/null +++ b/problems/boatraceanalysis/attachments/template.py @@ -0,0 +1,11 @@ +import sys +import math + +n = int(input()) +for i in range(n): + analysis = input() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("one line per boat with its position or one line per analysis causing an error") diff --git a/problems/boatraceanalysis/data/secret/1.ans b/problems/boatraceanalysis/data/secret/1.ans new file mode 100644 index 0000000..aecea89 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/1.ans @@ -0,0 +1,3 @@ +_ B +_ _ E +F diff --git a/problems/boatraceanalysis/data/secret/1.in b/problems/boatraceanalysis/data/secret/1.in new file mode 100644 index 0000000..d08e60b --- /dev/null +++ b/problems/boatraceanalysis/data/secret/1.in @@ -0,0 +1,3 @@ +2 +E is in front of B +B is in front of F diff --git a/problems/boatraceanalysis/data/secret/10.ans b/problems/boatraceanalysis/data/secret/10.ans new file mode 100644 index 0000000..c62124e --- /dev/null +++ b/problems/boatraceanalysis/data/secret/10.ans @@ -0,0 +1,3 @@ +_ Dock Holiday +_ Knot on call +Nacho Boat diff --git a/problems/boatraceanalysis/data/secret/10.in b/problems/boatraceanalysis/data/secret/10.in new file mode 100644 index 0000000..edf68b7 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/10.in @@ -0,0 +1,3 @@ +2 +Dock Holiday is in front of Nacho Boat +Knot on call is in front of Nacho Boat diff --git a/problems/boatraceanalysis/data/secret/11.ans b/problems/boatraceanalysis/data/secret/11.ans new file mode 100644 index 0000000..e263e03 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/11.ans @@ -0,0 +1,6 @@ +Amy's wine-house +Happy hours +_ In a meeting +_ _ _ In deep ship +_ _ Nacho Boat +_ Pier pressure diff --git a/problems/boatraceanalysis/data/secret/11.in b/problems/boatraceanalysis/data/secret/11.in new file mode 100644 index 0000000..1b5194a --- /dev/null +++ b/problems/boatraceanalysis/data/secret/11.in @@ -0,0 +1,7 @@ +6 +In deep ship is in front of In a meeting +Pier pressure is in front of Amy's wine-house +Nacho Boat is in front of Pier pressure +In a meeting is in front of Happy hours +Nacho Boat is in front of In a meeting +In deep ship is in front of Nacho Boat diff --git a/problems/boatraceanalysis/data/secret/12.ans b/problems/boatraceanalysis/data/secret/12.ans new file mode 100644 index 0000000..6614c3b --- /dev/null +++ b/problems/boatraceanalysis/data/secret/12.ans @@ -0,0 +1,6 @@ +Beeracuda +_ _ _ In solvant Sea +_ Knot for sail +_ _ Knot on call +Plan C +_ Zombies can't swim diff --git a/problems/boatraceanalysis/data/secret/12.in b/problems/boatraceanalysis/data/secret/12.in new file mode 100644 index 0000000..c304cdc --- /dev/null +++ b/problems/boatraceanalysis/data/secret/12.in @@ -0,0 +1,7 @@ +6 +In solvant Sea is in front of Knot for sail +Knot on call is in front of Zombies can't swim +Knot for sail is in front of Plan C +Knot on call is in front of Knot for sail +Zombies can't swim is in front of Beeracuda +In solvant Sea is in front of Knot on call diff --git a/problems/boatraceanalysis/data/secret/13.ans b/problems/boatraceanalysis/data/secret/13.ans new file mode 100644 index 0000000..ff5e724 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/13.ans @@ -0,0 +1,4 @@ +In solvant Sea is in front of Titanic II +Grouds for divorce is in front of Hurricane +Grouds for divorce is not ahead of Hurricane +Titanic II is in front of In solvant Sea diff --git a/problems/boatraceanalysis/data/secret/13.in b/problems/boatraceanalysis/data/secret/13.in new file mode 100644 index 0000000..13cbf6d --- /dev/null +++ b/problems/boatraceanalysis/data/secret/13.in @@ -0,0 +1,16 @@ +15 +In solvant Sea is in front of Titanic II +Grouds for divorce is in front of Hurricane +Pier pressure is in front of Titanic II +Grouds for divorce is in front of In solvant Sea +Knot paid for is not ahead of Hurricane +Grouds for divorce is not ahead of Hurricane +Knot paid for is not ahead of Grouds for divorce +Plan B is in front of Knot paid for +Pier pressure is not ahead of Plan B +Titanic II is not ahead of Forced family fun +Hurricane is in front of Plan B +Titanic II is in front of In solvant Sea +Forced family fun is not ahead of Plan B +Knot paid for is not ahead of Pier pressure +Forced family fun is in front of Pier pressure diff --git a/problems/boatraceanalysis/data/secret/14.ans b/problems/boatraceanalysis/data/secret/14.ans new file mode 100644 index 0000000..5551185 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/14.ans @@ -0,0 +1,4 @@ +Amy's wine-house is not ahead of In deep ship +No Regrets is in front of Sea Ya +Sea Ya is in front of No Regrets +Amy's wine-house is in front of In deep ship diff --git a/problems/boatraceanalysis/data/secret/14.in b/problems/boatraceanalysis/data/secret/14.in new file mode 100644 index 0000000..e237e90 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/14.in @@ -0,0 +1,16 @@ +15 +Amy's wine-house is not ahead of In deep ship +No Regrets is in front of Sea Ya +In deep ship is in front of Eclipse +Eggs-ta-Sea is not ahead of Eclipse +Beeracuda is in front of Eggs-ta-Sea +Eggs-ta-Sea is in front of Sea Ya +Eclipse is in front of Gypsea +Sea Ya is in front of No Regrets +Gypsea is not ahead of Amy's wine-house +Amy's wine-house is in front of In deep ship +Beeracuda is not ahead of Eclipse +Gypsea is not ahead of Eggs-ta-Sea +Amy's wine-house is in front of No Regrets +Gypsea is not ahead of In deep ship +Sea Ya is not ahead of Beeracuda diff --git a/problems/boatraceanalysis/data/secret/15.ans b/problems/boatraceanalysis/data/secret/15.ans new file mode 100644 index 0000000..16129ff --- /dev/null +++ b/problems/boatraceanalysis/data/secret/15.ans @@ -0,0 +1,20 @@ +_ _ _ _ _ _ _ _ _ Aboat time +_ _ _ _ _ _ _ At last +_ _ _ _ _ _ _ _ _ _ Beeracuda +_ _ _ _ Friendship +_ _ _ _ _ Gypsea +_ _ _ _ _ _ _ _ Hydro therapy +In deep ship +_ _ Island Time +_ _ _ _ _ _ _ _ _ _ Just add wind +_ _ _ Knot on call +Liquid asset +Nacho Boat +_ _ _ _ _ _ _ _ No Regrets +_ _ _ _ _ _ _ Piece of ship +_ Plan C +_ _ _ _ _ _ _ _ _ _ Pura vida +_ _ _ _ _ _ Real time +_ _ _ _ _ Sea Ya +_ _ _ _ _ _ _ Ship faced +_ _ Zombies can't swim diff --git a/problems/boatraceanalysis/data/secret/15.in b/problems/boatraceanalysis/data/secret/15.in new file mode 100644 index 0000000..19a539d --- /dev/null +++ b/problems/boatraceanalysis/data/secret/15.in @@ -0,0 +1,41 @@ +40 +Real time is in front of Nacho Boat +Zombies can't swim is in front of Plan C +Ship faced is in front of Island Time +Just add wind is in front of At last +No Regrets is in front of Ship faced +Plan C is in front of Liquid asset +Aboat time is in front of Nacho Boat +Knot on call is in front of Island Time +In deep ship is not ahead of Zombies can't swim +Beeracuda is not ahead of Pura vida +In deep ship is not ahead of At last +At last is in front of Real time +Hydro therapy is in front of Plan C +Beeracuda is in front of Piece of ship +Island Time is in front of Plan C +Beeracuda is in front of Sea Ya +Aboat time is in front of Hydro therapy +Sea Ya is in front of Island Time +Sea Ya is in front of Friendship +Piece of ship is in front of Real time +Gypsea is in front of In deep ship +Real time is in front of Sea Ya +Gypsea is in front of Friendship +Pura vida is not ahead of Just add wind +Pura vida is in front of Zombies can't swim +Aboat time is in front of Zombies can't swim +Zombies can't swim is not ahead of Knot on call +No Regrets is in front of Island Time +Hydro therapy is in front of Ship faced +Beeracuda is in front of Gypsea +Ship faced is in front of Real time +No Regrets is in front of Gypsea +Friendship is in front of Knot on call +Liquid asset is not ahead of Hydro therapy +Just add wind is in front of Piece of ship +Real time is in front of In deep ship +Friendship is in front of Plan C +Just add wind is in front of Island Time +Beeracuda is in front of Aboat time +Knot on call is in front of Liquid asset diff --git a/problems/boatraceanalysis/data/secret/16.ans b/problems/boatraceanalysis/data/secret/16.ans new file mode 100644 index 0000000..3c4b311 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/16.ans @@ -0,0 +1,20 @@ +_ _ _ _ _ _ _ _ _ Berth control +_ _ _ _ Ctrl + Alt + Delete +_ _ _ _ _ _ _ _ Dock Holiday +Eggs-ta-Sea +_ _ _ _ _ Error 404 Fish not found +_ _ _ _ _ _ _ _ _ _ Finally +_ _ Gypsies on Sea +_ _ _ _ _ _ _ _ _ _ Hakuna matata +_ _ _ _ _ _ Happy hours +_ _ Irish wake +_ _ _ _ _ _ _ _ _ _ Knot for sail +_ Miss conduct +_ _ _ _ _ _ _ On the rocks +_ _ _ Pier pressure +_ _ _ _ _ _ _ _ She got the house +_ _ _ _ _ _ _ Tax Sea-vation +The salt shaker +Usain Boat +_ _ _ _ _ _ _ Water you lookin'at ? +_ _ _ _ _ What's up dock ? diff --git a/problems/boatraceanalysis/data/secret/16.in b/problems/boatraceanalysis/data/secret/16.in new file mode 100644 index 0000000..bd46d73 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/16.in @@ -0,0 +1,41 @@ +40 +Knot for sail is in front of Irish wake +Berth control is in front of The salt shaker +Usain Boat is not ahead of She got the house +Error 404 Fish not found is in front of Ctrl + Alt + Delete +What's up dock ? is in front of Irish wake +Hakuna matata is not ahead of Knot for sail +Dock Holiday is in front of Irish wake +Berth control is in front of Gypsies on Sea +Tax Sea-vation is in front of Irish wake +Ctrl + Alt + Delete is in front of Pier pressure +Ctrl + Alt + Delete is in front of Miss conduct +Knot for sail is in front of On the rocks +Berth control is in front of She got the house +Tax Sea-vation is in front of Happy hours +Eggs-ta-Sea is not ahead of On the rocks +She got the house is in front of Tax Sea-vation +Happy hours is in front of Eggs-ta-Sea +Dock Holiday is in front of Error 404 Fish not found +Miss conduct is in front of Usain Boat +Finally is in front of What's up dock ? +Pier pressure is in front of Irish wake +Happy hours is in front of What's up dock ? +Dock Holiday is in front of Tax Sea-vation +On the rocks is in front of Happy hours +Irish wake is in front of Miss conduct +Error 404 Fish not found is in front of Eggs-ta-Sea +Finally is in front of Error 404 Fish not found +Finally is not ahead of Hakuna matata +Happy hours is in front of The salt shaker +What's up dock ? is in front of Ctrl + Alt + Delete +Finally is in front of Water you lookin'at ? +She got the house is in front of Miss conduct +Gypsies on Sea is not ahead of Pier pressure +Finally is in front of Berth control +Gypsies on Sea is in front of Miss conduct +Eggs-ta-Sea is not ahead of Gypsies on Sea +Water you lookin'at ? is in front of Happy hours +Pier pressure is in front of Usain Boat +Knot for sail is in front of Water you lookin'at ? +Hakuna matata is in front of Gypsies on Sea diff --git a/problems/boatraceanalysis/data/secret/17.ans b/problems/boatraceanalysis/data/secret/17.ans new file mode 100644 index 0000000..3e37067 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/17.ans @@ -0,0 +1,35 @@ +_ _ _ _ Aboat time +Aquaholic +_ At last +_ Beeracuda +_ Ctrl + Alt + Delete +_ _ _ Dock Holiday +Error 404 Fish not found +_ _ _ _ _ Fantasea +_ Finally +_ _ _ Fishful thinkin' +Flash +_ _ _ Friendship +Grouds for divorce +_ _ _ _ Hydro therapy +_ _ _ _ _ In deep ship +Just add wind +_ _ _ _ _ _ _ Knot for sail +_ _ Knot paid for +_ _ Little boat +_ _ Miss conduct +_ _ _ _ _ Nacho Boat +_ No Regrets +_ _ _ _ _ _ Pier pressure +_ _ _ _ Plan C +_ _ _ _ _ _ Real time +_ Rock bottom +_ _ Sea Senora +_ _ _ _ Sea Ya +_ Ship faced +_ _ Tax Sea-vation +_ _ _ _ _ _ The salt shaker +Titanic II +Water runner +_ What's up dock ? +_ _ _ Zombies can't swim diff --git a/problems/boatraceanalysis/data/secret/17.in b/problems/boatraceanalysis/data/secret/17.in new file mode 100644 index 0000000..ea8a238 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/17.in @@ -0,0 +1,52 @@ +51 +Ctrl + Alt + Delete is in front of Aquaholic +In deep ship is in front of Titanic II +What's up dock ? is not ahead of Aboat time +Zombies can't swim is in front of Ctrl + Alt + Delete +Beeracuda is in front of Grouds for divorce +Flash is not ahead of Fantasea +The salt shaker is in front of Fantasea +Friendship is in front of What's up dock ? +Friendship is in front of Little boat +Knot paid for is in front of Rock bottom +In deep ship is not ahead of Fantasea +The salt shaker is not ahead of Real time +Aboat time is in front of Friendship +Flash is not ahead of Little boat +Pier pressure is in front of Rock bottom +Ship faced is not ahead of Rock bottom +Flash is not ahead of The salt shaker +Error 404 Fish not found is not ahead of Friendship +Nacho Boat is in front of Hydro therapy +At last is not ahead of Tax Sea-vation +Tax Sea-vation is not ahead of Hydro therapy +The salt shaker is not ahead of Pier pressure +Sea Ya is not ahead of Hydro therapy +Little boat is not ahead of Miss conduct +At last is in front of Water runner +No Regrets is not ahead of What's up dock ? +Just add wind is not ahead of Little boat +Pier pressure is in front of What's up dock ? +Ship faced is in front of Just add wind +Error 404 Fish not found is not ahead of Ctrl + Alt + Delete +Zombies can't swim is in front of Miss conduct +Finally is in front of Flash +No Regrets is in front of Error 404 Fish not found +In deep ship is in front of Hydro therapy +Aboat time is not ahead of Sea Ya +Sea Ya is in front of Knot paid for +Real time is in front of Aboat time +Ctrl + Alt + Delete is not ahead of Zombies can't swim +Sea Senora is in front of Beeracuda +Miss conduct is in front of Titanic II +Pier pressure is in front of At last +Just add wind is not ahead of No Regrets +Knot for sail is in front of Real time +Tax Sea-vation is in front of What's up dock ? +Titanic II is not ahead of Tax Sea-vation +Little boat is in front of Rock bottom +Knot paid for is not ahead of Aboat time +Fishful thinkin' is in front of Tax Sea-vation +Plan C is in front of Dock Holiday +Friendship is not ahead of Dock Holiday +Hydro therapy is not ahead of Pier pressure diff --git a/problems/boatraceanalysis/data/secret/18.ans b/problems/boatraceanalysis/data/secret/18.ans new file mode 100644 index 0000000..4a03f3c --- /dev/null +++ b/problems/boatraceanalysis/data/secret/18.ans @@ -0,0 +1,35 @@ +_ _ _ _ _ _ Amy's wine-house +_ _ _ _ _ Berth control +_ Breaking Bass +_ _ _ _ Docked wages +Eclipse +_ _ _ _ _ _ Eggs-ta-Sea +_ Favorite mistake +_ Fishizzle +_ _ Forced family fun +_ _ _ Gypsea +Gypsies on Sea +Hakuna matata +_ _ _ _ _ Happy hours +_ _ _ _ _ Hurricane +_ _ _ _ In a meeting +In solvant Sea +Insubmersible 2 +_ _ _ _ Irish wake +Island Time +_ _ Knot on call +Liquid asset +_ Main mistress +_ _ _ _ Meteor +_ _ _ No worries +_ On the rocks +_ _ _ _ _ _ Piece of ship +_ _ _ Plan B +_ _ Pura vida +_ Rock bottom +_ _ _ _ _ _ _ Serenity +_ She got the house +_ _ Unfathomable +_ _ Unsinkable II +_ Usain Boat +_ _ _ Water you lookin'at ? diff --git a/problems/boatraceanalysis/data/secret/18.in b/problems/boatraceanalysis/data/secret/18.in new file mode 100644 index 0000000..a31c675 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/18.in @@ -0,0 +1,52 @@ +51 +She got the house is in front of Eclipse +Hurricane is in front of Docked wages +Gypsies on Sea is not ahead of Piece of ship +Breaking Bass is not ahead of In a meeting +Happy hours is not ahead of Berth control +Pura vida is in front of Main mistress +Water you lookin'at ? is in front of Breaking Bass +Water you lookin'at ? is in front of Unfathomable +Fishizzle is in front of Hakuna matata +She got the house is not ahead of No worries +Meteor is in front of Pura vida +Hakuna matata is not ahead of Water you lookin'at ? +In a meeting is not ahead of Meteor +Forced family fun is in front of Favorite mistake +Amy's wine-house is in front of In a meeting +No worries is in front of Knot on call +Eggs-ta-Sea is in front of Usain Boat +Unsinkable II is in front of Breaking Bass +Eggs-ta-Sea is in front of Main mistress +Fishizzle is not ahead of Breaking Bass +In a meeting is in front of Water you lookin'at ? +Knot on call is in front of Insubmersible 2 +On the rocks is in front of Island Time +Happy hours is in front of Docked wages +Meteor is not ahead of Docked wages +Docked wages is not ahead of Eggs-ta-Sea +Unfathomable is not ahead of Knot on call +Gypsea is in front of Unsinkable II +Eggs-ta-Sea is in front of Breaking Bass +Island Time is not ahead of Unfathomable +Pura vida is not ahead of In a meeting +No worries is in front of She got the house +Unsinkable II is not ahead of Docked wages +Gypsies on Sea is not ahead of Berth control +Water you lookin'at ? is not ahead of Plan B +Serenity is in front of Amy's wine-house +Rock bottom is in front of Gypsies on Sea +Usain Boat is in front of Liquid asset +Hakuna matata is not ahead of She got the house +Island Time is not ahead of Fishizzle +Piece of ship is in front of Berth control +Happy hours is in front of Insubmersible 2 +Favorite mistake is in front of In solvant Sea +Unfathomable is in front of Main mistress +Irish wake is in front of Plan B +Usain Boat is not ahead of Unsinkable II +On the rocks is not ahead of Main mistress +Piece of ship is not ahead of Amy's wine-house +Piece of ship is not ahead of Eggs-ta-Sea +Insubmersible 2 is not ahead of Unsinkable II +Gypsies on Sea is not ahead of Unfathomable diff --git a/problems/boatraceanalysis/data/secret/2.ans b/problems/boatraceanalysis/data/secret/2.ans new file mode 100644 index 0000000..92e5115 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/2.ans @@ -0,0 +1,3 @@ +A +_ C +_ _ D diff --git a/problems/boatraceanalysis/data/secret/2.in b/problems/boatraceanalysis/data/secret/2.in new file mode 100644 index 0000000..33601ce --- /dev/null +++ b/problems/boatraceanalysis/data/secret/2.in @@ -0,0 +1,3 @@ +2 +D is in front of C +C is in front of A diff --git a/problems/boatraceanalysis/data/secret/3.ans b/problems/boatraceanalysis/data/secret/3.ans new file mode 100644 index 0000000..6ba7e94 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/3.ans @@ -0,0 +1,4 @@ +_ d +g +_ _ i +_ w diff --git a/problems/boatraceanalysis/data/secret/3.in b/problems/boatraceanalysis/data/secret/3.in new file mode 100644 index 0000000..a534754 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/3.in @@ -0,0 +1,6 @@ +5 +d is not ahead of i +w is in front of g +g is not ahead of w +i is in front of d +d is in front of g diff --git a/problems/boatraceanalysis/data/secret/4.ans b/problems/boatraceanalysis/data/secret/4.ans new file mode 100644 index 0000000..ed083d6 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/4.ans @@ -0,0 +1,4 @@ +E +_ p +_ t +_ _ v diff --git a/problems/boatraceanalysis/data/secret/4.in b/problems/boatraceanalysis/data/secret/4.in new file mode 100644 index 0000000..f9f75a2 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/4.in @@ -0,0 +1,6 @@ +5 +E is not ahead of p +t is in front of E +v is in front of t +p is in front of E +t is not ahead of v diff --git a/problems/boatraceanalysis/data/secret/5.ans b/problems/boatraceanalysis/data/secret/5.ans new file mode 100644 index 0000000..9240b48 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/5.ans @@ -0,0 +1,2 @@ +e is not ahead of f +e is in front of f diff --git a/problems/boatraceanalysis/data/secret/5.in b/problems/boatraceanalysis/data/secret/5.in new file mode 100644 index 0000000..89b54f9 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/5.in @@ -0,0 +1,3 @@ +2 +e is not ahead of f +e is in front of f diff --git a/problems/boatraceanalysis/data/secret/6.ans b/problems/boatraceanalysis/data/secret/6.ans new file mode 100644 index 0000000..2956996 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/6.ans @@ -0,0 +1,2 @@ +G is in front of W +G is not ahead of W diff --git a/problems/boatraceanalysis/data/secret/6.in b/problems/boatraceanalysis/data/secret/6.in new file mode 100644 index 0000000..9a6aeec --- /dev/null +++ b/problems/boatraceanalysis/data/secret/6.in @@ -0,0 +1,3 @@ +2 +G is in front of W +G is not ahead of W diff --git a/problems/boatraceanalysis/data/secret/7.ans b/problems/boatraceanalysis/data/secret/7.ans new file mode 100644 index 0000000..b3034c5 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/7.ans @@ -0,0 +1,6 @@ +B +_ _ c +_ _ J +_ _ K +q +_ Y diff --git a/problems/boatraceanalysis/data/secret/7.in b/problems/boatraceanalysis/data/secret/7.in new file mode 100644 index 0000000..ad568fe --- /dev/null +++ b/problems/boatraceanalysis/data/secret/7.in @@ -0,0 +1,11 @@ +10 +J is in front of Y +B is not ahead of q +K is in front of q +q is not ahead of J +c is in front of B +B is not ahead of K +Y is not ahead of K +Y is in front of B +c is not ahead of K +c is in front of Y diff --git a/problems/boatraceanalysis/data/secret/8.ans b/problems/boatraceanalysis/data/secret/8.ans new file mode 100644 index 0000000..11ca192 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/8.ans @@ -0,0 +1,6 @@ +_ _ A +e +_ _ G +_ _ j +_ L +s diff --git a/problems/boatraceanalysis/data/secret/8.in b/problems/boatraceanalysis/data/secret/8.in new file mode 100644 index 0000000..5b293c5 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/8.in @@ -0,0 +1,11 @@ +10 +s is not ahead of e +e is not ahead of G +A is not ahead of j +j is in front of e +A is in front of L +L is not ahead of j +G is in front of L +A is in front of s +s is not ahead of j +L is in front of s diff --git a/problems/boatraceanalysis/data/secret/9.ans b/problems/boatraceanalysis/data/secret/9.ans new file mode 100644 index 0000000..808037b --- /dev/null +++ b/problems/boatraceanalysis/data/secret/9.ans @@ -0,0 +1,3 @@ +Aboat time +_ Beeracuda +_ Error 404 Fish not found diff --git a/problems/boatraceanalysis/data/secret/9.in b/problems/boatraceanalysis/data/secret/9.in new file mode 100644 index 0000000..6dc59d3 --- /dev/null +++ b/problems/boatraceanalysis/data/secret/9.in @@ -0,0 +1,3 @@ +2 +Beeracuda is in front of Aboat time +Error 404 Fish not found is in front of Aboat time diff --git a/problems/boatraceanalysis/domjudge-problem.ini b/problems/boatraceanalysis/domjudge-problem.ini new file mode 100644 index 0000000..8a40d74 --- /dev/null +++ b/problems/boatraceanalysis/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Boat Race Analysis" +timelimit = 3 +points = 2 diff --git a/problems/boatraceanalysis/problem.pdf b/problems/boatraceanalysis/problem.pdf Binary files differnew file mode 100644 index 0000000..af74fb9 --- /dev/null +++ b/problems/boatraceanalysis/problem.pdf diff --git a/problems/budgettraveler.py b/problems/budgettraveler.py new file mode 100644 index 0000000..40da77e --- /dev/null +++ b/problems/budgettraveler.py @@ -0,0 +1,18 @@ +def min_countries_to_visit(n, countries): + total_attractions = sum(y for _, y in countries) + countries.sort(key=lambda x: x[1], reverse=True) + attractions_count = 0 + countries_visited = 0 + half_attractions = total_attractions / 2 + + for _, attractions in countries: + attractions_count += attractions + countries_visited += 1 + if attractions_count >= half_attractions: + break + + return countries_visited + +n = int(input()) +countries = [tuple(map(int, input().split())) for _ in range(n)] +print(min_countries_to_visit(n, countries)) diff --git a/problems/budgettraveler/attachments/template.c b/problems/budgettraveler/attachments/template.c new file mode 100644 index 0000000..4d569ff --- /dev/null +++ b/problems/budgettraveler/attachments/template.c @@ -0,0 +1,22 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int n; + scanf("%d", &n); + for (int i = 0; i < n; i++) { + int x; + int y; + scanf("%d%d", &x, &y); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("answer\n"); + + return 0; +} diff --git a/problems/budgettraveler/attachments/template.cpp b/problems/budgettraveler/attachments/template.cpp new file mode 100644 index 0000000..333402d --- /dev/null +++ b/problems/budgettraveler/attachments/template.cpp @@ -0,0 +1,22 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + int x; + int y; + cin >> x >> y; cin.ignore(); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "answer" << endl; +} diff --git a/problems/budgettraveler/attachments/template.java b/problems/budgettraveler/attachments/template.java new file mode 100644 index 0000000..16d6678 --- /dev/null +++ b/problems/budgettraveler/attachments/template.java @@ -0,0 +1,20 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int n = in.nextInt(); + for (int i = 0; i < n; i++) { + int x = in.nextInt(); + int y = in.nextInt(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("answer"); + } +} diff --git a/problems/budgettraveler/attachments/template.js b/problems/budgettraveler/attachments/template.js new file mode 100644 index 0000000..3ad3bac --- /dev/null +++ b/problems/budgettraveler/attachments/template.js @@ -0,0 +1,11 @@ +const n = parseInt(readline()); +for (let i = 0; i < n; i++) { + var inputs = readline().split(' '); + const x = parseInt(inputs[0]); + const y = parseInt(inputs[1]); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('answer'); diff --git a/problems/budgettraveler/attachments/template.py b/problems/budgettraveler/attachments/template.py new file mode 100644 index 0000000..235276d --- /dev/null +++ b/problems/budgettraveler/attachments/template.py @@ -0,0 +1,11 @@ +import sys +import math + +n = int(input()) +for i in range(n): + x, y = [int(j) for j in input().split()] + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("answer") diff --git a/problems/budgettraveler/data/secret/1.ans b/problems/budgettraveler/data/secret/1.ans new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/problems/budgettraveler/data/secret/1.ans @@ -0,0 +1 @@ +1 diff --git a/problems/budgettraveler/data/secret/1.in b/problems/budgettraveler/data/secret/1.in new file mode 100644 index 0000000..2a8ae89 --- /dev/null +++ b/problems/budgettraveler/data/secret/1.in @@ -0,0 +1,4 @@ +3 +1 2 +2 3 +3 1 diff --git a/problems/budgettraveler/data/secret/2.ans b/problems/budgettraveler/data/secret/2.ans new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/problems/budgettraveler/data/secret/2.ans @@ -0,0 +1 @@ +2 diff --git a/problems/budgettraveler/data/secret/2.in b/problems/budgettraveler/data/secret/2.in new file mode 100644 index 0000000..c0cbc06 --- /dev/null +++ b/problems/budgettraveler/data/secret/2.in @@ -0,0 +1,6 @@ +5 +1 1 +2 6 +3 9 +4 3 +5 7 diff --git a/problems/budgettraveler/data/secret/3.ans b/problems/budgettraveler/data/secret/3.ans new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/problems/budgettraveler/data/secret/3.ans @@ -0,0 +1 @@ +4 diff --git a/problems/budgettraveler/data/secret/3.in b/problems/budgettraveler/data/secret/3.in new file mode 100644 index 0000000..c42fe7b --- /dev/null +++ b/problems/budgettraveler/data/secret/3.in @@ -0,0 +1,11 @@ +10 +1 5 +2 1 +3 3 +4 5 +5 3 +6 5 +7 9 +8 7 +9 5 +10 6 diff --git a/problems/budgettraveler/data/secret/4.ans b/problems/budgettraveler/data/secret/4.ans new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/problems/budgettraveler/data/secret/4.ans @@ -0,0 +1 @@ +5 diff --git a/problems/budgettraveler/data/secret/4.in b/problems/budgettraveler/data/secret/4.in new file mode 100644 index 0000000..33b7c59 --- /dev/null +++ b/problems/budgettraveler/data/secret/4.in @@ -0,0 +1,16 @@ +15 +1 3 +2 2 +3 7 +4 3 +5 1 +6 7 +7 6 +8 4 +9 5 +10 6 +11 1 +12 9 +13 10 +14 10 +15 7 diff --git a/problems/budgettraveler/data/secret/5.ans b/problems/budgettraveler/data/secret/5.ans new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/problems/budgettraveler/data/secret/5.ans @@ -0,0 +1 @@ +7 diff --git a/problems/budgettraveler/data/secret/5.in b/problems/budgettraveler/data/secret/5.in new file mode 100644 index 0000000..3fbd709 --- /dev/null +++ b/problems/budgettraveler/data/secret/5.in @@ -0,0 +1,21 @@ +20 +1 5 +2 8 +3 6 +4 6 +5 9 +6 5 +7 6 +8 8 +9 6 +10 10 +11 2 +12 5 +13 2 +14 3 +15 2 +16 5 +17 4 +18 1 +19 10 +20 6 diff --git a/problems/budgettraveler/data/secret/6.ans b/problems/budgettraveler/data/secret/6.ans new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/problems/budgettraveler/data/secret/6.ans @@ -0,0 +1 @@ +8 diff --git a/problems/budgettraveler/data/secret/6.in b/problems/budgettraveler/data/secret/6.in new file mode 100644 index 0000000..94543ed --- /dev/null +++ b/problems/budgettraveler/data/secret/6.in @@ -0,0 +1,26 @@ +25 +1 3 +2 8 +3 8 +4 9 +5 2 +6 5 +7 1 +8 2 +9 6 +10 5 +11 1 +12 5 +13 9 +14 1 +15 4 +16 3 +17 3 +18 6 +19 9 +20 8 +21 8 +22 5 +23 1 +24 2 +25 8 diff --git a/problems/budgettraveler/data/secret/7.ans b/problems/budgettraveler/data/secret/7.ans new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/problems/budgettraveler/data/secret/7.ans @@ -0,0 +1 @@ +7 diff --git a/problems/budgettraveler/data/secret/7.in b/problems/budgettraveler/data/secret/7.in new file mode 100644 index 0000000..46c7016 --- /dev/null +++ b/problems/budgettraveler/data/secret/7.in @@ -0,0 +1,26 @@ +25 +1 6 +2 7 +3 1 +4 9 +5 1 +6 3 +7 9 +8 3 +9 1 +10 2 +11 1 +12 3 +13 6 +14 3 +15 2 +16 9 +17 2 +18 4 +19 7 +20 1 +21 3 +22 6 +23 5 +24 1 +25 6 diff --git a/problems/budgettraveler/data/secret/8.ans b/problems/budgettraveler/data/secret/8.ans new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/problems/budgettraveler/data/secret/8.ans @@ -0,0 +1 @@ +1 diff --git a/problems/budgettraveler/data/secret/8.in b/problems/budgettraveler/data/secret/8.in new file mode 100644 index 0000000..08bccbe --- /dev/null +++ b/problems/budgettraveler/data/secret/8.in @@ -0,0 +1,4 @@ +3 +1 2 +2 4 +3 6 diff --git a/problems/budgettraveler/domjudge-problem.ini b/problems/budgettraveler/domjudge-problem.ini new file mode 100644 index 0000000..b5a1443 --- /dev/null +++ b/problems/budgettraveler/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Budget Traveler" +timelimit = 3 +points = 2 diff --git a/problems/budgettraveler/problem.pdf b/problems/budgettraveler/problem.pdf Binary files differnew file mode 100644 index 0000000..c6a40d1 --- /dev/null +++ b/problems/budgettraveler/problem.pdf diff --git a/problems/cellsdoctor/attachments/template.c b/problems/cellsdoctor/attachments/template.c new file mode 100644 index 0000000..b4fbdd8 --- /dev/null +++ b/problems/cellsdoctor/attachments/template.c @@ -0,0 +1,18 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int iteration; + scanf("%d", &iteration); + int size; + scanf("%d", &size); fgetc(stdin); + for (int i = 0; i < size; i++) { + char ROW[1025]; + scanf("%[^\n]", ROW); fgetc(stdin); + } + + return 0; +} diff --git a/problems/cellsdoctor/attachments/template.cpp b/problems/cellsdoctor/attachments/template.cpp new file mode 100644 index 0000000..12215d4 --- /dev/null +++ b/problems/cellsdoctor/attachments/template.cpp @@ -0,0 +1,18 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int iteration; + cin >> iteration; cin.ignore(); + int size; + cin >> size; cin.ignore(); + for (int i = 0; i < size; i++) { + string row; + getline(cin, row); + } +} diff --git a/problems/cellsdoctor/attachments/template.java b/problems/cellsdoctor/attachments/template.java new file mode 100644 index 0000000..34aa8be --- /dev/null +++ b/problems/cellsdoctor/attachments/template.java @@ -0,0 +1,18 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int iteration = in.nextInt(); + int size = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < size; i++) { + String ROW = in.nextLine(); + } + } +} diff --git a/problems/cellsdoctor/attachments/template.js b/problems/cellsdoctor/attachments/template.js new file mode 100644 index 0000000..6f216c1 --- /dev/null +++ b/problems/cellsdoctor/attachments/template.js @@ -0,0 +1,5 @@ +const iteration = parseInt(readline()); +const size = parseInt(readline()); +for (let i = 0; i < size; i++) { + const ROW = readline(); +} diff --git a/problems/cellsdoctor/attachments/template.py b/problems/cellsdoctor/attachments/template.py new file mode 100644 index 0000000..ec4f583 --- /dev/null +++ b/problems/cellsdoctor/attachments/template.py @@ -0,0 +1,7 @@ +import sys +import math + +iteration = int(input()) +size = int(input()) +for i in range(size): + row = input() diff --git a/problems/cellsdoctor/data/secret/1.ans b/problems/cellsdoctor/data/secret/1.ans new file mode 100644 index 0000000..dfae8a0 --- /dev/null +++ b/problems/cellsdoctor/data/secret/1.ans @@ -0,0 +1,5 @@ +..... +..... +.XXX. +..... +..... diff --git a/problems/cellsdoctor/data/secret/1.in b/problems/cellsdoctor/data/secret/1.in new file mode 100644 index 0000000..ac657b9 --- /dev/null +++ b/problems/cellsdoctor/data/secret/1.in @@ -0,0 +1,7 @@ +2 +5 +..... +..X.. +.X.X. +..... +...X. diff --git a/problems/cellsdoctor/data/secret/2.ans b/problems/cellsdoctor/data/secret/2.ans new file mode 100644 index 0000000..cf0d93e --- /dev/null +++ b/problems/cellsdoctor/data/secret/2.ans @@ -0,0 +1,4 @@ +...X.. +..X... +..X..X +....X. diff --git a/problems/cellsdoctor/data/secret/2.in b/problems/cellsdoctor/data/secret/2.in new file mode 100644 index 0000000..b075785 --- /dev/null +++ b/problems/cellsdoctor/data/secret/2.in @@ -0,0 +1,6 @@ +0 +4 +...X.. +..X... +..X..X +....X. diff --git a/problems/cellsdoctor/data/secret/3.ans b/problems/cellsdoctor/data/secret/3.ans new file mode 100644 index 0000000..f08f827 --- /dev/null +++ b/problems/cellsdoctor/data/secret/3.ans @@ -0,0 +1,10 @@ +.......... +.......... +.....XXX.. +....X...X. +...X.....X +....X...X. +.....XXX.. +.......... +.......... +.......... diff --git a/problems/cellsdoctor/data/secret/3.in b/problems/cellsdoctor/data/secret/3.in new file mode 100644 index 0000000..989805e --- /dev/null +++ b/problems/cellsdoctor/data/secret/3.in @@ -0,0 +1,12 @@ +2 +10 +.......... +.......... +.......... +.......... +...XXXXXXX +.......... +.......... +.......... +.......... +.......... diff --git a/problems/cellsdoctor/data/secret/4.ans b/problems/cellsdoctor/data/secret/4.ans new file mode 100644 index 0000000..f03a1ec --- /dev/null +++ b/problems/cellsdoctor/data/secret/4.ans @@ -0,0 +1,10 @@ +.......... +.......... +.......... +.....X.... +.XX.X.X... +.XX....... +....X..... +.....XXX.. +.....X.X.. +.......... diff --git a/problems/cellsdoctor/data/secret/4.in b/problems/cellsdoctor/data/secret/4.in new file mode 100644 index 0000000..2bf5dd7 --- /dev/null +++ b/problems/cellsdoctor/data/secret/4.in @@ -0,0 +1,12 @@ +20 +10 +.......... +.......... +.......... +.......... +...XXXXXXX +.......... +.......... +.......... +.......... +.......... diff --git a/problems/cellsdoctor/data/secret/5.ans b/problems/cellsdoctor/data/secret/5.ans new file mode 100644 index 0000000..cea9eb4 --- /dev/null +++ b/problems/cellsdoctor/data/secret/5.ans @@ -0,0 +1,20 @@ +.......................... +.......................... +.......................... +.......................... +.....................X.... +.......................... +....X..................... +...X..X.....X............. +...X...X....X..........X.. +.......X....X............. +....XX..X..............X.. +....XXXXXX....XXX.....XXX. +....XX..X................. +.......X....X............. +...X...X....X............. +...X..X.....X............. +....X..................... +.......................... +.......................... +.......................... diff --git a/problems/cellsdoctor/data/secret/5.in b/problems/cellsdoctor/data/secret/5.in new file mode 100644 index 0000000..20291b9 --- /dev/null +++ b/problems/cellsdoctor/data/secret/5.in @@ -0,0 +1,22 @@ +20 +20 +.......................... +.......................... +.......................... +.......................... +...X........X........X.... +.......................... +.......................... +............X............. +...X...................X.. +..X....................... +....X.......X..........X.. +..XXX.......XX........XXX. +............X............. +.......................... +.......................... +.......................... +.......................... +.......................... +.......................... +............X............. diff --git a/problems/cellsdoctor/data/secret/6.ans b/problems/cellsdoctor/data/secret/6.ans new file mode 100644 index 0000000..edb7466 --- /dev/null +++ b/problems/cellsdoctor/data/secret/6.ans @@ -0,0 +1,20 @@ +.......................... +.......................... +.......................... +.......................... +.....................X.... +.......................... +...........XX............. +...........XX............. +.......................X.. +.......................... +.......................X.. +......................XXX. +.......................... +.......................... +.......................... +...........XX............. +...........XX............. +.......................... +.......................... +.......................... diff --git a/problems/cellsdoctor/data/secret/6.in b/problems/cellsdoctor/data/secret/6.in new file mode 100644 index 0000000..f934665 --- /dev/null +++ b/problems/cellsdoctor/data/secret/6.in @@ -0,0 +1,22 @@ +50 +20 +.......................... +.......................... +.......................... +.......................... +...X........X........X.... +.......................... +.......................... +............X............. +...X...................X.. +..X....................... +....X.......X..........X.. +..XXX.......XX........XXX. +............X............. +.......................... +.......................... +.......................... +.......................... +.......................... +.......................... +............X............. diff --git a/problems/cellsdoctor/data/secret/7.ans b/problems/cellsdoctor/data/secret/7.ans new file mode 100644 index 0000000..86db0f6 --- /dev/null +++ b/problems/cellsdoctor/data/secret/7.ans @@ -0,0 +1,30 @@ +.............................. +.............................. +.............................. +..........X................... +.........X.................... +........X..................... +.......X...............XX..... +......X...............XXX..... +.....X................XXX..... +....X.................X....... +...X.................X........ +..X.................X......... +XXX...............XXX......... +XXX...............XXX......... +XXX...............XXX......... +..X.................X......... +...X.................X........ +....X.................X....... +.....X................XXX..... +......X...............XXX..... +.......X...............XX..... +........X..................... +.........X.................... +..........X................... +.............................. +.............................. +.............................. +.............................. +.............................. +.............................. diff --git a/problems/cellsdoctor/data/secret/7.in b/problems/cellsdoctor/data/secret/7.in new file mode 100644 index 0000000..982e1f0 --- /dev/null +++ b/problems/cellsdoctor/data/secret/7.in @@ -0,0 +1,32 @@ +2 +30 +.............................. +............X................. +...........X.................. +..........X................... +.........X..........X......... +........X.............X....... +.......X...............X...... +......X.................X..... +.....X.................X...... +....X.................X....... +...X.................X........ +..X.................X......... +.X.................X.......... +X.................X........... +.X.................X.......... +..X.................X......... +...X.................X........ +....X.................X....... +.....X.................X...... +......X.................X..... +.......X...............X...... +........X.............X....... +.........X..........X......... +..........X................... +...........X.................. +............X................. +.............................. +.............................. +.............................. +.............................. diff --git a/problems/cellsdoctor/data/secret/8.ans b/problems/cellsdoctor/data/secret/8.ans new file mode 100644 index 0000000..d72a167 --- /dev/null +++ b/problems/cellsdoctor/data/secret/8.ans @@ -0,0 +1,29 @@ +.............................. +.............................. +.............................. +.............................. +.............................. +.............................. +.....................XX....... +....................X..XX..... +.........................X.... +...........XX......X..XX.X.... +.......X..X.....XX.XXX.XXX.... +......XXX.XX...X..XX.......... +.....XX.XXXXX.X....X.......... +......XXX.XX...X..XX.......... +.......X..X.....XX.XXX.XXX.... +...........XX......X..XX.X.... +.........................X.... +....................X..XX..... +.....................XX....... +.............................. +.............................. +.............................. +.............................. +.............................. +.............................. +.............................. +.............................. +.............................. +.............................. diff --git a/problems/cellsdoctor/data/secret/8.in b/problems/cellsdoctor/data/secret/8.in new file mode 100644 index 0000000..7ae1411 --- /dev/null +++ b/problems/cellsdoctor/data/secret/8.in @@ -0,0 +1,32 @@ +18 +30 +.............................. +............X................. +...........X.................. +..........X................... +.........X..........X......... +........X.............X....... +.......X...............X...... +......X.................X..... +.....X.................X...... +....X.................X....... +...X.................X........ +..X.................X......... +.X.................X.......... +X.................X........... +.X.................X.......... +..X.................X......... +...X.................X........ +....X.................X....... +.....X.................X...... +......X.................X..... +.......X...............X...... +........X.............X....... +.........X..........X......... +..........X................... +...........X.................. +............X................. +.............................. +.............................. +.............................. +.............................. diff --git a/problems/cellsdoctor/domjudge-problem.ini b/problems/cellsdoctor/domjudge-problem.ini new file mode 100644 index 0000000..9208b24 --- /dev/null +++ b/problems/cellsdoctor/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Cell's Doctor" +timelimit = 6 +points = 2 diff --git a/problems/cellsdoctor/problem.pdf b/problems/cellsdoctor/problem.pdf Binary files differnew file mode 100644 index 0000000..7578a48 --- /dev/null +++ b/problems/cellsdoctor/problem.pdf diff --git a/problems/chainwords.py b/problems/chainwords.py new file mode 100644 index 0000000..7e3794f --- /dev/null +++ b/problems/chainwords.py @@ -0,0 +1,35 @@ +def can_win(words, current_word, used_words, memo): + state = (current_word, tuple(used_words)) + if state in memo: + return memo[state] + + last_char = current_word[-1] if current_word else None + + for i, word in enumerate(words): + if not used_words[i] and (last_char is None or word[0] == last_char): + used_words[i] = True + if not can_win(words, word, used_words, memo): + used_words[i] = False + memo[state] = True + return True + used_words[i] = False + + memo[state] = False + return False + +def determine_winner(words): + n = len(words) + used_words = [False] * n + memo = {} + + if can_win(words, None, used_words, memo): + return "Alice" + else: + return "Bob" + +# Read input +n = int(input()) +words = [input().strip() for _ in range(n)] + +# Determine the winner +print(determine_winner(words)) diff --git a/problems/chainwords/attachments/template.c b/problems/chainwords/attachments/template.c new file mode 100644 index 0000000..e933710 --- /dev/null +++ b/problems/chainwords/attachments/template.c @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int N; + scanf("%d", &N); fgetc(stdin); + for (int i = 0; i < N; i++) { + char word[13]; + scanf("%[^\n]", word); fgetc(stdin); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("winner\n"); + + return 0; +} diff --git a/problems/chainwords/attachments/template.cpp b/problems/chainwords/attachments/template.cpp new file mode 100644 index 0000000..b9af1d8 --- /dev/null +++ b/problems/chainwords/attachments/template.cpp @@ -0,0 +1,21 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + string word; + getline(cin, word); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "winner" << endl; +} diff --git a/problems/chainwords/attachments/template.java b/problems/chainwords/attachments/template.java new file mode 100644 index 0000000..90891b9 --- /dev/null +++ b/problems/chainwords/attachments/template.java @@ -0,0 +1,22 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int N = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < N; i++) { + String word = in.nextLine(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("winner"); + } +} diff --git a/problems/chainwords/attachments/template.js b/problems/chainwords/attachments/template.js new file mode 100644 index 0000000..a75fedb --- /dev/null +++ b/problems/chainwords/attachments/template.js @@ -0,0 +1,9 @@ +const N = parseInt(readline()); +for (let i = 0; i < N; i++) { + const word = readline(); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('winner'); diff --git a/problems/chainwords/attachments/template.py b/problems/chainwords/attachments/template.py new file mode 100644 index 0000000..e4374f1 --- /dev/null +++ b/problems/chainwords/attachments/template.py @@ -0,0 +1,11 @@ +import sys +import math + +n = int(input()) +for i in range(n): + word = input() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("winner") diff --git a/problems/chainwords/data/secret/1.ans b/problems/chainwords/data/secret/1.ans new file mode 100644 index 0000000..08b6485 --- /dev/null +++ b/problems/chainwords/data/secret/1.ans @@ -0,0 +1 @@ +Alice diff --git a/problems/chainwords/data/secret/1.in b/problems/chainwords/data/secret/1.in new file mode 100644 index 0000000..2b8e7c4 --- /dev/null +++ b/problems/chainwords/data/secret/1.in @@ -0,0 +1,5 @@ +4 +dog +cat +goat +toad diff --git a/problems/chainwords/data/secret/10.ans b/problems/chainwords/data/secret/10.ans new file mode 100644 index 0000000..08b6485 --- /dev/null +++ b/problems/chainwords/data/secret/10.ans @@ -0,0 +1 @@ +Alice diff --git a/problems/chainwords/data/secret/10.in b/problems/chainwords/data/secret/10.in new file mode 100644 index 0000000..a996044 --- /dev/null +++ b/problems/chainwords/data/secret/10.in @@ -0,0 +1,13 @@ +12 +apple +banana +eggplant +elderberry +lemon +lychee +mango +nectarine +orange +pineapple +tangerine +yam diff --git a/problems/chainwords/data/secret/11.ans b/problems/chainwords/data/secret/11.ans new file mode 100644 index 0000000..08b6485 --- /dev/null +++ b/problems/chainwords/data/secret/11.ans @@ -0,0 +1 @@ +Alice diff --git a/problems/chainwords/data/secret/11.in b/problems/chainwords/data/secret/11.in new file mode 100644 index 0000000..d72152f --- /dev/null +++ b/problems/chainwords/data/secret/11.in @@ -0,0 +1,17 @@ +16 +albatross +alligator +eagle +elephant +lion +llama +nightingale +narwhal +rooster +raccoon +rat +snake +squirrel +tiger +toucan +turtle diff --git a/problems/chainwords/data/secret/12.ans b/problems/chainwords/data/secret/12.ans new file mode 100644 index 0000000..92e9edc --- /dev/null +++ b/problems/chainwords/data/secret/12.ans @@ -0,0 +1 @@ +Bob diff --git a/problems/chainwords/data/secret/12.in b/problems/chainwords/data/secret/12.in new file mode 100644 index 0000000..ad2c12b --- /dev/null +++ b/problems/chainwords/data/secret/12.in @@ -0,0 +1,17 @@ +16 +kayak +xylograph +hoax +oz +kilowattrel +zero +success +sulfuric +shrubs +kinetic +checkbook +zax +knockback +xyz +crashes +leak diff --git a/problems/chainwords/data/secret/13.ans b/problems/chainwords/data/secret/13.ans new file mode 100644 index 0000000..08b6485 --- /dev/null +++ b/problems/chainwords/data/secret/13.ans @@ -0,0 +1 @@ +Alice diff --git a/problems/chainwords/data/secret/13.in b/problems/chainwords/data/secret/13.in new file mode 100644 index 0000000..3f66e72 --- /dev/null +++ b/problems/chainwords/data/secret/13.in @@ -0,0 +1,17 @@ +16 +tit +tat +text +toot +treat +theft +teapot +toilet +takeout +tonight +teleport +treatment +tournament +transparent +troubleshoot +trolled diff --git a/problems/chainwords/data/secret/14.ans b/problems/chainwords/data/secret/14.ans new file mode 100644 index 0000000..92e9edc --- /dev/null +++ b/problems/chainwords/data/secret/14.ans @@ -0,0 +1 @@ +Bob diff --git a/problems/chainwords/data/secret/14.in b/problems/chainwords/data/secret/14.in new file mode 100644 index 0000000..031f9df --- /dev/null +++ b/problems/chainwords/data/secret/14.in @@ -0,0 +1,17 @@ +16 +ee +eke +eme +ene +ere +eve +ewe +exe +eye +ease +edge +else +eagle +easle +elite +evoke diff --git a/problems/chainwords/data/secret/2.ans b/problems/chainwords/data/secret/2.ans new file mode 100644 index 0000000..08b6485 --- /dev/null +++ b/problems/chainwords/data/secret/2.ans @@ -0,0 +1 @@ +Alice diff --git a/problems/chainwords/data/secret/2.in b/problems/chainwords/data/secret/2.in new file mode 100644 index 0000000..cb87da6 --- /dev/null +++ b/problems/chainwords/data/secret/2.in @@ -0,0 +1,6 @@ +5 +tea +arc +cow +win +not diff --git a/problems/chainwords/data/secret/3.ans b/problems/chainwords/data/secret/3.ans new file mode 100644 index 0000000..08b6485 --- /dev/null +++ b/problems/chainwords/data/secret/3.ans @@ -0,0 +1 @@ +Alice diff --git a/problems/chainwords/data/secret/3.in b/problems/chainwords/data/secret/3.in new file mode 100644 index 0000000..61c1983 --- /dev/null +++ b/problems/chainwords/data/secret/3.in @@ -0,0 +1,2 @@ +1 +codingame diff --git a/problems/chainwords/data/secret/4.ans b/problems/chainwords/data/secret/4.ans new file mode 100644 index 0000000..08b6485 --- /dev/null +++ b/problems/chainwords/data/secret/4.ans @@ -0,0 +1 @@ +Alice diff --git a/problems/chainwords/data/secret/4.in b/problems/chainwords/data/secret/4.in new file mode 100644 index 0000000..25f79ed --- /dev/null +++ b/problems/chainwords/data/secret/4.in @@ -0,0 +1,2 @@ +1 +anepayzprb diff --git a/problems/chainwords/data/secret/5.ans b/problems/chainwords/data/secret/5.ans new file mode 100644 index 0000000..92e9edc --- /dev/null +++ b/problems/chainwords/data/secret/5.ans @@ -0,0 +1 @@ +Bob diff --git a/problems/chainwords/data/secret/5.in b/problems/chainwords/data/secret/5.in new file mode 100644 index 0000000..9888d20 --- /dev/null +++ b/problems/chainwords/data/secret/5.in @@ -0,0 +1,7 @@ +6 +antenna +alpaca +amnesia +agenda +aorta +armada diff --git a/problems/chainwords/data/secret/6.ans b/problems/chainwords/data/secret/6.ans new file mode 100644 index 0000000..92e9edc --- /dev/null +++ b/problems/chainwords/data/secret/6.ans @@ -0,0 +1 @@ +Bob diff --git a/problems/chainwords/data/secret/6.in b/problems/chainwords/data/secret/6.in new file mode 100644 index 0000000..1fd8a27 --- /dev/null +++ b/problems/chainwords/data/secret/6.in @@ -0,0 +1,9 @@ +8 +racer +racecar +regenerator +remover +reservoir +rhymer +roar +rustier diff --git a/problems/chainwords/data/secret/7.ans b/problems/chainwords/data/secret/7.ans new file mode 100644 index 0000000..92e9edc --- /dev/null +++ b/problems/chainwords/data/secret/7.ans @@ -0,0 +1 @@ +Bob diff --git a/problems/chainwords/data/secret/7.in b/problems/chainwords/data/secret/7.in new file mode 100644 index 0000000..7353bd5 --- /dev/null +++ b/problems/chainwords/data/secret/7.in @@ -0,0 +1,9 @@ +8 +argentina +australia +chad +denmark +domrepublic +iran +kiribati +newzealand diff --git a/problems/chainwords/data/secret/8.ans b/problems/chainwords/data/secret/8.ans new file mode 100644 index 0000000..08b6485 --- /dev/null +++ b/problems/chainwords/data/secret/8.ans @@ -0,0 +1 @@ +Alice diff --git a/problems/chainwords/data/secret/8.in b/problems/chainwords/data/secret/8.in new file mode 100644 index 0000000..b2ed1a0 --- /dev/null +++ b/problems/chainwords/data/secret/8.in @@ -0,0 +1,9 @@ +8 +administered +establish +ghetto +hoax +loving +nuclei +outgrow +sleepiest diff --git a/problems/chainwords/data/secret/9.ans b/problems/chainwords/data/secret/9.ans new file mode 100644 index 0000000..92e9edc --- /dev/null +++ b/problems/chainwords/data/secret/9.ans @@ -0,0 +1 @@ +Bob diff --git a/problems/chainwords/data/secret/9.in b/problems/chainwords/data/secret/9.in new file mode 100644 index 0000000..b718d0d --- /dev/null +++ b/problems/chainwords/data/secret/9.in @@ -0,0 +1,13 @@ +12 +league +legends +ahri +aphelios +evelynn +ezreal +irelia +ivern +nami +nidalee +samira +sol diff --git a/problems/chainwords/domjudge-problem.ini b/problems/chainwords/domjudge-problem.ini new file mode 100644 index 0000000..f932d50 --- /dev/null +++ b/problems/chainwords/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Chain Words" +timelimit = 3 +points = 2 diff --git a/problems/chainwords/problem.pdf b/problems/chainwords/problem.pdf Binary files differnew file mode 100644 index 0000000..dc0b221 --- /dev/null +++ b/problems/chainwords/problem.pdf diff --git a/problems/findasafeplace/attachments/template.c b/problems/findasafeplace/attachments/template.c new file mode 100644 index 0000000..8d846ee --- /dev/null +++ b/problems/findasafeplace/attachments/template.c @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int N; + scanf("%d", &N); fgetc(stdin); + for (int i = 0; i < N; i++) { + char ROW[N + 1]; + scanf("%[^\n]", ROW); fgetc(stdin); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("(x,y)\n"); + + return 0; +} diff --git a/problems/findasafeplace/attachments/template.cpp b/problems/findasafeplace/attachments/template.cpp new file mode 100644 index 0000000..12b6649 --- /dev/null +++ b/problems/findasafeplace/attachments/template.cpp @@ -0,0 +1,21 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + string row; + getline(cin, row); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "(x,y)" << endl; +} diff --git a/problems/findasafeplace/attachments/template.java b/problems/findasafeplace/attachments/template.java new file mode 100644 index 0000000..dc062a3 --- /dev/null +++ b/problems/findasafeplace/attachments/template.java @@ -0,0 +1,22 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int N = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < N; i++) { + String ROW = in.nextLine(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("(x,y)"); + } +} diff --git a/problems/findasafeplace/attachments/template.js b/problems/findasafeplace/attachments/template.js new file mode 100644 index 0000000..ecd1555 --- /dev/null +++ b/problems/findasafeplace/attachments/template.js @@ -0,0 +1,9 @@ +const N = parseInt(readline()); +for (let i = 0; i < N; i++) { + const ROW = readline(); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('(x,y)'); diff --git a/problems/findasafeplace/attachments/template.py b/problems/findasafeplace/attachments/template.py new file mode 100644 index 0000000..6ac6923 --- /dev/null +++ b/problems/findasafeplace/attachments/template.py @@ -0,0 +1,11 @@ +import sys +import math + +n = int(input()) +for i in range(n): + row = input() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("(x,y)") diff --git a/problems/findasafeplace/data/secret/1.ans b/problems/findasafeplace/data/secret/1.ans new file mode 100644 index 0000000..bbcda6b --- /dev/null +++ b/problems/findasafeplace/data/secret/1.ans @@ -0,0 +1 @@ +(2,0) diff --git a/problems/findasafeplace/data/secret/1.in b/problems/findasafeplace/data/secret/1.in new file mode 100644 index 0000000..9833708 --- /dev/null +++ b/problems/findasafeplace/data/secret/1.in @@ -0,0 +1,4 @@ +3 +HXX +1XX +XXX diff --git a/problems/findasafeplace/data/secret/10.ans b/problems/findasafeplace/data/secret/10.ans new file mode 100644 index 0000000..0a721e5 --- /dev/null +++ b/problems/findasafeplace/data/secret/10.ans @@ -0,0 +1 @@ +(7,0) diff --git a/problems/findasafeplace/data/secret/10.in b/problems/findasafeplace/data/secret/10.in new file mode 100644 index 0000000..8373f3c --- /dev/null +++ b/problems/findasafeplace/data/secret/10.in @@ -0,0 +1,11 @@ +10 +XXXXXXXXXX +XXXXXXXXXX +XXXX22XXXX +XXXXXXXXXX +XXXXXXXXXX +XXXXXXXXXX +XXXXXXXXXX +XXXXXXXXXX +XXXXXXXXXX +9XXXXHXXX9 diff --git a/problems/findasafeplace/data/secret/11.ans b/problems/findasafeplace/data/secret/11.ans new file mode 100644 index 0000000..4f14842 --- /dev/null +++ b/problems/findasafeplace/data/secret/11.ans @@ -0,0 +1 @@ +(0,11) diff --git a/problems/findasafeplace/data/secret/11.in b/problems/findasafeplace/data/secret/11.in new file mode 100644 index 0000000..382676b --- /dev/null +++ b/problems/findasafeplace/data/secret/11.in @@ -0,0 +1,13 @@ +12 +XXXXXXXXXXXX +X1X1X1X1X1XX +XXXXXXXXXX1X +X1X3X3X3XXXX +XXXXXXXX3X1X +X1X3XXXXXXXX +XXXXXHXX3X1X +X1X3XXXXXXXX +XXXX3X3X3X1X +X1XXXXXXXXXX +XX1X1X1X1X1X +XXXXXXXXXXXX diff --git a/problems/findasafeplace/data/secret/12.ans b/problems/findasafeplace/data/secret/12.ans new file mode 100644 index 0000000..72adf86 --- /dev/null +++ b/problems/findasafeplace/data/secret/12.ans @@ -0,0 +1 @@ +(11,0) diff --git a/problems/findasafeplace/data/secret/12.in b/problems/findasafeplace/data/secret/12.in new file mode 100644 index 0000000..848fa65 --- /dev/null +++ b/problems/findasafeplace/data/secret/12.in @@ -0,0 +1,13 @@ +12 +XXXXXXXXXXXX +XX2X2X2X2XXX +XXXXXXXXX2XX +XX2XX5X5XXXX +XXXX6XXXX2XX +XX2XXXX6XXXX +XXXX5XXXX2XX +XX2XXHX5XXXX +XXXX6X6XX2XX +XX2XXXXXXXXX +XXX2X2X2X2XX +XXXXXXXXXXXX diff --git a/problems/findasafeplace/data/secret/13.ans b/problems/findasafeplace/data/secret/13.ans new file mode 100644 index 0000000..7cda650 --- /dev/null +++ b/problems/findasafeplace/data/secret/13.ans @@ -0,0 +1 @@ +(1,14) diff --git a/problems/findasafeplace/data/secret/13.in b/problems/findasafeplace/data/secret/13.in new file mode 100644 index 0000000..a15ffcf --- /dev/null +++ b/problems/findasafeplace/data/secret/13.in @@ -0,0 +1,16 @@ +15 +XXXXXXXXXXXXXX9 +X4XXX1XXXXX35XX +XXXXXXXXXXXXXXX +9XXX9XXX6XXXXXX +X8XXXXXXXX8XXXX +XXXXX2XX3XXXX7X +XXXXXXXXXXXXXXX +XX1XXXXHXX4XX5X +XXXX3XXXXXXX6XX +XX4XXXX6XXXXXXX +XXX3XXXXXX8XXXX +XXXXXXXXXXXXX9X +XXXX2X5XX3XXXXX +XXXXXXXXXXXX1XX +XXXXXXXXXXX8XXX diff --git a/problems/findasafeplace/data/secret/14.ans b/problems/findasafeplace/data/secret/14.ans new file mode 100644 index 0000000..9b5c7f8 --- /dev/null +++ b/problems/findasafeplace/data/secret/14.ans @@ -0,0 +1 @@ +(14,7) diff --git a/problems/findasafeplace/data/secret/14.in b/problems/findasafeplace/data/secret/14.in new file mode 100644 index 0000000..fda069c --- /dev/null +++ b/problems/findasafeplace/data/secret/14.in @@ -0,0 +1,16 @@ +15 +2XX9XXXXX9XX7XX +XXXXX4XXXXXXXXX +XXXXXXXXXXXXXXX +X9XX4XXXXXXXXX2 +XXXXXXXXXXXX3XX +X9XXX8XXXX4XXXX +XXXXXXXXXXXXXXX +XXXX3XXHXXXXXXX +X3XXXX6XXX3X1XX +XXXX8XXXXXXXXXX +X5XXXXXXXXXXXX1 +XXX8XXX5XX6XXXX +XXXXXXXXXXXXX2X +X9XX5X5X3XXXXXX +XXX1XXXXXX9XXX5 diff --git a/problems/findasafeplace/data/secret/2.ans b/problems/findasafeplace/data/secret/2.ans new file mode 100644 index 0000000..aa8d590 --- /dev/null +++ b/problems/findasafeplace/data/secret/2.ans @@ -0,0 +1 @@ +(0,2) diff --git a/problems/findasafeplace/data/secret/2.in b/problems/findasafeplace/data/secret/2.in new file mode 100644 index 0000000..da88500 --- /dev/null +++ b/problems/findasafeplace/data/secret/2.in @@ -0,0 +1,4 @@ +3 +X1X +HXX +XXX diff --git a/problems/findasafeplace/data/secret/3.ans b/problems/findasafeplace/data/secret/3.ans new file mode 100644 index 0000000..bbcda6b --- /dev/null +++ b/problems/findasafeplace/data/secret/3.ans @@ -0,0 +1 @@ +(2,0) diff --git a/problems/findasafeplace/data/secret/3.in b/problems/findasafeplace/data/secret/3.in new file mode 100644 index 0000000..8ad1ef9 --- /dev/null +++ b/problems/findasafeplace/data/secret/3.in @@ -0,0 +1,6 @@ +5 +XXXXX +XXHXX +2XXX2 +XXXXX +XXXXX diff --git a/problems/findasafeplace/data/secret/4.ans b/problems/findasafeplace/data/secret/4.ans new file mode 100644 index 0000000..6dbd942 --- /dev/null +++ b/problems/findasafeplace/data/secret/4.ans @@ -0,0 +1 @@ +(4,2) diff --git a/problems/findasafeplace/data/secret/4.in b/problems/findasafeplace/data/secret/4.in new file mode 100644 index 0000000..96a769c --- /dev/null +++ b/problems/findasafeplace/data/secret/4.in @@ -0,0 +1,6 @@ +5 +XX2XX +XXXXX +1HXXX +XXXXX +XX2XX diff --git a/problems/findasafeplace/data/secret/5.ans b/problems/findasafeplace/data/secret/5.ans new file mode 100644 index 0000000..2ba9649 --- /dev/null +++ b/problems/findasafeplace/data/secret/5.ans @@ -0,0 +1 @@ +(0,4) diff --git a/problems/findasafeplace/data/secret/5.in b/problems/findasafeplace/data/secret/5.in new file mode 100644 index 0000000..87ee753 --- /dev/null +++ b/problems/findasafeplace/data/secret/5.in @@ -0,0 +1,6 @@ +5 +XXXXX +X1X1X +XHXXX +XX1X1 +XXXXX diff --git a/problems/findasafeplace/data/secret/6.ans b/problems/findasafeplace/data/secret/6.ans new file mode 100644 index 0000000..3f9e8ad --- /dev/null +++ b/problems/findasafeplace/data/secret/6.ans @@ -0,0 +1 @@ +(3,2) diff --git a/problems/findasafeplace/data/secret/6.in b/problems/findasafeplace/data/secret/6.in new file mode 100644 index 0000000..d55aa76 --- /dev/null +++ b/problems/findasafeplace/data/secret/6.in @@ -0,0 +1,6 @@ +5 +1H1X1 +XXXXX +1XXXX +XXXXX +1X1X1 diff --git a/problems/findasafeplace/data/secret/7.ans b/problems/findasafeplace/data/secret/7.ans new file mode 100644 index 0000000..c35f876 --- /dev/null +++ b/problems/findasafeplace/data/secret/7.ans @@ -0,0 +1 @@ +(2,2) diff --git a/problems/findasafeplace/data/secret/7.in b/problems/findasafeplace/data/secret/7.in new file mode 100644 index 0000000..480b654 --- /dev/null +++ b/problems/findasafeplace/data/secret/7.in @@ -0,0 +1,7 @@ +6 +2HXXX3 +XXXXXX +XXXXXX +XXXXXX +XXXXXX +3XXXX2 diff --git a/problems/findasafeplace/data/secret/8.ans b/problems/findasafeplace/data/secret/8.ans new file mode 100644 index 0000000..212675d --- /dev/null +++ b/problems/findasafeplace/data/secret/8.ans @@ -0,0 +1 @@ +(2,3) diff --git a/problems/findasafeplace/data/secret/8.in b/problems/findasafeplace/data/secret/8.in new file mode 100644 index 0000000..2b822f8 --- /dev/null +++ b/problems/findasafeplace/data/secret/8.in @@ -0,0 +1,7 @@ +6 +3XXXX3 +XXXXXX +XXXXXX +XXXXXX +XXHXXX +2XXXX3 diff --git a/problems/findasafeplace/data/secret/9.ans b/problems/findasafeplace/data/secret/9.ans new file mode 100644 index 0000000..a8042b8 --- /dev/null +++ b/problems/findasafeplace/data/secret/9.ans @@ -0,0 +1 @@ +(9,7) diff --git a/problems/findasafeplace/data/secret/9.in b/problems/findasafeplace/data/secret/9.in new file mode 100644 index 0000000..a5f2e82 --- /dev/null +++ b/problems/findasafeplace/data/secret/9.in @@ -0,0 +1,11 @@ +10 +XXXXXXXX1X +XXXXXXXXXX +XXXXXXXXXX +XXXXXXXXXX +9XXXXXXXXX +9HXXXXXXXX +XXXXXXXXXX +XXXXXXXXXX +XXXXXXXXXX +XXXXXXXX1X diff --git a/problems/findasafeplace/domjudge-problem.ini b/problems/findasafeplace/domjudge-problem.ini new file mode 100644 index 0000000..7257f3b --- /dev/null +++ b/problems/findasafeplace/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Find a Safe Place" +timelimit = 3 +points = 2 diff --git a/problems/findasafeplace/problem.pdf b/problems/findasafeplace/problem.pdf Binary files differnew file mode 100644 index 0000000..ebbd134 --- /dev/null +++ b/problems/findasafeplace/problem.pdf diff --git a/problems/findpalindromes.py b/problems/findpalindromes.py new file mode 100644 index 0000000..4a0438e --- /dev/null +++ b/problems/findpalindromes.py @@ -0,0 +1,12 @@ +def check_palindrome(s): + if s == s[::-1]: + return "Strong Palindrome" + elif s.lower() == s.lower()[::-1]: + return "Weak Palindrome" + else: + return "Not a Palindrome" + +n = int(input().strip()) +for _ in range(n): + s = input().strip() + print(check_palindrome(s)) diff --git a/problems/findpalindromes/attachments/template.c b/problems/findpalindromes/attachments/template.c new file mode 100644 index 0000000..cd786d1 --- /dev/null +++ b/problems/findpalindromes/attachments/template.c @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int n; + scanf("%d", &n); fgetc(stdin); + for (int i = 0; i < n; i++) { + char s[257]; + scanf("%[^\n]", s); fgetc(stdin); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("good_luck\n"); + + return 0; +} diff --git a/problems/findpalindromes/attachments/template.cpp b/problems/findpalindromes/attachments/template.cpp new file mode 100644 index 0000000..d984192 --- /dev/null +++ b/problems/findpalindromes/attachments/template.cpp @@ -0,0 +1,21 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + string s; + getline(cin, s); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "good_luck" << endl; +} diff --git a/problems/findpalindromes/attachments/template.java b/problems/findpalindromes/attachments/template.java new file mode 100644 index 0000000..f4c116d --- /dev/null +++ b/problems/findpalindromes/attachments/template.java @@ -0,0 +1,22 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int n = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < n; i++) { + String s = in.nextLine(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("good_luck"); + } +} diff --git a/problems/findpalindromes/attachments/template.js b/problems/findpalindromes/attachments/template.js new file mode 100644 index 0000000..8cc2067 --- /dev/null +++ b/problems/findpalindromes/attachments/template.js @@ -0,0 +1,9 @@ +const n = parseInt(readline()); +for (let i = 0; i < n; i++) { + const s = readline(); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('good_luck'); diff --git a/problems/findpalindromes/attachments/template.py b/problems/findpalindromes/attachments/template.py new file mode 100644 index 0000000..a4d4284 --- /dev/null +++ b/problems/findpalindromes/attachments/template.py @@ -0,0 +1,11 @@ +import sys +import math + +n = int(input()) +for i in range(n): + s = input() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("good_luck") diff --git a/problems/findpalindromes/data/secret/1.ans b/problems/findpalindromes/data/secret/1.ans new file mode 100644 index 0000000..97c28ba --- /dev/null +++ b/problems/findpalindromes/data/secret/1.ans @@ -0,0 +1,2 @@ +Strong Palindrome +Strong Palindrome diff --git a/problems/findpalindromes/data/secret/1.in b/problems/findpalindromes/data/secret/1.in new file mode 100644 index 0000000..666f80d --- /dev/null +++ b/problems/findpalindromes/data/secret/1.in @@ -0,0 +1,3 @@ +2 +kayak +KayaK diff --git a/problems/findpalindromes/data/secret/2.ans b/problems/findpalindromes/data/secret/2.ans new file mode 100644 index 0000000..97c28ba --- /dev/null +++ b/problems/findpalindromes/data/secret/2.ans @@ -0,0 +1,2 @@ +Strong Palindrome +Strong Palindrome diff --git a/problems/findpalindromes/data/secret/2.in b/problems/findpalindromes/data/secret/2.in new file mode 100644 index 0000000..52a4f82 --- /dev/null +++ b/problems/findpalindromes/data/secret/2.in @@ -0,0 +1,3 @@ +2 +azertyuiopoiuytreza +Nah That's'tahT haN diff --git a/problems/findpalindromes/data/secret/3.ans b/problems/findpalindromes/data/secret/3.ans new file mode 100644 index 0000000..73b9190 --- /dev/null +++ b/problems/findpalindromes/data/secret/3.ans @@ -0,0 +1,2 @@ +Weak Palindrome +Weak Palindrome diff --git a/problems/findpalindromes/data/secret/3.in b/problems/findpalindromes/data/secret/3.in new file mode 100644 index 0000000..15e8e79 --- /dev/null +++ b/problems/findpalindromes/data/secret/3.in @@ -0,0 +1,3 @@ +2 +Kayak +hellEh diff --git a/problems/findpalindromes/data/secret/4.ans b/problems/findpalindromes/data/secret/4.ans new file mode 100644 index 0000000..73b9190 --- /dev/null +++ b/problems/findpalindromes/data/secret/4.ans @@ -0,0 +1,2 @@ +Weak Palindrome +Weak Palindrome diff --git a/problems/findpalindromes/data/secret/4.in b/problems/findpalindromes/data/secret/4.in new file mode 100644 index 0000000..1a0eb46 --- /dev/null +++ b/problems/findpalindromes/data/secret/4.in @@ -0,0 +1,3 @@ +2 +azerTYUiopoiuytreza +NAH That's'TAHT haN diff --git a/problems/findpalindromes/data/secret/5.ans b/problems/findpalindromes/data/secret/5.ans new file mode 100644 index 0000000..d957986 --- /dev/null +++ b/problems/findpalindromes/data/secret/5.ans @@ -0,0 +1,6 @@ +Not a Palindrome +Not a Palindrome +Not a Palindrome +Not a Palindrome +Strong Palindrome +Weak Palindrome diff --git a/problems/findpalindromes/data/secret/5.in b/problems/findpalindromes/data/secret/5.in new file mode 100644 index 0000000..151a785 --- /dev/null +++ b/problems/findpalindromes/data/secret/5.in @@ -0,0 +1,7 @@ +6 +bye bye +Not this time! +Ty for reading this btw +Idk if you're struggling with tests, gl +kayak, gotchahctog ,kayak +Anotherehtona diff --git a/problems/findpalindromes/data/secret/6.ans b/problems/findpalindromes/data/secret/6.ans new file mode 100644 index 0000000..93f90f7 --- /dev/null +++ b/problems/findpalindromes/data/secret/6.ans @@ -0,0 +1 @@ +Not a Palindrome diff --git a/problems/findpalindromes/data/secret/6.in b/problems/findpalindromes/data/secret/6.in new file mode 100644 index 0000000..88fe0c3 --- /dev/null +++ b/problems/findpalindromes/data/secret/6.in @@ -0,0 +1,2 @@ +1 +I'm too lazy to do it lol diff --git a/problems/findpalindromes/data/secret/7.ans b/problems/findpalindromes/data/secret/7.ans new file mode 100644 index 0000000..c067956 --- /dev/null +++ b/problems/findpalindromes/data/secret/7.ans @@ -0,0 +1,2 @@ +Strong Palindrome +Weak Palindrome diff --git a/problems/findpalindromes/data/secret/7.in b/problems/findpalindromes/data/secret/7.in new file mode 100644 index 0000000..90ae75b --- /dev/null +++ b/problems/findpalindromes/data/secret/7.in @@ -0,0 +1,3 @@ +2 +BeVentyr6uu6rytneVeB +gvjJkhH6sJjs6HhkJjvg diff --git a/problems/findpalindromes/data/secret/8.ans b/problems/findpalindromes/data/secret/8.ans new file mode 100644 index 0000000..3c6e716 --- /dev/null +++ b/problems/findpalindromes/data/secret/8.ans @@ -0,0 +1,2 @@ +Strong Palindrome +Not a Palindrome diff --git a/problems/findpalindromes/data/secret/8.in b/problems/findpalindromes/data/secret/8.in new file mode 100644 index 0000000..29c553f --- /dev/null +++ b/problems/findpalindromes/data/secret/8.in @@ -0,0 +1,3 @@ +2 +CEcFPblaEBBEalbPFcEC +hell nah that's not diff --git a/problems/findpalindromes/domjudge-problem.ini b/problems/findpalindromes/domjudge-problem.ini new file mode 100644 index 0000000..6287c47 --- /dev/null +++ b/problems/findpalindromes/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Find Palindromes" +timelimit = 3 +points = 2 diff --git a/problems/findpalindromes/problem.pdf b/problems/findpalindromes/problem.pdf Binary files differnew file mode 100644 index 0000000..0adf1a1 --- /dev/null +++ b/problems/findpalindromes/problem.pdf diff --git a/problems/gameofquarters.py b/problems/gameofquarters.py new file mode 100644 index 0000000..8b0f8c1 --- /dev/null +++ b/problems/gameofquarters.py @@ -0,0 +1,26 @@ +def determine_winner(N, rounds): + alice_wins = 0 + bob_wins = 0 + + for round_info in rounds: + alice_seq, bob_seq, coin_tosses = round_info.split() + + alice_index = coin_tosses.find(alice_seq) + bob_index = coin_tosses.find(bob_seq) + + if alice_index != -1 and (bob_index == -1 or alice_index < bob_index): + alice_wins += 1 + elif bob_index != -1 and (alice_index == -1 or bob_index < alice_index): + bob_wins += 1 + + if alice_wins > bob_wins: + return "Alice wins!" + elif bob_wins > alice_wins: + return "Bob wins!" + else: + return "Draw!" + +N = int(input().strip()) +rounds = [input().strip() for _ in range(N)] + +print(determine_winner(N, rounds)) diff --git a/problems/gameofquarters/attachments/template.c b/problems/gameofquarters/attachments/template.c new file mode 100644 index 0000000..24ec6b6 --- /dev/null +++ b/problems/gameofquarters/attachments/template.c @@ -0,0 +1,23 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int number_of_rounds; + scanf("%d", &number_of_rounds); + for (int i = 0; i < number_of_rounds; i++) { + char alice_sequence[4]; + char bob_sequence[4]; + char round_tosses[21]; + scanf("%s%s%s", alice_sequence, bob_sequence, round_tosses); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("WINNER!\n"); + + return 0; +} diff --git a/problems/gameofquarters/attachments/template.cpp b/problems/gameofquarters/attachments/template.cpp new file mode 100644 index 0000000..98a8956 --- /dev/null +++ b/problems/gameofquarters/attachments/template.cpp @@ -0,0 +1,23 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int number_of_rounds; + cin >> number_of_rounds; cin.ignore(); + for (int i = 0; i < number_of_rounds; i++) { + string alice_sequence; + string bob_sequence; + string round_tosses; + cin >> alice_sequence >> bob_sequence >> round_tosses; cin.ignore(); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "WINNER!" << endl; +} diff --git a/problems/gameofquarters/attachments/template.java b/problems/gameofquarters/attachments/template.java new file mode 100644 index 0000000..e2848a8 --- /dev/null +++ b/problems/gameofquarters/attachments/template.java @@ -0,0 +1,21 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int numberOfRounds = in.nextInt(); + for (int i = 0; i < numberOfRounds; i++) { + String aliceSequence = in.next(); + String bobSequence = in.next(); + String roundTosses = in.next(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("WINNER!"); + } +} diff --git a/problems/gameofquarters/attachments/template.js b/problems/gameofquarters/attachments/template.js new file mode 100644 index 0000000..aa2903d --- /dev/null +++ b/problems/gameofquarters/attachments/template.js @@ -0,0 +1,12 @@ +const numberOfRounds = parseInt(readline()); +for (let i = 0; i < numberOfRounds; i++) { + var inputs = readline().split(' '); + const aliceSequence = inputs[0]; + const bobSequence = inputs[1]; + const roundTosses = inputs[2]; +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('WINNER!'); diff --git a/problems/gameofquarters/attachments/template.py b/problems/gameofquarters/attachments/template.py new file mode 100644 index 0000000..461fe27 --- /dev/null +++ b/problems/gameofquarters/attachments/template.py @@ -0,0 +1,11 @@ +import sys +import math + +number_of_rounds = int(input()) +for i in range(number_of_rounds): + alice_sequence, bob_sequence, round_tosses = input().split() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("WINNER!") diff --git a/problems/gameofquarters/data/secret/1.ans b/problems/gameofquarters/data/secret/1.ans new file mode 100644 index 0000000..d41b89c --- /dev/null +++ b/problems/gameofquarters/data/secret/1.ans @@ -0,0 +1 @@ +Bob wins! diff --git a/problems/gameofquarters/data/secret/1.in b/problems/gameofquarters/data/secret/1.in new file mode 100644 index 0000000..1ecc2bd --- /dev/null +++ b/problems/gameofquarters/data/secret/1.in @@ -0,0 +1,2 @@ +1 +HTH TTH HTTHHTHTTHHHTHTHHTHH diff --git a/problems/gameofquarters/data/secret/10.ans b/problems/gameofquarters/data/secret/10.ans new file mode 100644 index 0000000..9b86b04 --- /dev/null +++ b/problems/gameofquarters/data/secret/10.ans @@ -0,0 +1 @@ +Alice wins! diff --git a/problems/gameofquarters/data/secret/10.in b/problems/gameofquarters/data/secret/10.in new file mode 100644 index 0000000..6a6433d --- /dev/null +++ b/problems/gameofquarters/data/secret/10.in @@ -0,0 +1,6 @@ +5 +HTT TTH HTHHHTHHHHTHHHTHHTTT +HTT THH HTTHTHHTHTHHTHTHHTTH +HHT TTT HHHHHTTTHHHTTTHHTHHH +HHH HTH HHHTTTTHHTTTTTHTHTTH +HTH HHH HTHHHTHTTHHHHHHHHTHT diff --git a/problems/gameofquarters/data/secret/11.ans b/problems/gameofquarters/data/secret/11.ans new file mode 100644 index 0000000..d41b89c --- /dev/null +++ b/problems/gameofquarters/data/secret/11.ans @@ -0,0 +1 @@ +Bob wins! diff --git a/problems/gameofquarters/data/secret/11.in b/problems/gameofquarters/data/secret/11.in new file mode 100644 index 0000000..eccc05c --- /dev/null +++ b/problems/gameofquarters/data/secret/11.in @@ -0,0 +1,6 @@ +5 +TTT HTT THTHTTHHTHTHHHHHHTTH +HHT HTH TTHHHHTHTHTTTHTTTTHT +TTH HTH HTTHHTHHTTTTHTTHTTHT +THT HTT HHHHHTTTTHTTHHHHHTTT +TTT THH THHTHTTHTHHHHHHHTHHH diff --git a/problems/gameofquarters/data/secret/12.ans b/problems/gameofquarters/data/secret/12.ans new file mode 100644 index 0000000..d41b89c --- /dev/null +++ b/problems/gameofquarters/data/secret/12.ans @@ -0,0 +1 @@ +Bob wins! diff --git a/problems/gameofquarters/data/secret/12.in b/problems/gameofquarters/data/secret/12.in new file mode 100644 index 0000000..e9b7e09 --- /dev/null +++ b/problems/gameofquarters/data/secret/12.in @@ -0,0 +1,6 @@ +5 +TTH HHT THTHTHTHHHTTTTTHHTTH +HHH TTH TTTHHHTTHTHHHHHHTHTT +TTH HTT TTTTTTHHTTHHHTHHHHTT +TTT TTH THHTHHHTTHTTTTHTHHHT +HHH HHH THTTTTTHHHHTHTTHHTTT diff --git a/problems/gameofquarters/data/secret/13.ans b/problems/gameofquarters/data/secret/13.ans new file mode 100644 index 0000000..bb98aa8 --- /dev/null +++ b/problems/gameofquarters/data/secret/13.ans @@ -0,0 +1 @@ +Draw! diff --git a/problems/gameofquarters/data/secret/13.in b/problems/gameofquarters/data/secret/13.in new file mode 100644 index 0000000..f8ad9d5 --- /dev/null +++ b/problems/gameofquarters/data/secret/13.in @@ -0,0 +1,6 @@ +5 +THH HTH THTHHTHTHTTHTTTTHHTT +THH HHT HTHTHTTHTTHHHHTHTTHT +HHT HTT TTTHTTHTTHTTTHHHHTTT +TTT TTT TTHTHTTHHHHHTTHTHHHT +THT THH TTHTTHHHTTTHHTHTTHHT diff --git a/problems/gameofquarters/data/secret/14.ans b/problems/gameofquarters/data/secret/14.ans new file mode 100644 index 0000000..bb98aa8 --- /dev/null +++ b/problems/gameofquarters/data/secret/14.ans @@ -0,0 +1 @@ +Draw! diff --git a/problems/gameofquarters/data/secret/14.in b/problems/gameofquarters/data/secret/14.in new file mode 100644 index 0000000..fd4473f --- /dev/null +++ b/problems/gameofquarters/data/secret/14.in @@ -0,0 +1,6 @@ +5 +THH HHH THHTHTHTTHHTHHHHHHTT +HHT HTH THTTTTHTTTHTTTTHTTTT +HHT TTT TTHTHTTHTTTTHHHHHTHT +TTH TTH HTHHTTTHTHTHTTTHTHTH +TTT HHH HHTHTHTHTTHTHHTHTHTH diff --git a/problems/gameofquarters/data/secret/15.ans b/problems/gameofquarters/data/secret/15.ans new file mode 100644 index 0000000..9b86b04 --- /dev/null +++ b/problems/gameofquarters/data/secret/15.ans @@ -0,0 +1 @@ +Alice wins! diff --git a/problems/gameofquarters/data/secret/15.in b/problems/gameofquarters/data/secret/15.in new file mode 100644 index 0000000..3660c63 --- /dev/null +++ b/problems/gameofquarters/data/secret/15.in @@ -0,0 +1,21 @@ +20 +THH THH HTTTTTTTTTTTTHHTTHHH +HHT THT HHTHHTTTHTTHTHTHHHHH +THH HHT HHTHTTHHTTTTHHTTHTHT +HTT TTH HHHHTHHTHTHTHTTTHTHH +HHT HHT TTTHTTHHHHHTHTTHTTHH +HHH THH HTHTHTHHHTHHTTHTHTHT +HTT HTT TTTTHTHHTHTHHHHTTTTT +HTH HTT TTHHTHHHHTHHHHTHHHTT +HTH HTH THTTTHTHHHHTHHTHTTHT +TTT TTT THHHHTHHTHTHTHTHTHHT +TTH HTH HHTTHHTHTHHHTTHTHTTH +TTT HHH HTHHHTTHHHTHTHTHTTTT +THH HTT HHHHHTTHHTTHHTHHHTTT +HTT TTH HTTHHHHTHHHTHTHTTTTH +THT HHH TTTHHHTHHHTHTTTHHTHT +TTT THH HTTHHHTTHHTHTTHTHTHT +HHH THT HHHTTHTTHHTTHTTHTHTH +HHH HHT THHTHTTHTHTTHTTHHHHH +THH HTH TTHHHTHHTHTHTTTHTHHT +TTH TTT HTTHTTHTTTHTHTTTHTHT diff --git a/problems/gameofquarters/data/secret/16.ans b/problems/gameofquarters/data/secret/16.ans new file mode 100644 index 0000000..9b86b04 --- /dev/null +++ b/problems/gameofquarters/data/secret/16.ans @@ -0,0 +1 @@ +Alice wins! diff --git a/problems/gameofquarters/data/secret/16.in b/problems/gameofquarters/data/secret/16.in new file mode 100644 index 0000000..f111a96 --- /dev/null +++ b/problems/gameofquarters/data/secret/16.in @@ -0,0 +1,21 @@ +20 +TTH HTT TTHTHHHHHHHTHTHTTHHH +HHT THT TTHTTHHHHHHTTTHHTTTH +TTH HTT HTTHHHTTHHTHTHTHTHHH +HTH HHH HTHTHHHHHTTTTHTTHHTH +THH HTT HTHHTHHHTHTHTHHHHTTT +THH HTH THHHHTHHHTHHHHHHHTTH +THH HTT HHTTHHTHHHHHTTHTHTTH +HHT THT TTHTHTHTTHHTHTHTTHHT +THH THT TTTHTHHTTHHTTHTHHTTT +THH HHH HTHTTHTHTTHHTHHTTHHH +HHH THT HHTTHTHTHHTHHTHTHTHH +THT HHH THHTHTHTTHHHTHHHHTTH +HHH HHT THTHHTHHHTHTHHHTTTTT +HHT THH HTTTTTTTTHHHTTHHTHHT +TTH THH TTHHHHTHHTTHTTTTTTTT +HHT HTH HTTHHHTTTTTHTHTHHHHH +TTT THH TTHTTTTTTHTTTTTTHHHT +HTT TTT HTHHTTHHHHTHTHTHTHTH +TTH HTT HHHHTHHTTTTTHHTTTTTH +HHT HTT TTHHTTTTHTTTTHHHHHTH diff --git a/problems/gameofquarters/data/secret/17.ans b/problems/gameofquarters/data/secret/17.ans new file mode 100644 index 0000000..d41b89c --- /dev/null +++ b/problems/gameofquarters/data/secret/17.ans @@ -0,0 +1 @@ +Bob wins! diff --git a/problems/gameofquarters/data/secret/17.in b/problems/gameofquarters/data/secret/17.in new file mode 100644 index 0000000..ec19b68 --- /dev/null +++ b/problems/gameofquarters/data/secret/17.in @@ -0,0 +1,21 @@ +20 +THT TTT TTHTTHHTTTTTHHHTHTTT +HHT THT HTTTHTHHHHHTHHHTTHHH +HTH TTT THTHTTHHHTTHHTHTHTTT +TTH HHT THTHTTHHTHHHTTTTTHTT +HHT THT THTTTTHHHHHHHTTTHTHT +HHH TTT HHTHTTHTTHHTTTTHHTTT +TTH HTT HTTHHHHTHHHHTHTTTHTT +HTH THT HTTHHTTHHHTHHTHTHHHT +THH TTH HHTHTTHTHHTHHTHHHTTH +TTH THT TTTTHTTHHTHHHHHHHTHT +THH HTH HHTTTHHHTHTHTHHHHHHH +HTH TTH HHTTTTTTTTTTTTHTHHHT +HTH HTH THTTHHTHHTTTTTHHHTTT +HTT THH HTTTTHTHTTTTTTTTHHHH +TTT HHT HTTTHTHTHHTTHHTHTTTH +HHH TTT TTTTTTHHHTTHTHTHHHHH +THH THT TTHTHHHTTTTHHHHHHHTH +HHT HHH HTHTHTHHHHTTTTHHHTTT +THH HHT HHTTTHHTHTHTHHTTTHTH +TTT TTH THTTHTTHTTHTHHTTHHHH diff --git a/problems/gameofquarters/data/secret/18.ans b/problems/gameofquarters/data/secret/18.ans new file mode 100644 index 0000000..d41b89c --- /dev/null +++ b/problems/gameofquarters/data/secret/18.ans @@ -0,0 +1 @@ +Bob wins! diff --git a/problems/gameofquarters/data/secret/18.in b/problems/gameofquarters/data/secret/18.in new file mode 100644 index 0000000..02b1220 --- /dev/null +++ b/problems/gameofquarters/data/secret/18.in @@ -0,0 +1,21 @@ +20 +THH HTH TTHTHTTHHHHTHHTHHTHH +HHT TTH HHHHTTTTHTTTHHHHTTTT +TTH HHH TTHTHHHTTHTHTTHTTTTH +THH HTT THTTTTHTTTTTHTHHTTTH +TTH TTH TTTHTHHHHHHHHTTTHHHH +HTH THT HTHTTHHHTHTHHTHTTTHT +TTH THT THHHTHHHTTTTTHHHTHHH +HTH HHT HHHHTTHTHTTTHHTHHHHH +HHT THH TTTTTTHHTTTTHHHHHTHH +HHH TTT HTTHHTHHTTTTHHTTTHHT +TTT THH TTTTTTHTTTTTTHHTTTHT +THT HHH THTHHHHHTHHHTHHHTHHH +TTT TTH TTHHHHHTTHHTHTTHTTHT +TTT TTT THTHHTHTHTHHTTTHTHHT +THT TTT TTTHTHHTTHTHTTHHTTHT +THT HHT HHTTHTTTHHHTTHHTHHTT +HTH THT HHHHHTTTTTTTHHTTHTHT +TTT THT HHHTTHTHHHHHTHHHTTTT +HHH THT THTHHHHTTHTHTTHHHTHT +TTT HHT HHHHTHHTTTTTTTTHTTTT diff --git a/problems/gameofquarters/data/secret/19.ans b/problems/gameofquarters/data/secret/19.ans new file mode 100644 index 0000000..bb98aa8 --- /dev/null +++ b/problems/gameofquarters/data/secret/19.ans @@ -0,0 +1 @@ +Draw! diff --git a/problems/gameofquarters/data/secret/19.in b/problems/gameofquarters/data/secret/19.in new file mode 100644 index 0000000..28b200d --- /dev/null +++ b/problems/gameofquarters/data/secret/19.in @@ -0,0 +1,21 @@ +20 +TTT HTH HHHHHTTHHTTHTTHHHHHT +THH THT TTHHTHHTHTHHTTHTHTTT +TTT THT HTHTHTTTHHHTTHHTHTTT +HHH TTH HHHTTTTTHHHHHHTTTHTT +HHT TTH TTHHTHHTTHHHTTHHTTTT +THH HTH TTTTTTHHHTHHHHTHHTHH +TTT HTH TTTTTHHHHHHHHHHHTTTH +HTH HHH HTHHTHHTTHHHHTTTTTHH +HHH THH HTHHHHTHTTTTTTHHTTTT +TTT HHT THHHHHHTTHTHTHTTTTHH +HTT TTH THHHHTTHHHTHHHHTTTTH +HHH HTT THTTTTHHHTHTHHHTTTTH +HHT HTT HHHHTTTTTHTTTTHHHHTH +THT TTH HHHTTHHHHTTHTTHHHHHT +HHT HHT THTHHHHTHTTTHTTHTHTT +TTT HTT THTTTTHHHTHHHTTTHTTT +HTT HHH HTHHHTTTTTHHHHHHTHHT +HHT HTT HHTTHHHTTHHHHTTHTHTH +TTT HHT THHHTTHHTTHHHHHTTHTH +THT TTH THTHTHTHHTTHHHHTHTTT diff --git a/problems/gameofquarters/data/secret/2.ans b/problems/gameofquarters/data/secret/2.ans new file mode 100644 index 0000000..9b86b04 --- /dev/null +++ b/problems/gameofquarters/data/secret/2.ans @@ -0,0 +1 @@ +Alice wins! diff --git a/problems/gameofquarters/data/secret/2.in b/problems/gameofquarters/data/secret/2.in new file mode 100644 index 0000000..37b9e97 --- /dev/null +++ b/problems/gameofquarters/data/secret/2.in @@ -0,0 +1,2 @@ +1 +HHT HHH HTTHHTHTTHHHTHTHHTHH diff --git a/problems/gameofquarters/data/secret/20.ans b/problems/gameofquarters/data/secret/20.ans new file mode 100644 index 0000000..bb98aa8 --- /dev/null +++ b/problems/gameofquarters/data/secret/20.ans @@ -0,0 +1 @@ +Draw! diff --git a/problems/gameofquarters/data/secret/20.in b/problems/gameofquarters/data/secret/20.in new file mode 100644 index 0000000..2ff6fbb --- /dev/null +++ b/problems/gameofquarters/data/secret/20.in @@ -0,0 +1,21 @@ +20 +HTT TTH TTHHHTTTHTHTTHHHTHHH +HHH HHH THHHTTHTHTHTHTTTHTHT +HTT HHH THTTHTTTHHTHTHTTHHTT +HHT HTH TTHTTTHTHTTTHTHHHTHT +TTT THT THHTTHHHTTTTHTHHTTTH +HTT HTH HTTTHHHHHHHTTTHTTTHT +TTT HTH THTTTHTTHHHHHTTHHTTT +THT HTH THHHHTHHTHTTHHHTHHHH +THT THT HHTTTHHTTHTHHHTHTTTH +HHH THH THHHTTHTTHTHTHTTHHHT +THT HTT THTTHTTTTTHTHHHHHHHT +HTT TTH THTHHTHTTHHTTTHTHTHT +TTT HTT THTHHHTTHTHHTTHHHTHT +TTT THT THHHTHTHHHTTTTHTHHHH +THH HTT HTTTHTTHTHHTHTTHHHHH +HTT TTT TTTTTTHHHTTHHHTHHHHH +THT TTH HTHHTHTTHTHHTTHHTTTT +HHT HHT TTTHTHHTHTHTHTTHTHTH +THT HTT THTTHTTTTTTTHTHHTHTH +THT THT TTTTHTHTHTHTHHTTHTTT diff --git a/problems/gameofquarters/data/secret/3.ans b/problems/gameofquarters/data/secret/3.ans new file mode 100644 index 0000000..bb98aa8 --- /dev/null +++ b/problems/gameofquarters/data/secret/3.ans @@ -0,0 +1 @@ +Draw! diff --git a/problems/gameofquarters/data/secret/3.in b/problems/gameofquarters/data/secret/3.in new file mode 100644 index 0000000..08ee271 --- /dev/null +++ b/problems/gameofquarters/data/secret/3.in @@ -0,0 +1,2 @@ +1 +HHH TTT HTTHTHTHTHHTHHTHTTHH diff --git a/problems/gameofquarters/data/secret/4.ans b/problems/gameofquarters/data/secret/4.ans new file mode 100644 index 0000000..bb98aa8 --- /dev/null +++ b/problems/gameofquarters/data/secret/4.ans @@ -0,0 +1 @@ +Draw! diff --git a/problems/gameofquarters/data/secret/4.in b/problems/gameofquarters/data/secret/4.in new file mode 100644 index 0000000..8b750c4 --- /dev/null +++ b/problems/gameofquarters/data/secret/4.in @@ -0,0 +1,2 @@ +1 +TTT HHH HTTHTHTHTHHTHHTHTTHH diff --git a/problems/gameofquarters/data/secret/5.ans b/problems/gameofquarters/data/secret/5.ans new file mode 100644 index 0000000..bb98aa8 --- /dev/null +++ b/problems/gameofquarters/data/secret/5.ans @@ -0,0 +1 @@ +Draw! diff --git a/problems/gameofquarters/data/secret/5.in b/problems/gameofquarters/data/secret/5.in new file mode 100644 index 0000000..1a23794 --- /dev/null +++ b/problems/gameofquarters/data/secret/5.in @@ -0,0 +1,2 @@ +1 +TTH TTH THTHHHHHHHTHTHHTTHTT diff --git a/problems/gameofquarters/data/secret/6.ans b/problems/gameofquarters/data/secret/6.ans new file mode 100644 index 0000000..bb98aa8 --- /dev/null +++ b/problems/gameofquarters/data/secret/6.ans @@ -0,0 +1 @@ +Draw! diff --git a/problems/gameofquarters/data/secret/6.in b/problems/gameofquarters/data/secret/6.in new file mode 100644 index 0000000..207799e --- /dev/null +++ b/problems/gameofquarters/data/secret/6.in @@ -0,0 +1,2 @@ +1 +HTT HTT THTHHHHHHHTHTHHTTHTT diff --git a/problems/gameofquarters/data/secret/7.ans b/problems/gameofquarters/data/secret/7.ans new file mode 100644 index 0000000..d41b89c --- /dev/null +++ b/problems/gameofquarters/data/secret/7.ans @@ -0,0 +1 @@ +Bob wins! diff --git a/problems/gameofquarters/data/secret/7.in b/problems/gameofquarters/data/secret/7.in new file mode 100644 index 0000000..3838b61 --- /dev/null +++ b/problems/gameofquarters/data/secret/7.in @@ -0,0 +1,2 @@ +1 +HHH TTT HHTTHTHHTTHTHTTHHTTT diff --git a/problems/gameofquarters/data/secret/8.ans b/problems/gameofquarters/data/secret/8.ans new file mode 100644 index 0000000..9b86b04 --- /dev/null +++ b/problems/gameofquarters/data/secret/8.ans @@ -0,0 +1 @@ +Alice wins! diff --git a/problems/gameofquarters/data/secret/8.in b/problems/gameofquarters/data/secret/8.in new file mode 100644 index 0000000..ff6d304 --- /dev/null +++ b/problems/gameofquarters/data/secret/8.in @@ -0,0 +1,2 @@ +1 +TTT HHH HHTTHTHHTTHTHTTHHTTT diff --git a/problems/gameofquarters/data/secret/9.ans b/problems/gameofquarters/data/secret/9.ans new file mode 100644 index 0000000..9b86b04 --- /dev/null +++ b/problems/gameofquarters/data/secret/9.ans @@ -0,0 +1 @@ +Alice wins! diff --git a/problems/gameofquarters/data/secret/9.in b/problems/gameofquarters/data/secret/9.in new file mode 100644 index 0000000..7219eaf --- /dev/null +++ b/problems/gameofquarters/data/secret/9.in @@ -0,0 +1,6 @@ +5 +THH HTT TTTHHHHTTTHHHTTTTTHT +HHT HHH HTTTHTHHTHTTTHHHTTHT +THT HTH HHTTHTTTTTHTTTHTTTHH +TTH HTT TTTHTTTHTHTTHTTHTTTT +HHH TTH HHTTTTTTHTTHHHHHHHHH diff --git a/problems/gameofquarters/domjudge-problem.ini b/problems/gameofquarters/domjudge-problem.ini new file mode 100644 index 0000000..572f0e0 --- /dev/null +++ b/problems/gameofquarters/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Game of Quarters" +timelimit = 3 +points = 2 diff --git a/problems/gameofquarters/problem.pdf b/problems/gameofquarters/problem.pdf Binary files differnew file mode 100644 index 0000000..c0989c8 --- /dev/null +++ b/problems/gameofquarters/problem.pdf diff --git a/problems/livingorganism.py b/problems/livingorganism.py new file mode 100644 index 0000000..a575200 --- /dev/null +++ b/problems/livingorganism.py @@ -0,0 +1,15 @@ +import math + +def hours_to_cover_dish(radius_cm): + radius_mm = radius_cm * 10 + dish_area_mm2 = math.pi * radius_mm ** 2 + organism_size_mm2 = 1 + hours = 0 + while organism_size_mm2 < dish_area_mm2: + organism_size_mm2 *= 2 + hours += 1 + + return hours + +radius_cm = int(input().strip()) +print(hours_to_cover_dish(radius_cm)) diff --git a/problems/livingorganism/attachments/template.c b/problems/livingorganism/attachments/template.c new file mode 100644 index 0000000..7c0c472 --- /dev/null +++ b/problems/livingorganism/attachments/template.c @@ -0,0 +1,17 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int r; + scanf("%d", &r); + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("duration\n"); + + return 0; +} diff --git a/problems/livingorganism/attachments/template.cpp b/problems/livingorganism/attachments/template.cpp new file mode 100644 index 0000000..2b67cd2 --- /dev/null +++ b/problems/livingorganism/attachments/template.cpp @@ -0,0 +1,17 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int r; + cin >> r; cin.ignore(); + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "duration" << endl; +} diff --git a/problems/livingorganism/attachments/template.java b/problems/livingorganism/attachments/template.java new file mode 100644 index 0000000..1c5aa86 --- /dev/null +++ b/problems/livingorganism/attachments/template.java @@ -0,0 +1,16 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int r = in.nextInt(); + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("duration"); + } +} diff --git a/problems/livingorganism/attachments/template.js b/problems/livingorganism/attachments/template.js new file mode 100644 index 0000000..3ef5612 --- /dev/null +++ b/problems/livingorganism/attachments/template.js @@ -0,0 +1,6 @@ +const r = parseInt(readline()); + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('duration'); diff --git a/problems/livingorganism/attachments/template.py b/problems/livingorganism/attachments/template.py new file mode 100644 index 0000000..9994ca1 --- /dev/null +++ b/problems/livingorganism/attachments/template.py @@ -0,0 +1,9 @@ +import sys +import math + +r = int(input()) + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("duration") diff --git a/problems/livingorganism/data/secret/1.ans b/problems/livingorganism/data/secret/1.ans new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/problems/livingorganism/data/secret/1.ans @@ -0,0 +1 @@ +9 diff --git a/problems/livingorganism/data/secret/1.in b/problems/livingorganism/data/secret/1.in new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/problems/livingorganism/data/secret/1.in @@ -0,0 +1 @@ +1 diff --git a/problems/livingorganism/data/secret/2.ans b/problems/livingorganism/data/secret/2.ans new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/problems/livingorganism/data/secret/2.ans @@ -0,0 +1 @@ +11 diff --git a/problems/livingorganism/data/secret/2.in b/problems/livingorganism/data/secret/2.in new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/problems/livingorganism/data/secret/2.in @@ -0,0 +1 @@ +2 diff --git a/problems/livingorganism/data/secret/3.ans b/problems/livingorganism/data/secret/3.ans new file mode 100644 index 0000000..b1bd38b --- /dev/null +++ b/problems/livingorganism/data/secret/3.ans @@ -0,0 +1 @@ +13 diff --git a/problems/livingorganism/data/secret/3.in b/problems/livingorganism/data/secret/3.in new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/problems/livingorganism/data/secret/3.in @@ -0,0 +1 @@ +5 diff --git a/problems/livingorganism/data/secret/4.ans b/problems/livingorganism/data/secret/4.ans new file mode 100644 index 0000000..60d3b2f --- /dev/null +++ b/problems/livingorganism/data/secret/4.ans @@ -0,0 +1 @@ +15 diff --git a/problems/livingorganism/data/secret/4.in b/problems/livingorganism/data/secret/4.in new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/problems/livingorganism/data/secret/4.in @@ -0,0 +1 @@ +10 diff --git a/problems/livingorganism/data/secret/5.ans b/problems/livingorganism/data/secret/5.ans new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/problems/livingorganism/data/secret/5.ans @@ -0,0 +1 @@ +18 diff --git a/problems/livingorganism/data/secret/5.in b/problems/livingorganism/data/secret/5.in new file mode 100644 index 0000000..7273c0f --- /dev/null +++ b/problems/livingorganism/data/secret/5.in @@ -0,0 +1 @@ +25 diff --git a/problems/livingorganism/data/secret/6.ans b/problems/livingorganism/data/secret/6.ans new file mode 100644 index 0000000..209e3ef --- /dev/null +++ b/problems/livingorganism/data/secret/6.ans @@ -0,0 +1 @@ +20 diff --git a/problems/livingorganism/data/secret/6.in b/problems/livingorganism/data/secret/6.in new file mode 100644 index 0000000..abac1ea --- /dev/null +++ b/problems/livingorganism/data/secret/6.in @@ -0,0 +1 @@ +47 diff --git a/problems/livingorganism/data/secret/7.ans b/problems/livingorganism/data/secret/7.ans new file mode 100644 index 0000000..aabe6ec --- /dev/null +++ b/problems/livingorganism/data/secret/7.ans @@ -0,0 +1 @@ +21 diff --git a/problems/livingorganism/data/secret/7.in b/problems/livingorganism/data/secret/7.in new file mode 100644 index 0000000..69a893a --- /dev/null +++ b/problems/livingorganism/data/secret/7.in @@ -0,0 +1 @@ +66 diff --git a/problems/livingorganism/data/secret/8.ans b/problems/livingorganism/data/secret/8.ans new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/problems/livingorganism/data/secret/8.ans @@ -0,0 +1 @@ +22 diff --git a/problems/livingorganism/data/secret/8.in b/problems/livingorganism/data/secret/8.in new file mode 100644 index 0000000..29d6383 --- /dev/null +++ b/problems/livingorganism/data/secret/8.in @@ -0,0 +1 @@ +100 diff --git a/problems/livingorganism/domjudge-problem.ini b/problems/livingorganism/domjudge-problem.ini new file mode 100644 index 0000000..2348f33 --- /dev/null +++ b/problems/livingorganism/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Living Organism" +timelimit = 2 +points = 2 diff --git a/problems/livingorganism/problem.pdf b/problems/livingorganism/problem.pdf Binary files differnew file mode 100644 index 0000000..2059518 --- /dev/null +++ b/problems/livingorganism/problem.pdf diff --git a/problems/partitionnumbers.py b/problems/partitionnumbers.py new file mode 100644 index 0000000..9bb7cb6 --- /dev/null +++ b/problems/partitionnumbers.py @@ -0,0 +1,27 @@ +def compute_partitions(max_n): + partitions = [0] * (max_n + 1) + partitions[0] = 1 + + for i in range(1, max_n + 1): + for j in range(i, max_n + 1): + partitions[j] += partitions[j - i] + + return partitions + +def main(): + import sys + input = sys.stdin.read + data = input().split() + + T = int(data[0]) + queries = [int(data[i]) for i in range(1, T + 1)] + + max_n = 100 + partitions = compute_partitions(max_n) + + results = [str(partitions[n]) for n in queries] + + print("\n".join(results)) + +if __name__ == "__main__": + main() diff --git a/problems/partitionnumbers/attachments/template.c b/problems/partitionnumbers/attachments/template.c new file mode 100644 index 0000000..a715c25 --- /dev/null +++ b/problems/partitionnumbers/attachments/template.c @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int T; + scanf("%d", &T); + for (int i = 0; i < T; i++) { + int n; + scanf("%d", &n); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("partitions\n"); + + return 0; +} diff --git a/problems/partitionnumbers/attachments/template.cpp b/problems/partitionnumbers/attachments/template.cpp new file mode 100644 index 0000000..4fa1657 --- /dev/null +++ b/problems/partitionnumbers/attachments/template.cpp @@ -0,0 +1,21 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int t; + cin >> t; cin.ignore(); + for (int i = 0; i < t; i++) { + int n; + cin >> n; cin.ignore(); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "partitions" << endl; +} diff --git a/problems/partitionnumbers/attachments/template.java b/problems/partitionnumbers/attachments/template.java new file mode 100644 index 0000000..e800dde --- /dev/null +++ b/problems/partitionnumbers/attachments/template.java @@ -0,0 +1,19 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int T = in.nextInt(); + for (int i = 0; i < T; i++) { + int n = in.nextInt(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("partitions"); + } +} diff --git a/problems/partitionnumbers/attachments/template.js b/problems/partitionnumbers/attachments/template.js new file mode 100644 index 0000000..77897b3 --- /dev/null +++ b/problems/partitionnumbers/attachments/template.js @@ -0,0 +1,9 @@ +const T = parseInt(readline()); +for (let i = 0; i < T; i++) { + const n = parseInt(readline()); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('partitions'); diff --git a/problems/partitionnumbers/attachments/template.py b/problems/partitionnumbers/attachments/template.py new file mode 100644 index 0000000..b60f649 --- /dev/null +++ b/problems/partitionnumbers/attachments/template.py @@ -0,0 +1,11 @@ +import sys +import math + +t = int(input()) +for i in range(t): + n = int(input()) + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("partitions") diff --git a/problems/partitionnumbers/data/secret/1.ans b/problems/partitionnumbers/data/secret/1.ans new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/problems/partitionnumbers/data/secret/1.ans @@ -0,0 +1 @@ +3 diff --git a/problems/partitionnumbers/data/secret/1.in b/problems/partitionnumbers/data/secret/1.in new file mode 100644 index 0000000..2b2f2e1 --- /dev/null +++ b/problems/partitionnumbers/data/secret/1.in @@ -0,0 +1,2 @@ +1 +3 diff --git a/problems/partitionnumbers/data/secret/10.ans b/problems/partitionnumbers/data/secret/10.ans new file mode 100644 index 0000000..75b9b18 --- /dev/null +++ b/problems/partitionnumbers/data/secret/10.ans @@ -0,0 +1,10 @@ +11 +15 +22 +30 +42 +56 +77 +101 +135 +176 diff --git a/problems/partitionnumbers/data/secret/10.in b/problems/partitionnumbers/data/secret/10.in new file mode 100644 index 0000000..2417c41 --- /dev/null +++ b/problems/partitionnumbers/data/secret/10.in @@ -0,0 +1,11 @@ +10 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 diff --git a/problems/partitionnumbers/data/secret/11.ans b/problems/partitionnumbers/data/secret/11.ans new file mode 100644 index 0000000..119ef78 --- /dev/null +++ b/problems/partitionnumbers/data/secret/11.ans @@ -0,0 +1,15 @@ +7 +15 +77 +176 +627 +1958 +5604 +14883 +37338 +89134 +204226 +451276 +966467 +2012558 +4087968 diff --git a/problems/partitionnumbers/data/secret/11.in b/problems/partitionnumbers/data/secret/11.in new file mode 100644 index 0000000..da8c8a6 --- /dev/null +++ b/problems/partitionnumbers/data/secret/11.in @@ -0,0 +1,16 @@ +15 +5 +7 +12 +15 +20 +25 +30 +35 +40 +45 +50 +55 +60 +65 +70 diff --git a/problems/partitionnumbers/data/secret/12.ans b/problems/partitionnumbers/data/secret/12.ans new file mode 100644 index 0000000..6af52e7 --- /dev/null +++ b/problems/partitionnumbers/data/secret/12.ans @@ -0,0 +1,15 @@ +11 +22 +135 +231 +792 +2436 +6842 +17977 +44583 +105558 +239943 +526823 +1121505 +2323520 +4697205 diff --git a/problems/partitionnumbers/data/secret/12.in b/problems/partitionnumbers/data/secret/12.in new file mode 100644 index 0000000..273eb4f --- /dev/null +++ b/problems/partitionnumbers/data/secret/12.in @@ -0,0 +1,16 @@ +15 +6 +8 +14 +16 +21 +26 +31 +36 +41 +46 +51 +56 +61 +66 +71 diff --git a/problems/partitionnumbers/data/secret/13.ans b/problems/partitionnumbers/data/secret/13.ans new file mode 100644 index 0000000..49241b3 --- /dev/null +++ b/problems/partitionnumbers/data/secret/13.ans @@ -0,0 +1,15 @@ +1 +1 +2 +204226 +190569292 +8118264 +15796476 +30167357 +56634173 +104651419 +5604 +14883 +37338 +89134 +1958 diff --git a/problems/partitionnumbers/data/secret/13.in b/problems/partitionnumbers/data/secret/13.in new file mode 100644 index 0000000..2ed36b4 --- /dev/null +++ b/problems/partitionnumbers/data/secret/13.in @@ -0,0 +1,16 @@ +15 +1 +0 +2 +50 +100 +75 +80 +85 +90 +95 +30 +35 +40 +45 +25 diff --git a/problems/partitionnumbers/data/secret/14.ans b/problems/partitionnumbers/data/secret/14.ans new file mode 100644 index 0000000..7b5d6ff --- /dev/null +++ b/problems/partitionnumbers/data/secret/14.ans @@ -0,0 +1,15 @@ +3 +5 +7 +451276 +169229875 +9289091 +18004327 +34262962 +64112359 +118114304 +6842 +17977 +44583 +105558 +2436 diff --git a/problems/partitionnumbers/data/secret/14.in b/problems/partitionnumbers/data/secret/14.in new file mode 100644 index 0000000..a0b217a --- /dev/null +++ b/problems/partitionnumbers/data/secret/14.in @@ -0,0 +1,16 @@ +15 +3 +4 +5 +55 +99 +76 +81 +86 +91 +96 +31 +36 +41 +46 +26 diff --git a/problems/partitionnumbers/data/secret/2.ans b/problems/partitionnumbers/data/secret/2.ans new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/problems/partitionnumbers/data/secret/2.ans @@ -0,0 +1 @@ +2 diff --git a/problems/partitionnumbers/data/secret/2.in b/problems/partitionnumbers/data/secret/2.in new file mode 100644 index 0000000..1191247 --- /dev/null +++ b/problems/partitionnumbers/data/secret/2.in @@ -0,0 +1,2 @@ +1 +2 diff --git a/problems/partitionnumbers/data/secret/3.ans b/problems/partitionnumbers/data/secret/3.ans new file mode 100644 index 0000000..b3172d1 --- /dev/null +++ b/problems/partitionnumbers/data/secret/3.ans @@ -0,0 +1,2 @@ +5 +7 diff --git a/problems/partitionnumbers/data/secret/3.in b/problems/partitionnumbers/data/secret/3.in new file mode 100644 index 0000000..0429fae --- /dev/null +++ b/problems/partitionnumbers/data/secret/3.in @@ -0,0 +1,3 @@ +2 +4 +5 diff --git a/problems/partitionnumbers/data/secret/4.ans b/problems/partitionnumbers/data/secret/4.ans new file mode 100644 index 0000000..b04b592 --- /dev/null +++ b/problems/partitionnumbers/data/secret/4.ans @@ -0,0 +1,2 @@ +11 +15 diff --git a/problems/partitionnumbers/data/secret/4.in b/problems/partitionnumbers/data/secret/4.in new file mode 100644 index 0000000..41524c9 --- /dev/null +++ b/problems/partitionnumbers/data/secret/4.in @@ -0,0 +1,3 @@ +2 +6 +7 diff --git a/problems/partitionnumbers/data/secret/5.ans b/problems/partitionnumbers/data/secret/5.ans new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/problems/partitionnumbers/data/secret/5.ans @@ -0,0 +1 @@ +1 diff --git a/problems/partitionnumbers/data/secret/5.in b/problems/partitionnumbers/data/secret/5.in new file mode 100644 index 0000000..b261da1 --- /dev/null +++ b/problems/partitionnumbers/data/secret/5.in @@ -0,0 +1,2 @@ +1 +0 diff --git a/problems/partitionnumbers/data/secret/6.ans b/problems/partitionnumbers/data/secret/6.ans new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/problems/partitionnumbers/data/secret/6.ans @@ -0,0 +1 @@ +1 diff --git a/problems/partitionnumbers/data/secret/6.in b/problems/partitionnumbers/data/secret/6.in new file mode 100644 index 0000000..6ed281c --- /dev/null +++ b/problems/partitionnumbers/data/secret/6.in @@ -0,0 +1,2 @@ +1 +1 diff --git a/problems/partitionnumbers/data/secret/7.ans b/problems/partitionnumbers/data/secret/7.ans new file mode 100644 index 0000000..deadf2c --- /dev/null +++ b/problems/partitionnumbers/data/secret/7.ans @@ -0,0 +1,5 @@ +3 +2 +1 +1 +5 diff --git a/problems/partitionnumbers/data/secret/7.in b/problems/partitionnumbers/data/secret/7.in new file mode 100644 index 0000000..6cbbcb7 --- /dev/null +++ b/problems/partitionnumbers/data/secret/7.in @@ -0,0 +1,6 @@ +5 +3 +2 +1 +0 +4 diff --git a/problems/partitionnumbers/data/secret/8.ans b/problems/partitionnumbers/data/secret/8.ans new file mode 100644 index 0000000..209d95b --- /dev/null +++ b/problems/partitionnumbers/data/secret/8.ans @@ -0,0 +1,5 @@ +1 +2 +3 +5 +7 diff --git a/problems/partitionnumbers/data/secret/8.in b/problems/partitionnumbers/data/secret/8.in new file mode 100644 index 0000000..74fc6f9 --- /dev/null +++ b/problems/partitionnumbers/data/secret/8.in @@ -0,0 +1,6 @@ +5 +1 +2 +3 +4 +5 diff --git a/problems/partitionnumbers/data/secret/9.ans b/problems/partitionnumbers/data/secret/9.ans new file mode 100644 index 0000000..1fc2e39 --- /dev/null +++ b/problems/partitionnumbers/data/secret/9.ans @@ -0,0 +1,10 @@ +7 +11 +15 +22 +30 +42 +56 +77 +101 +135 diff --git a/problems/partitionnumbers/data/secret/9.in b/problems/partitionnumbers/data/secret/9.in new file mode 100644 index 0000000..60b377f --- /dev/null +++ b/problems/partitionnumbers/data/secret/9.in @@ -0,0 +1,11 @@ +10 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 diff --git a/problems/partitionnumbers/domjudge-problem.ini b/problems/partitionnumbers/domjudge-problem.ini new file mode 100644 index 0000000..9915b2d --- /dev/null +++ b/problems/partitionnumbers/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Partition Numbers" +timelimit = 3 +points = 2 diff --git a/problems/partitionnumbers/problem.pdf b/problems/partitionnumbers/problem.pdf Binary files differnew file mode 100644 index 0000000..03c54ad --- /dev/null +++ b/problems/partitionnumbers/problem.pdf diff --git a/problems/pixelpolygons/attachments/template.c b/problems/pixelpolygons/attachments/template.c new file mode 100644 index 0000000..f487d2f --- /dev/null +++ b/problems/pixelpolygons/attachments/template.c @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int N; + scanf("%d", &N); fgetc(stdin); + for (int i = 0; i < N; i++) { + char line[N + 1]; + scanf("%[^\n]", line); fgetc(stdin); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("number_of_sides\n"); + + return 0; +} diff --git a/problems/pixelpolygons/attachments/template.cpp b/problems/pixelpolygons/attachments/template.cpp new file mode 100644 index 0000000..f170242 --- /dev/null +++ b/problems/pixelpolygons/attachments/template.cpp @@ -0,0 +1,21 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + string line; + getline(cin, line); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "number_of_sides" << endl; +} diff --git a/problems/pixelpolygons/attachments/template.java b/problems/pixelpolygons/attachments/template.java new file mode 100644 index 0000000..2a15894 --- /dev/null +++ b/problems/pixelpolygons/attachments/template.java @@ -0,0 +1,22 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int N = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < N; i++) { + String line = in.nextLine(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("number_of_sides"); + } +} diff --git a/problems/pixelpolygons/attachments/template.js b/problems/pixelpolygons/attachments/template.js new file mode 100644 index 0000000..6dde043 --- /dev/null +++ b/problems/pixelpolygons/attachments/template.js @@ -0,0 +1,10 @@ +const N = parseInt(readline()); +for (let i = 0; i < N; i++) { + const line = readline(); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('number_of_sides'); + diff --git a/problems/pixelpolygons/attachments/template.py b/problems/pixelpolygons/attachments/template.py new file mode 100644 index 0000000..46c645b --- /dev/null +++ b/problems/pixelpolygons/attachments/template.py @@ -0,0 +1,11 @@ +import sys +import math + +n = int(input()) +for i in range(n): + line = input() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("number_of_sides") diff --git a/problems/pixelpolygons/data/secret/1.ans b/problems/pixelpolygons/data/secret/1.ans new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/problems/pixelpolygons/data/secret/1.ans @@ -0,0 +1 @@ +4 diff --git a/problems/pixelpolygons/data/secret/1.in b/problems/pixelpolygons/data/secret/1.in new file mode 100644 index 0000000..cdf2730 --- /dev/null +++ b/problems/pixelpolygons/data/secret/1.in @@ -0,0 +1,5 @@ +4 +.... +.##. +.##. +.... diff --git a/problems/pixelpolygons/data/secret/10.ans b/problems/pixelpolygons/data/secret/10.ans new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/problems/pixelpolygons/data/secret/10.ans @@ -0,0 +1 @@ +4 diff --git a/problems/pixelpolygons/data/secret/10.in b/problems/pixelpolygons/data/secret/10.in new file mode 100644 index 0000000..1eb2cb0 --- /dev/null +++ b/problems/pixelpolygons/data/secret/10.in @@ -0,0 +1,7 @@ +6 +...... +...... +.####. +...... +...... +...... diff --git a/problems/pixelpolygons/data/secret/11.ans b/problems/pixelpolygons/data/secret/11.ans new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/problems/pixelpolygons/data/secret/11.ans @@ -0,0 +1 @@ +18 diff --git a/problems/pixelpolygons/data/secret/11.in b/problems/pixelpolygons/data/secret/11.in new file mode 100644 index 0000000..f0e9f9d --- /dev/null +++ b/problems/pixelpolygons/data/secret/11.in @@ -0,0 +1,11 @@ +10 +.......... +.########. +........#. +.######.#. +.#....#.#. +.#.#..#.#. +.#.####.#. +.#......#. +.########. +.......... diff --git a/problems/pixelpolygons/data/secret/12.ans b/problems/pixelpolygons/data/secret/12.ans new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/problems/pixelpolygons/data/secret/12.ans @@ -0,0 +1 @@ +18 diff --git a/problems/pixelpolygons/data/secret/12.in b/problems/pixelpolygons/data/secret/12.in new file mode 100644 index 0000000..92ecade --- /dev/null +++ b/problems/pixelpolygons/data/secret/12.in @@ -0,0 +1,11 @@ +10 +.......... +.######.#. +.#....#.#. +.#.##.#.#. +.#.#..#.#. +.#.#..#.#. +.#.####.#. +.#......#. +.########. +.......... diff --git a/problems/pixelpolygons/data/secret/13.ans b/problems/pixelpolygons/data/secret/13.ans new file mode 100644 index 0000000..c739b42 --- /dev/null +++ b/problems/pixelpolygons/data/secret/13.ans @@ -0,0 +1 @@ +44 diff --git a/problems/pixelpolygons/data/secret/13.in b/problems/pixelpolygons/data/secret/13.in new file mode 100644 index 0000000..c70f5bf --- /dev/null +++ b/problems/pixelpolygons/data/secret/13.in @@ -0,0 +1,11 @@ +10 +.......... +.#.#.#.##. +.########. +...####... +.######.#. +..###.###. +.###...... +.########. +..###..##. +.......... diff --git a/problems/pixelpolygons/data/secret/14.ans b/problems/pixelpolygons/data/secret/14.ans new file mode 100644 index 0000000..6f4247a --- /dev/null +++ b/problems/pixelpolygons/data/secret/14.ans @@ -0,0 +1 @@ +26 diff --git a/problems/pixelpolygons/data/secret/14.in b/problems/pixelpolygons/data/secret/14.in new file mode 100644 index 0000000..f2c4a1a --- /dev/null +++ b/problems/pixelpolygons/data/secret/14.in @@ -0,0 +1,11 @@ +10 +.......... +..###.###. +.########. +.########. +.########. +..######.. +..#######. +.###.##... +.#........ +.......... diff --git a/problems/pixelpolygons/data/secret/15.ans b/problems/pixelpolygons/data/secret/15.ans new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/problems/pixelpolygons/data/secret/15.ans @@ -0,0 +1 @@ +4 diff --git a/problems/pixelpolygons/data/secret/15.in b/problems/pixelpolygons/data/secret/15.in new file mode 100644 index 0000000..194e72c --- /dev/null +++ b/problems/pixelpolygons/data/secret/15.in @@ -0,0 +1,11 @@ +10 +.......... +.########. +.########. +.########. +.########. +.########. +.########. +.########. +.########. +.......... diff --git a/problems/pixelpolygons/data/secret/16.ans b/problems/pixelpolygons/data/secret/16.ans new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/problems/pixelpolygons/data/secret/16.ans @@ -0,0 +1 @@ +4 diff --git a/problems/pixelpolygons/data/secret/16.in b/problems/pixelpolygons/data/secret/16.in new file mode 100644 index 0000000..bc035cf --- /dev/null +++ b/problems/pixelpolygons/data/secret/16.in @@ -0,0 +1,10 @@ +9 +......... +.#######. +.#######. +.#######. +.#######. +.#######. +.#######. +.#######. +......... diff --git a/problems/pixelpolygons/data/secret/2.ans b/problems/pixelpolygons/data/secret/2.ans new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/problems/pixelpolygons/data/secret/2.ans @@ -0,0 +1 @@ +4 diff --git a/problems/pixelpolygons/data/secret/2.in b/problems/pixelpolygons/data/secret/2.in new file mode 100644 index 0000000..55bb639 --- /dev/null +++ b/problems/pixelpolygons/data/secret/2.in @@ -0,0 +1,6 @@ +5 +..... +.###. +.###. +.###. +..... diff --git a/problems/pixelpolygons/data/secret/3.ans b/problems/pixelpolygons/data/secret/3.ans new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/problems/pixelpolygons/data/secret/3.ans @@ -0,0 +1 @@ +6 diff --git a/problems/pixelpolygons/data/secret/3.in b/problems/pixelpolygons/data/secret/3.in new file mode 100644 index 0000000..1c92de6 --- /dev/null +++ b/problems/pixelpolygons/data/secret/3.in @@ -0,0 +1,5 @@ +4 +.... +.##. +.#.. +.... diff --git a/problems/pixelpolygons/data/secret/4.ans b/problems/pixelpolygons/data/secret/4.ans new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/problems/pixelpolygons/data/secret/4.ans @@ -0,0 +1 @@ +6 diff --git a/problems/pixelpolygons/data/secret/4.in b/problems/pixelpolygons/data/secret/4.in new file mode 100644 index 0000000..505f514 --- /dev/null +++ b/problems/pixelpolygons/data/secret/4.in @@ -0,0 +1,6 @@ +5 +..... +.##.. +.###. +.###. +..... diff --git a/problems/pixelpolygons/data/secret/5.ans b/problems/pixelpolygons/data/secret/5.ans new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/problems/pixelpolygons/data/secret/5.ans @@ -0,0 +1 @@ +12 diff --git a/problems/pixelpolygons/data/secret/5.in b/problems/pixelpolygons/data/secret/5.in new file mode 100644 index 0000000..9cd8f90 --- /dev/null +++ b/problems/pixelpolygons/data/secret/5.in @@ -0,0 +1,6 @@ +5 +..... +..#.. +.###. +..#.. +..... diff --git a/problems/pixelpolygons/data/secret/6.ans b/problems/pixelpolygons/data/secret/6.ans new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/problems/pixelpolygons/data/secret/6.ans @@ -0,0 +1 @@ +12 diff --git a/problems/pixelpolygons/data/secret/6.in b/problems/pixelpolygons/data/secret/6.in new file mode 100644 index 0000000..5c3da6b --- /dev/null +++ b/problems/pixelpolygons/data/secret/6.in @@ -0,0 +1,6 @@ +5 +..... +.#.#. +.###. +.#.#. +..... diff --git a/problems/pixelpolygons/data/secret/7.ans b/problems/pixelpolygons/data/secret/7.ans new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/problems/pixelpolygons/data/secret/7.ans @@ -0,0 +1 @@ +4 diff --git a/problems/pixelpolygons/data/secret/7.in b/problems/pixelpolygons/data/secret/7.in new file mode 100644 index 0000000..e9b11d7 --- /dev/null +++ b/problems/pixelpolygons/data/secret/7.in @@ -0,0 +1,4 @@ +3 +... +.#. +... diff --git a/problems/pixelpolygons/data/secret/8.ans b/problems/pixelpolygons/data/secret/8.ans new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/problems/pixelpolygons/data/secret/8.ans @@ -0,0 +1 @@ +4 diff --git a/problems/pixelpolygons/data/secret/8.in b/problems/pixelpolygons/data/secret/8.in new file mode 100644 index 0000000..f995c25 --- /dev/null +++ b/problems/pixelpolygons/data/secret/8.in @@ -0,0 +1,6 @@ +5 +..... +..... +..... +.#... +..... diff --git a/problems/pixelpolygons/data/secret/9.ans b/problems/pixelpolygons/data/secret/9.ans new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/problems/pixelpolygons/data/secret/9.ans @@ -0,0 +1 @@ +4 diff --git a/problems/pixelpolygons/data/secret/9.in b/problems/pixelpolygons/data/secret/9.in new file mode 100644 index 0000000..e3b47bf --- /dev/null +++ b/problems/pixelpolygons/data/secret/9.in @@ -0,0 +1,6 @@ +5 +..... +...#. +...#. +...#. +..... diff --git a/problems/pixelpolygons/domjudge-problem.ini b/problems/pixelpolygons/domjudge-problem.ini new file mode 100644 index 0000000..4c075e7 --- /dev/null +++ b/problems/pixelpolygons/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Pixel Polygons" +timelimit = 3 +points = 2 diff --git a/problems/pixelpolygons/problem.pdf b/problems/pixelpolygons/problem.pdf Binary files differnew file mode 100644 index 0000000..b1685d2 --- /dev/null +++ b/problems/pixelpolygons/problem.pdf diff --git a/problems/raidtime/attachments/template.c b/problems/raidtime/attachments/template.c new file mode 100644 index 0000000..bfbd3ca --- /dev/null +++ b/problems/raidtime/attachments/template.c @@ -0,0 +1,27 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int w; + scanf("%d", &w); fgetc(stdin); + for (int i = 0; i < w; i++) { + char wall[257]; + scanf("%[^\n]", wall); fgetc(stdin); + } + int d; + scanf("%d", &d); fgetc(stdin); + for (int i = 0; i < d; i++) { + char door[257]; + scanf("%[^\n]", door); fgetc(stdin); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("0 C4 needed to go through 0 walls\n"); + + return 0; +} diff --git a/problems/raidtime/attachments/template.cpp b/problems/raidtime/attachments/template.cpp new file mode 100644 index 0000000..2c74c71 --- /dev/null +++ b/problems/raidtime/attachments/template.cpp @@ -0,0 +1,27 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int w; + cin >> w; cin.ignore(); + for (int i = 0; i < w; i++) { + string wall; + getline(cin, wall); + } + int d; + cin >> d; cin.ignore(); + for (int i = 0; i < d; i++) { + string door; + getline(cin, door); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "0 C4 needed to go through 0 walls" << endl; +} diff --git a/problems/raidtime/attachments/template.java b/problems/raidtime/attachments/template.java new file mode 100644 index 0000000..773f5c9 --- /dev/null +++ b/problems/raidtime/attachments/template.java @@ -0,0 +1,29 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int w = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < w; i++) { + String wall = in.nextLine(); + } + int d = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < d; i++) { + String door = in.nextLine(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("0 C4 needed to go through 0 walls"); + } +} diff --git a/problems/raidtime/attachments/template.js b/problems/raidtime/attachments/template.js new file mode 100644 index 0000000..e2df260 --- /dev/null +++ b/problems/raidtime/attachments/template.js @@ -0,0 +1,13 @@ +const w = parseInt(readline()); +for (let i = 0; i < w; i++) { + const wall = readline(); +} +const d = parseInt(readline()); +for (let i = 0; i < d; i++) { + const door = readline(); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('0 C4 needed to go through 0 walls'); diff --git a/problems/raidtime/attachments/template.py b/problems/raidtime/attachments/template.py new file mode 100644 index 0000000..442793e --- /dev/null +++ b/problems/raidtime/attachments/template.py @@ -0,0 +1,14 @@ +import sys +import math + +w = int(input()) +for i in range(w): + wall = input() +d = int(input()) +for i in range(d): + door = input() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("0 C4 needed to go through 0 walls") diff --git a/problems/raidtime/data/secret/1.ans b/problems/raidtime/data/secret/1.ans new file mode 100644 index 0000000..decf070 --- /dev/null +++ b/problems/raidtime/data/secret/1.ans @@ -0,0 +1 @@ +2 C4 needed to go through 1 wall(s) diff --git a/problems/raidtime/data/secret/1.in b/problems/raidtime/data/secret/1.in new file mode 100644 index 0000000..689c166 --- /dev/null +++ b/problems/raidtime/data/secret/1.in @@ -0,0 +1,5 @@ +1 +Stone wall +2 +Sheet door +Sheet door diff --git a/problems/raidtime/data/secret/10.ans b/problems/raidtime/data/secret/10.ans new file mode 100644 index 0000000..46e846e --- /dev/null +++ b/problems/raidtime/data/secret/10.ans @@ -0,0 +1 @@ +11 C4 needed to go through 7 door(s) diff --git a/problems/raidtime/data/secret/10.in b/problems/raidtime/data/secret/10.in new file mode 100644 index 0000000..e6292d7 --- /dev/null +++ b/problems/raidtime/data/secret/10.in @@ -0,0 +1,16 @@ +7 +Stone wall +Metal wall +Wood wall +Stone wall +Stone wall +Metal wall +Stone wall +7 +Sheet door +Garage door +Garage door +Garage door +Sheet door +Garage door +Sheet door diff --git a/problems/raidtime/data/secret/11.ans b/problems/raidtime/data/secret/11.ans new file mode 100644 index 0000000..f9b8a66 --- /dev/null +++ b/problems/raidtime/data/secret/11.ans @@ -0,0 +1 @@ +7 C4 needed to go through 4 door(s) diff --git a/problems/raidtime/data/secret/11.in b/problems/raidtime/data/secret/11.in new file mode 100644 index 0000000..f5b495f --- /dev/null +++ b/problems/raidtime/data/secret/11.in @@ -0,0 +1,12 @@ +6 +Stone wall +Wood wall +Metal wall +Stone wall +Wood wall +Stone wall +4 +Sheet door +Wood door +Garage door +Armored door diff --git a/problems/raidtime/data/secret/12.ans b/problems/raidtime/data/secret/12.ans new file mode 100644 index 0000000..f9b8a66 --- /dev/null +++ b/problems/raidtime/data/secret/12.ans @@ -0,0 +1 @@ +7 C4 needed to go through 4 door(s) diff --git a/problems/raidtime/data/secret/12.in b/problems/raidtime/data/secret/12.in new file mode 100644 index 0000000..4f54134 --- /dev/null +++ b/problems/raidtime/data/secret/12.in @@ -0,0 +1,10 @@ +4 +Wood wall +Stone wall +Stone wall +Metal wall +4 +Wood door +Sheet door +Garage door +Armored door diff --git a/problems/raidtime/data/secret/13.ans b/problems/raidtime/data/secret/13.ans new file mode 100644 index 0000000..624894b --- /dev/null +++ b/problems/raidtime/data/secret/13.ans @@ -0,0 +1 @@ +9 C4 needed to go through 5 door(s) diff --git a/problems/raidtime/data/secret/13.in b/problems/raidtime/data/secret/13.in new file mode 100644 index 0000000..796d59d --- /dev/null +++ b/problems/raidtime/data/secret/13.in @@ -0,0 +1,15 @@ +8 +Metal wall +Stone wall +Wood wall +Stone wall +Metal wall +Stone wall +Wood wall +Metal wall +5 +Garage door +Armored door +Sheet door +Wood door +Garage door diff --git a/problems/raidtime/data/secret/14.ans b/problems/raidtime/data/secret/14.ans new file mode 100644 index 0000000..b62d63d --- /dev/null +++ b/problems/raidtime/data/secret/14.ans @@ -0,0 +1 @@ +13 C4 needed to go through 7 wall(s) diff --git a/problems/raidtime/data/secret/14.in b/problems/raidtime/data/secret/14.in new file mode 100644 index 0000000..74e2232 --- /dev/null +++ b/problems/raidtime/data/secret/14.in @@ -0,0 +1,16 @@ +7 +Wood wall +Stone wall +Metal wall +Wood wall +Stone wall +Stone wall +Wood wall +7 +Sheet door +Armored door +Garage door +Sheet door +Garage door +Armored door +Armored door diff --git a/problems/raidtime/data/secret/15.ans b/problems/raidtime/data/secret/15.ans new file mode 100644 index 0000000..89d53c5 --- /dev/null +++ b/problems/raidtime/data/secret/15.ans @@ -0,0 +1 @@ +7 C4 needed to go through 3 wall(s) diff --git a/problems/raidtime/data/secret/15.in b/problems/raidtime/data/secret/15.in new file mode 100644 index 0000000..41c5204 --- /dev/null +++ b/problems/raidtime/data/secret/15.in @@ -0,0 +1,11 @@ +3 +Wood wall +Stone wall +Metal wall +6 +Wood door +Sheet door +Armored door +Garage door +Sheet door +Wood door diff --git a/problems/raidtime/data/secret/16.ans b/problems/raidtime/data/secret/16.ans new file mode 100644 index 0000000..5f5cd79 --- /dev/null +++ b/problems/raidtime/data/secret/16.ans @@ -0,0 +1 @@ +10 C4 needed to go through 5 door(s) diff --git a/problems/raidtime/data/secret/16.in b/problems/raidtime/data/secret/16.in new file mode 100644 index 0000000..153c7b8 --- /dev/null +++ b/problems/raidtime/data/secret/16.in @@ -0,0 +1,12 @@ +5 +Stone wall +Metal wall +Stone wall +Metal wall +Wood wall +5 +Armored door +Garage door +Sheet door +Wood door +Armored door diff --git a/problems/raidtime/data/secret/17.ans b/problems/raidtime/data/secret/17.ans new file mode 100644 index 0000000..6697621 --- /dev/null +++ b/problems/raidtime/data/secret/17.ans @@ -0,0 +1 @@ +10 C4 needed to go through 5 wall(s) diff --git a/problems/raidtime/data/secret/17.in b/problems/raidtime/data/secret/17.in new file mode 100644 index 0000000..3b08c5f --- /dev/null +++ b/problems/raidtime/data/secret/17.in @@ -0,0 +1,14 @@ +5 +Stone wall +Wood wall +Metal wall +Stone wall +Wood wall +7 +Armored door +Garage door +Sheet door +Wood door +Garage door +Armored door +Garage door diff --git a/problems/raidtime/data/secret/18.ans b/problems/raidtime/data/secret/18.ans new file mode 100644 index 0000000..c761e5c --- /dev/null +++ b/problems/raidtime/data/secret/18.ans @@ -0,0 +1 @@ +9 C4 needed to go through 4 wall(s) diff --git a/problems/raidtime/data/secret/18.in b/problems/raidtime/data/secret/18.in new file mode 100644 index 0000000..acf9663 --- /dev/null +++ b/problems/raidtime/data/secret/18.in @@ -0,0 +1,10 @@ +4 +Metal wall +Stone wall +Wood wall +Stone wall +4 +Sheet door +Garage door +Armored door +Armored door diff --git a/problems/raidtime/data/secret/2.ans b/problems/raidtime/data/secret/2.ans new file mode 100644 index 0000000..decf070 --- /dev/null +++ b/problems/raidtime/data/secret/2.ans @@ -0,0 +1 @@ +2 C4 needed to go through 1 wall(s) diff --git a/problems/raidtime/data/secret/2.in b/problems/raidtime/data/secret/2.in new file mode 100644 index 0000000..b43ec22 --- /dev/null +++ b/problems/raidtime/data/secret/2.in @@ -0,0 +1,4 @@ +1 +Stone wall +1 +Garage door diff --git a/problems/raidtime/data/secret/3.ans b/problems/raidtime/data/secret/3.ans new file mode 100644 index 0000000..feaf47b --- /dev/null +++ b/problems/raidtime/data/secret/3.ans @@ -0,0 +1 @@ +5 C4 needed to go through 3 door(s) diff --git a/problems/raidtime/data/secret/3.in b/problems/raidtime/data/secret/3.in new file mode 100644 index 0000000..1e09abc --- /dev/null +++ b/problems/raidtime/data/secret/3.in @@ -0,0 +1,7 @@ +2 +Stone wall +Metal wall +3 +Armored door +Sheet door +Sheet door diff --git a/problems/raidtime/data/secret/4.ans b/problems/raidtime/data/secret/4.ans new file mode 100644 index 0000000..d886e0c --- /dev/null +++ b/problems/raidtime/data/secret/4.ans @@ -0,0 +1 @@ +5 C4 needed to go through 4 door(s) diff --git a/problems/raidtime/data/secret/4.in b/problems/raidtime/data/secret/4.in new file mode 100644 index 0000000..cb52a82 --- /dev/null +++ b/problems/raidtime/data/secret/4.in @@ -0,0 +1,8 @@ +2 +Stone wall +Armored wall +4 +Wood door +Garage door +Sheet door +Sheet door diff --git a/problems/raidtime/data/secret/5.ans b/problems/raidtime/data/secret/5.ans new file mode 100644 index 0000000..31821a6 --- /dev/null +++ b/problems/raidtime/data/secret/5.ans @@ -0,0 +1 @@ +32 C4 needed to go through 9 wall(s) diff --git a/problems/raidtime/data/secret/5.in b/problems/raidtime/data/secret/5.in new file mode 100644 index 0000000..5391ea5 --- /dev/null +++ b/problems/raidtime/data/secret/5.in @@ -0,0 +1,30 @@ +9 +Armored wall +Stone wall +Metal wall +Stone wall +Wood wall +Armored wall +Metal wall +Wood wall +Stone wall +19 +Sheet door +Garage door +Sheet door +Armored door +Wood door +Wood door +Wood door +Armored door +Sheet door +Garage door +Garage door +Wood door +Armored door +Garage door +Garage door +Garage door +Garage door +Garage door +Garage door diff --git a/problems/raidtime/data/secret/6.ans b/problems/raidtime/data/secret/6.ans new file mode 100644 index 0000000..7251a13 --- /dev/null +++ b/problems/raidtime/data/secret/6.ans @@ -0,0 +1 @@ +14 C4 needed to go through 8 door(s) diff --git a/problems/raidtime/data/secret/6.in b/problems/raidtime/data/secret/6.in new file mode 100644 index 0000000..44604b0 --- /dev/null +++ b/problems/raidtime/data/secret/6.in @@ -0,0 +1,19 @@ +9 +Stone wall +Metal wall +Wood wall +Stone wall +Metal wall +Wood wall +Stone wall +Metal wall +Wood wall +8 +Sheet door +Armored door +Wood door +Garage door +Sheet door +Armored door +Wood door +Garage door diff --git a/problems/raidtime/data/secret/7.ans b/problems/raidtime/data/secret/7.ans new file mode 100644 index 0000000..0614f28 --- /dev/null +++ b/problems/raidtime/data/secret/7.ans @@ -0,0 +1 @@ +156 C4 needed to go through 20 wall(s) diff --git a/problems/raidtime/data/secret/7.in b/problems/raidtime/data/secret/7.in new file mode 100644 index 0000000..a064f09 --- /dev/null +++ b/problems/raidtime/data/secret/7.in @@ -0,0 +1,74 @@ +20 +Metal wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +Armored wall +52 +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door +Armored door diff --git a/problems/raidtime/data/secret/8.ans b/problems/raidtime/data/secret/8.ans new file mode 100644 index 0000000..b0eb289 --- /dev/null +++ b/problems/raidtime/data/secret/8.ans @@ -0,0 +1 @@ +52 C4 needed to go through 13 wall(s) diff --git a/problems/raidtime/data/secret/8.in b/problems/raidtime/data/secret/8.in new file mode 100644 index 0000000..225e284 --- /dev/null +++ b/problems/raidtime/data/secret/8.in @@ -0,0 +1,67 @@ +13 +Metal wall +Metal wall +Metal wall +Metal wall +Metal wall +Metal wall +Metal wall +Metal wall +Metal wall +Metal wall +Metal wall +Metal wall +Metal wall +52 +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door +Sheet door diff --git a/problems/raidtime/data/secret/9.ans b/problems/raidtime/data/secret/9.ans new file mode 100644 index 0000000..624894b --- /dev/null +++ b/problems/raidtime/data/secret/9.ans @@ -0,0 +1 @@ +9 C4 needed to go through 5 door(s) diff --git a/problems/raidtime/data/secret/9.in b/problems/raidtime/data/secret/9.in new file mode 100644 index 0000000..d181829 --- /dev/null +++ b/problems/raidtime/data/secret/9.in @@ -0,0 +1,12 @@ +5 +Metal wall +Stone wall +Wood wall +Armored wall +Stone wall +5 +Wood door +Armored door +Sheet door +Garage door +Garage door diff --git a/problems/raidtime/domjudge-problem.ini b/problems/raidtime/domjudge-problem.ini new file mode 100644 index 0000000..ceeea76 --- /dev/null +++ b/problems/raidtime/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Raid Time!" +timelimit = 3 +points = 2 diff --git a/problems/raidtime/problem.pdf b/problems/raidtime/problem.pdf Binary files differnew file mode 100644 index 0000000..d2bb124 --- /dev/null +++ b/problems/raidtime/problem.pdf diff --git a/problems/rubyshousehunt/attachments/template.c b/problems/rubyshousehunt/attachments/template.c new file mode 100644 index 0000000..ac44136 --- /dev/null +++ b/problems/rubyshousehunt/attachments/template.c @@ -0,0 +1,26 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int income; + float mr; + int savings; + scanf("%d%f%d", &income, &mr, &savings); + int N; + scanf("%d", &N); + for (int i = 0; i < N; i++) { + int price; + int expenses; + scanf("%d%d", &price, &expenses); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("Yes, the house is affordable with 1 roommate(s) and $1 to spare.\n"); + + return 0; +} diff --git a/problems/rubyshousehunt/attachments/template.cpp b/problems/rubyshousehunt/attachments/template.cpp new file mode 100644 index 0000000..0f9ddf7 --- /dev/null +++ b/problems/rubyshousehunt/attachments/template.cpp @@ -0,0 +1,26 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int income; + float mr; + int savings; + cin >> income >> mr >> savings; cin.ignore(); + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + int price; + int expenses; + cin >> price >> expenses; cin.ignore(); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "Yes, the house is affordable with 1 roommate(s) and $1 to spare." << endl; +} diff --git a/problems/rubyshousehunt/attachments/template.java b/problems/rubyshousehunt/attachments/template.java new file mode 100644 index 0000000..ee06c60 --- /dev/null +++ b/problems/rubyshousehunt/attachments/template.java @@ -0,0 +1,23 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int income = in.nextInt(); + float mr = in.nextFloat(); + int savings = in.nextInt(); + int N = in.nextInt(); + for (int i = 0; i < N; i++) { + int price = in.nextInt(); + int expenses = in.nextInt(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("Yes, the house is affordable with 1 roommate(s) and $1 to spare."); + } +} diff --git a/problems/rubyshousehunt/attachments/template.js b/problems/rubyshousehunt/attachments/template.js new file mode 100644 index 0000000..cb27e76 --- /dev/null +++ b/problems/rubyshousehunt/attachments/template.js @@ -0,0 +1,15 @@ +var inputs = readline().split(' '); +const income = parseInt(inputs[0]); +const mr = parseFloat(inputs[1]); +const savings = parseInt(inputs[2]); +const N = parseInt(readline()); +for (let i = 0; i < N; i++) { + var inputs = readline().split(' '); + const price = parseInt(inputs[0]); + const expenses = parseInt(inputs[1]); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('Yes, the house is affordable with 1 roommate(s) and $1 to spare.'); diff --git a/problems/rubyshousehunt/attachments/template.py b/problems/rubyshousehunt/attachments/template.py new file mode 100644 index 0000000..3fa952c --- /dev/null +++ b/problems/rubyshousehunt/attachments/template.py @@ -0,0 +1,15 @@ +import sys +import math + +inputs = input().split() +income = int(inputs[0]) +mr = float(inputs[1]) +savings = int(inputs[2]) +n = int(input()) +for i in range(n): + price, expenses = [int(j) for j in input().split()] + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("Yes, the house is affordable with 1 roommate(s) and $1 to spare.") diff --git a/problems/rubyshousehunt/data/secret/1.ans b/problems/rubyshousehunt/data/secret/1.ans new file mode 100644 index 0000000..b5df307 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/1.ans @@ -0,0 +1,6 @@ +Yes, the house is affordable with $1237 to spare. +Yes, the house is affordable with $1287 to spare. +No, the house is not affordable. +No, the house is not affordable. +No, the house is not affordable. +No, the house is not affordable. diff --git a/problems/rubyshousehunt/data/secret/1.in b/problems/rubyshousehunt/data/secret/1.in new file mode 100644 index 0000000..4c3bb80 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/1.in @@ -0,0 +1,8 @@ +2000 0.075 10000 +6 +100000 200 +100000 150 +100000 1500 +100000 1500 +100000 1800 +150000 200 diff --git a/problems/rubyshousehunt/data/secret/2.ans b/problems/rubyshousehunt/data/secret/2.ans new file mode 100644 index 0000000..d2a39db --- /dev/null +++ b/problems/rubyshousehunt/data/secret/2.ans @@ -0,0 +1,4 @@ +Yes, the house is affordable with $5558 to spare. +No, the house is not affordable. +No, the house is not affordable. +No, the house is not affordable. diff --git a/problems/rubyshousehunt/data/secret/2.in b/problems/rubyshousehunt/data/secret/2.in new file mode 100644 index 0000000..53f9b02 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/2.in @@ -0,0 +1,6 @@ +10000 0.5 90000 +4 +100600 4000 +400000 200 +350450 50 +500500 200 diff --git a/problems/rubyshousehunt/data/secret/3.ans b/problems/rubyshousehunt/data/secret/3.ans new file mode 100644 index 0000000..ee1db35 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/3.ans @@ -0,0 +1,4 @@ +No, the house is not affordable. +No, the house is not affordable. +No, the house is not affordable. +Yes, the house is affordable with $16700 to spare. diff --git a/problems/rubyshousehunt/data/secret/3.in b/problems/rubyshousehunt/data/secret/3.in new file mode 100644 index 0000000..8ed544d --- /dev/null +++ b/problems/rubyshousehunt/data/secret/3.in @@ -0,0 +1,6 @@ +20000 0.4 95000 +4 +900600 40000 +900000 18000 +404005 19000 +152000 1400 diff --git a/problems/rubyshousehunt/data/secret/4.ans b/problems/rubyshousehunt/data/secret/4.ans new file mode 100644 index 0000000..f9eec7b --- /dev/null +++ b/problems/rubyshousehunt/data/secret/4.ans @@ -0,0 +1,4 @@ +Yes, the house is affordable with $7933 to spare. +No, the house is not affordable. +Yes, the house is affordable with $6117 to spare. +No, the house is not affordable. diff --git a/problems/rubyshousehunt/data/secret/4.in b/problems/rubyshousehunt/data/secret/4.in new file mode 100644 index 0000000..be17ca6 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/4.in @@ -0,0 +1,6 @@ +9000 0.085 20000 +4 +100000 500 +504005 10000 +160300 1889 +500300 10000 diff --git a/problems/rubyshousehunt/data/secret/5.ans b/problems/rubyshousehunt/data/secret/5.ans new file mode 100644 index 0000000..a9cdb61 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/5.ans @@ -0,0 +1,5 @@ +Yes, the house is affordable with $2000 to spare. +Yes, the house is affordable with $1500 to spare. +Yes, the house is affordable with $1000 to spare. +Yes, the house is affordable with $0 to spare. +No, the house is not affordable. diff --git a/problems/rubyshousehunt/data/secret/5.in b/problems/rubyshousehunt/data/secret/5.in new file mode 100644 index 0000000..4d4e1be --- /dev/null +++ b/problems/rubyshousehunt/data/secret/5.in @@ -0,0 +1,7 @@ +2000 0.0 10000 +5 +0 0 +0 500 +0 1000 +0 2000 +0 2001 diff --git a/problems/rubyshousehunt/data/secret/6.ans b/problems/rubyshousehunt/data/secret/6.ans new file mode 100644 index 0000000..051c396 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/6.ans @@ -0,0 +1,6 @@ +Yes, the house is affordable with $490 to spare. +Yes, the house is affordable with $0 to spare. +No, the house is not affordable. +Yes, the house is affordable with $400 to spare. +Yes, the house is affordable with $500 to spare. +No, the house is not affordable. diff --git a/problems/rubyshousehunt/data/secret/6.in b/problems/rubyshousehunt/data/secret/6.in new file mode 100644 index 0000000..1ccf094 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/6.in @@ -0,0 +1,8 @@ +500 0.0 10000 +6 +0 10 +0 500 +0 2000 +0 100 +0 0 +0 900 diff --git a/problems/rubyshousehunt/data/secret/7.ans b/problems/rubyshousehunt/data/secret/7.ans new file mode 100644 index 0000000..0b13d46 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/7.ans @@ -0,0 +1,6 @@ +Yes, the house is affordable with $1800 to spare. +Yes, the house is affordable with $1850 to spare. +Yes, the house is affordable with $500 to spare. +Yes, the house is affordable with $0 to spare. +Yes, the house is affordable with $200 to spare. +No, the house is not affordable. diff --git a/problems/rubyshousehunt/data/secret/7.in b/problems/rubyshousehunt/data/secret/7.in new file mode 100644 index 0000000..5f60466 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/7.in @@ -0,0 +1,8 @@ +2000 0.095 1000000 +6 +5000 200 +600000 150 +156000 1500 +477000 2000 +90000 1800 +560000 2500 diff --git a/problems/rubyshousehunt/data/secret/8.ans b/problems/rubyshousehunt/data/secret/8.ans new file mode 100644 index 0000000..dadc3ee --- /dev/null +++ b/problems/rubyshousehunt/data/secret/8.ans @@ -0,0 +1,5 @@ +No, the house is not affordable. +No, the house is not affordable. +Yes, the house is affordable with $1800 to spare. +Yes, the house is affordable with $950 to spare. +Yes, the house is affordable with $0 to spare. diff --git a/problems/rubyshousehunt/data/secret/8.in b/problems/rubyshousehunt/data/secret/8.in new file mode 100644 index 0000000..5a18ac7 --- /dev/null +++ b/problems/rubyshousehunt/data/secret/8.in @@ -0,0 +1,7 @@ +2000 0.055 1000000 +5 +677000 2200 +80000 2400 +5500 200 +300000 1050 +156000 2000 diff --git a/problems/rubyshousehunt/domjudge-problem.ini b/problems/rubyshousehunt/domjudge-problem.ini new file mode 100644 index 0000000..a2b1639 --- /dev/null +++ b/problems/rubyshousehunt/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Ruby's House Hunt" +timelimit = 3 +points = 2 diff --git a/problems/rubyshousehunt/problem.pdf b/problems/rubyshousehunt/problem.pdf Binary files differnew file mode 100644 index 0000000..e4731cb --- /dev/null +++ b/problems/rubyshousehunt/problem.pdf diff --git a/problems/somevigenere.py b/problems/somevigenere.py new file mode 100644 index 0000000..68967af --- /dev/null +++ b/problems/somevigenere.py @@ -0,0 +1,29 @@ +def encrypt(plaintext, key): + alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + plaintext = plaintext.replace(" ", "") + key_length = len(key) + key_expanded = (key * ((len(plaintext) // key_length) + 1))[:len(plaintext)] + encrypted_text = [] + + for pt_char, key_char in zip(plaintext, key_expanded): + pt_index = alphabet.index(pt_char) + key_index = alphabet.index(key_char) + encrypted_index = (pt_index + key_index) % 26 + encrypted_text.append(alphabet[encrypted_index]) + + encrypted_result = ''.join(encrypted_text) + + if encrypted_result: + print(encrypted_result) + else: + print("NOTHING") + +if __name__ == "__main__": + import sys + input = sys.stdin.read + data = input().splitlines() + + plaintext = data[0] + key = data[1] + + encrypt(plaintext, key) diff --git a/problems/somevigenere/attachments/template.c b/problems/somevigenere/attachments/template.c new file mode 100644 index 0000000..3a88b07 --- /dev/null +++ b/problems/somevigenere/attachments/template.c @@ -0,0 +1,19 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + char plain_text[64]; + scanf("%[^\n]", plain_text); fgetc(stdin); + char key[64]; + scanf("%[^\n]", key); + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("Caesar would be proud\n"); + + return 0; +} diff --git a/problems/somevigenere/attachments/template.cpp b/problems/somevigenere/attachments/template.cpp new file mode 100644 index 0000000..e8c24fa --- /dev/null +++ b/problems/somevigenere/attachments/template.cpp @@ -0,0 +1,19 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + string plain_text; + getline(cin, plain_text); + string key; + getline(cin, key); + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "Caesar would be proud" << endl; +} diff --git a/problems/somevigenere/attachments/template.java b/problems/somevigenere/attachments/template.java new file mode 100644 index 0000000..cb4ceea --- /dev/null +++ b/problems/somevigenere/attachments/template.java @@ -0,0 +1,17 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + String plainText = in.nextLine(); + String key = in.nextLine(); + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("Caesar would be proud"); + } +} diff --git a/problems/somevigenere/attachments/template.js b/problems/somevigenere/attachments/template.js new file mode 100644 index 0000000..00de663 --- /dev/null +++ b/problems/somevigenere/attachments/template.js @@ -0,0 +1,7 @@ +const plainText = readline(); +const key = readline(); + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('Caesar would be proud'); diff --git a/problems/somevigenere/attachments/template.py b/problems/somevigenere/attachments/template.py new file mode 100644 index 0000000..489505f --- /dev/null +++ b/problems/somevigenere/attachments/template.py @@ -0,0 +1,10 @@ +import sys +import math + +plain_text = input() +key = input() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("Caesar would be proud") diff --git a/problems/somevigenere/data/secret/1.ans b/problems/somevigenere/data/secret/1.ans new file mode 100644 index 0000000..7a53eba --- /dev/null +++ b/problems/somevigenere/data/secret/1.ans @@ -0,0 +1 @@ +RIJVSUYVJN diff --git a/problems/somevigenere/data/secret/1.in b/problems/somevigenere/data/secret/1.in new file mode 100644 index 0000000..ce1dc3d --- /dev/null +++ b/problems/somevigenere/data/secret/1.in @@ -0,0 +1,2 @@ +HELLO WORLD +KEY diff --git a/problems/somevigenere/data/secret/10.ans b/problems/somevigenere/data/secret/10.ans new file mode 100644 index 0000000..af6d157 --- /dev/null +++ b/problems/somevigenere/data/secret/10.ans @@ -0,0 +1 @@ +KADAHDIOJ diff --git a/problems/somevigenere/data/secret/10.in b/problems/somevigenere/data/secret/10.in new file mode 100644 index 0000000..156837c --- /dev/null +++ b/problems/somevigenere/data/secret/10.in @@ -0,0 +1,2 @@ +VA LI DA TO R +PASSED diff --git a/problems/somevigenere/data/secret/2.ans b/problems/somevigenere/data/secret/2.ans new file mode 100644 index 0000000..5233df1 --- /dev/null +++ b/problems/somevigenere/data/secret/2.ans @@ -0,0 +1 @@ +RIJYYUYVJN diff --git a/problems/somevigenere/data/secret/2.in b/problems/somevigenere/data/secret/2.in new file mode 100644 index 0000000..925324f --- /dev/null +++ b/problems/somevigenere/data/secret/2.in @@ -0,0 +1,2 @@ +HELOU WORLD +KEY diff --git a/problems/somevigenere/data/secret/3.ans b/problems/somevigenere/data/secret/3.ans new file mode 100644 index 0000000..a3e6e06 --- /dev/null +++ b/problems/somevigenere/data/secret/3.ans @@ -0,0 +1 @@ +RCEXCZSHVYZVBYP diff --git a/problems/somevigenere/data/secret/3.in b/problems/somevigenere/data/secret/3.in new file mode 100644 index 0000000..4a7fa16 --- /dev/null +++ b/problems/somevigenere/data/secret/3.in @@ -0,0 +1,2 @@ +FOR TEN EUR AN HOUR +MONEY diff --git a/problems/somevigenere/data/secret/4.ans b/problems/somevigenere/data/secret/4.ans new file mode 100644 index 0000000..0c3bc90 --- /dev/null +++ b/problems/somevigenere/data/secret/4.ans @@ -0,0 +1 @@ +QREVTE diff --git a/problems/somevigenere/data/secret/4.in b/problems/somevigenere/data/secret/4.in new file mode 100644 index 0000000..c40e84b --- /dev/null +++ b/problems/somevigenere/data/secret/4.in @@ -0,0 +1,2 @@ +OR MORE +CASH diff --git a/problems/somevigenere/data/secret/5.ans b/problems/somevigenere/data/secret/5.ans new file mode 100644 index 0000000..02bb77c --- /dev/null +++ b/problems/somevigenere/data/secret/5.ans @@ -0,0 +1 @@ +NOTHING diff --git a/problems/somevigenere/data/secret/5.in b/problems/somevigenere/data/secret/5.in new file mode 100644 index 0000000..9495aaa --- /dev/null +++ b/problems/somevigenere/data/secret/5.in @@ -0,0 +1,2 @@ + +F diff --git a/problems/somevigenere/data/secret/6.ans b/problems/somevigenere/data/secret/6.ans new file mode 100644 index 0000000..02bb77c --- /dev/null +++ b/problems/somevigenere/data/secret/6.ans @@ -0,0 +1 @@ +NOTHING diff --git a/problems/somevigenere/data/secret/6.in b/problems/somevigenere/data/secret/6.in new file mode 100644 index 0000000..1db8e33 --- /dev/null +++ b/problems/somevigenere/data/secret/6.in @@ -0,0 +1,2 @@ + +NOTHING diff --git a/problems/somevigenere/data/secret/7.ans b/problems/somevigenere/data/secret/7.ans new file mode 100644 index 0000000..9fde654 --- /dev/null +++ b/problems/somevigenere/data/secret/7.ans @@ -0,0 +1 @@ +TKKRRKKT diff --git a/problems/somevigenere/data/secret/7.in b/problems/somevigenere/data/secret/7.in new file mode 100644 index 0000000..b257814 --- /dev/null +++ b/problems/somevigenere/data/secret/7.in @@ -0,0 +1,2 @@ +FORTYTWO +OWTYTROF diff --git a/problems/somevigenere/data/secret/8.ans b/problems/somevigenere/data/secret/8.ans new file mode 100644 index 0000000..5c13e37 --- /dev/null +++ b/problems/somevigenere/data/secret/8.ans @@ -0,0 +1 @@ +YIMMCKZMHT diff --git a/problems/somevigenere/data/secret/8.in b/problems/somevigenere/data/secret/8.in new file mode 100644 index 0000000..a90a663 --- /dev/null +++ b/problems/somevigenere/data/secret/8.in @@ -0,0 +1,2 @@ +EVERYTHING +UNIVERSE diff --git a/problems/somevigenere/data/secret/9.ans b/problems/somevigenere/data/secret/9.ans new file mode 100644 index 0000000..ddab26f --- /dev/null +++ b/problems/somevigenere/data/secret/9.ans @@ -0,0 +1 @@ +CSMEPCGTIKT diff --git a/problems/somevigenere/data/secret/9.in b/problems/somevigenere/data/secret/9.in new file mode 100644 index 0000000..94929fa --- /dev/null +++ b/problems/somevigenere/data/secret/9.in @@ -0,0 +1,2 @@ +A SIMPLE TEST +CAESAR diff --git a/problems/somevigenere/domjudge-problem.ini b/problems/somevigenere/domjudge-problem.ini new file mode 100644 index 0000000..75313b1 --- /dev/null +++ b/problems/somevigenere/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Some Vigenère" +timelimit = 3 +points = 2 diff --git a/problems/somevigenere/problem.pdf b/problems/somevigenere/problem.pdf Binary files differnew file mode 100644 index 0000000..a0f25a1 --- /dev/null +++ b/problems/somevigenere/problem.pdf diff --git a/problems/starshiplaunchcodes/attachments/template.c b/problems/starshiplaunchcodes/attachments/template.c new file mode 100644 index 0000000..228b009 --- /dev/null +++ b/problems/starshiplaunchcodes/attachments/template.c @@ -0,0 +1,17 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int S; + scanf("%d", &S); + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("code(s)\n"); + + return 0; +} diff --git a/problems/starshiplaunchcodes/attachments/template.cpp b/problems/starshiplaunchcodes/attachments/template.cpp new file mode 100644 index 0000000..5bf1d30 --- /dev/null +++ b/problems/starshiplaunchcodes/attachments/template.cpp @@ -0,0 +1,17 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int s; + cin >> s; cin.ignore(); + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "code(s)" << endl; +} diff --git a/problems/starshiplaunchcodes/attachments/template.java b/problems/starshiplaunchcodes/attachments/template.java new file mode 100644 index 0000000..db7de41 --- /dev/null +++ b/problems/starshiplaunchcodes/attachments/template.java @@ -0,0 +1,16 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int S = in.nextInt(); + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("code(s)"); + } +} diff --git a/problems/starshiplaunchcodes/attachments/template.js b/problems/starshiplaunchcodes/attachments/template.js new file mode 100644 index 0000000..7cac261 --- /dev/null +++ b/problems/starshiplaunchcodes/attachments/template.js @@ -0,0 +1,6 @@ +const S = parseInt(readline()); + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('code(s)'); diff --git a/problems/starshiplaunchcodes/attachments/template.py b/problems/starshiplaunchcodes/attachments/template.py new file mode 100644 index 0000000..772dd3f --- /dev/null +++ b/problems/starshiplaunchcodes/attachments/template.py @@ -0,0 +1,9 @@ +import sys +import math + +s = int(input()) + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("code(s)") diff --git a/problems/starshiplaunchcodes/data/secret/1.ans b/problems/starshiplaunchcodes/data/secret/1.ans new file mode 100644 index 0000000..f4b23ca --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/1.ans @@ -0,0 +1,2 @@ +0110 +1001 diff --git a/problems/starshiplaunchcodes/data/secret/1.in b/problems/starshiplaunchcodes/data/secret/1.in new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/1.in @@ -0,0 +1 @@ +2 diff --git a/problems/starshiplaunchcodes/data/secret/2.ans b/problems/starshiplaunchcodes/data/secret/2.ans new file mode 100644 index 0000000..7b7c8e4 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/2.ans @@ -0,0 +1,3 @@ +0220 +1111 +2002 diff --git a/problems/starshiplaunchcodes/data/secret/2.in b/problems/starshiplaunchcodes/data/secret/2.in new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/2.in @@ -0,0 +1 @@ +4 diff --git a/problems/starshiplaunchcodes/data/secret/3.ans b/problems/starshiplaunchcodes/data/secret/3.ans new file mode 100644 index 0000000..739d797 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/3.ans @@ -0,0 +1 @@ +0000 diff --git a/problems/starshiplaunchcodes/data/secret/3.in b/problems/starshiplaunchcodes/data/secret/3.in new file mode 100644 index 0000000..573541a --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/3.in @@ -0,0 +1 @@ +0 diff --git a/problems/starshiplaunchcodes/data/secret/4.ans b/problems/starshiplaunchcodes/data/secret/4.ans new file mode 100644 index 0000000..952a2eb --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/4.ans @@ -0,0 +1,4 @@ +0330 +1221 +2112 +3003 diff --git a/problems/starshiplaunchcodes/data/secret/4.in b/problems/starshiplaunchcodes/data/secret/4.in new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/4.in @@ -0,0 +1 @@ +6 diff --git a/problems/starshiplaunchcodes/data/secret/5.ans b/problems/starshiplaunchcodes/data/secret/5.ans new file mode 100644 index 0000000..2869f84 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/5.ans @@ -0,0 +1,5 @@ +0440 +1331 +2222 +3113 +4004 diff --git a/problems/starshiplaunchcodes/data/secret/5.in b/problems/starshiplaunchcodes/data/secret/5.in new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/5.in @@ -0,0 +1 @@ +8 diff --git a/problems/starshiplaunchcodes/data/secret/6.ans b/problems/starshiplaunchcodes/data/secret/6.ans new file mode 100644 index 0000000..e4c6a74 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/6.ans @@ -0,0 +1,6 @@ +0550 +1441 +2332 +3223 +4114 +5005 diff --git a/problems/starshiplaunchcodes/data/secret/6.in b/problems/starshiplaunchcodes/data/secret/6.in new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/6.in @@ -0,0 +1 @@ +10 diff --git a/problems/starshiplaunchcodes/data/secret/7.ans b/problems/starshiplaunchcodes/data/secret/7.ans new file mode 100644 index 0000000..97e8e6b --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/7.ans @@ -0,0 +1,8 @@ +0770 +1661 +2552 +3443 +4334 +5225 +6116 +7007 diff --git a/problems/starshiplaunchcodes/data/secret/7.in b/problems/starshiplaunchcodes/data/secret/7.in new file mode 100644 index 0000000..8351c19 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/7.in @@ -0,0 +1 @@ +14 diff --git a/problems/starshiplaunchcodes/data/secret/8.ans b/problems/starshiplaunchcodes/data/secret/8.ans new file mode 100644 index 0000000..3c2df07 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/8.ans @@ -0,0 +1 @@ +9999 diff --git a/problems/starshiplaunchcodes/data/secret/8.in b/problems/starshiplaunchcodes/data/secret/8.in new file mode 100644 index 0000000..7facc89 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/8.in @@ -0,0 +1 @@ +36 diff --git a/problems/starshiplaunchcodes/data/secret/9.ans b/problems/starshiplaunchcodes/data/secret/9.ans new file mode 100644 index 0000000..554ef0f --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/9.ans @@ -0,0 +1,3 @@ +7997 +8888 +9779 diff --git a/problems/starshiplaunchcodes/data/secret/9.in b/problems/starshiplaunchcodes/data/secret/9.in new file mode 100644 index 0000000..f5c8955 --- /dev/null +++ b/problems/starshiplaunchcodes/data/secret/9.in @@ -0,0 +1 @@ +32 diff --git a/problems/starshiplaunchcodes/domjudge-problem.ini b/problems/starshiplaunchcodes/domjudge-problem.ini new file mode 100644 index 0000000..1cb76f0 --- /dev/null +++ b/problems/starshiplaunchcodes/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Starship Launch Codes" +timelimit = 3 +points = 2 diff --git a/problems/starshiplaunchcodes/problem.pdf b/problems/starshiplaunchcodes/problem.pdf Binary files differnew file mode 100644 index 0000000..fec26e7 --- /dev/null +++ b/problems/starshiplaunchcodes/problem.pdf diff --git a/problems/theshopowner/attachments/template.c b/problems/theshopowner/attachments/template.c new file mode 100644 index 0000000..0d1ad6c --- /dev/null +++ b/problems/theshopowner/attachments/template.c @@ -0,0 +1,27 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int d; + scanf("%d", &d); + int c; + scanf("%d", &c); + int n; + scanf("%d", &n); + for (int i = 0; i < n; i++) { + int unit_cost; + int unit_revenue; + int quantity; + scanf("%d%d%d", &unit_cost, &unit_revenue, &quantity); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("answer\n"); + + return 0; +} diff --git a/problems/theshopowner/attachments/template.cpp b/problems/theshopowner/attachments/template.cpp new file mode 100644 index 0000000..9b47479 --- /dev/null +++ b/problems/theshopowner/attachments/template.cpp @@ -0,0 +1,27 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int d; + cin >> d; cin.ignore(); + int c; + cin >> c; cin.ignore(); + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + int unit_cost; + int unit_revenue; + int quantity; + cin >> unit_cost >> unit_revenue >> quantity; cin.ignore(); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "answer" << endl; +} diff --git a/problems/theshopowner/attachments/template.java b/problems/theshopowner/attachments/template.java new file mode 100644 index 0000000..8a9f35a --- /dev/null +++ b/problems/theshopowner/attachments/template.java @@ -0,0 +1,23 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int d = in.nextInt(); + int c = in.nextInt(); + int n = in.nextInt(); + for (int i = 0; i < n; i++) { + int unitCost = in.nextInt(); + int unitRevenue = in.nextInt(); + int quantity = in.nextInt(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("answer"); + } +} diff --git a/problems/theshopowner/attachments/template.js b/problems/theshopowner/attachments/template.js new file mode 100644 index 0000000..ecb01d7 --- /dev/null +++ b/problems/theshopowner/attachments/template.js @@ -0,0 +1,14 @@ +const d = parseInt(readline()); +const c = parseInt(readline()); +const n = parseInt(readline()); +for (let i = 0; i < n; i++) { + var inputs = readline().split(' '); + const unitCost = parseInt(inputs[0]); + const unitRevenue = parseInt(inputs[1]); + const quantity = parseInt(inputs[2]); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('answer'); diff --git a/problems/theshopowner/attachments/template.py b/problems/theshopowner/attachments/template.py new file mode 100644 index 0000000..f8dc42d --- /dev/null +++ b/problems/theshopowner/attachments/template.py @@ -0,0 +1,13 @@ +import sys +import math + +d = int(input()) +c = int(input()) +n = int(input()) +for i in range(n): + unit_cost, unit_revenue, quantity = [int(j) for j in input().split()] + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("answer") diff --git a/problems/theshopowner/data/secret/1.ans b/problems/theshopowner/data/secret/1.ans new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/problems/theshopowner/data/secret/1.ans @@ -0,0 +1 @@ +24 diff --git a/problems/theshopowner/data/secret/1.in b/problems/theshopowner/data/secret/1.in new file mode 100644 index 0000000..01c4875 --- /dev/null +++ b/problems/theshopowner/data/secret/1.in @@ -0,0 +1,5 @@ +3 +3 +2 +1 2 25 +3 5 50 diff --git a/problems/theshopowner/data/secret/10.ans b/problems/theshopowner/data/secret/10.ans new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/problems/theshopowner/data/secret/10.ans @@ -0,0 +1 @@ +12 diff --git a/problems/theshopowner/data/secret/10.in b/problems/theshopowner/data/secret/10.in new file mode 100644 index 0000000..e162081 --- /dev/null +++ b/problems/theshopowner/data/secret/10.in @@ -0,0 +1,6 @@ +40 +12 +3 +12 11 15 +25 22 25 +10 9 6 diff --git a/problems/theshopowner/data/secret/2.ans b/problems/theshopowner/data/secret/2.ans new file mode 100644 index 0000000..21e72e8 --- /dev/null +++ b/problems/theshopowner/data/secret/2.ans @@ -0,0 +1 @@ +48 diff --git a/problems/theshopowner/data/secret/2.in b/problems/theshopowner/data/secret/2.in new file mode 100644 index 0000000..b8144c5 --- /dev/null +++ b/problems/theshopowner/data/secret/2.in @@ -0,0 +1,6 @@ +3 +6 +3 +3 6 25 +6 9 2 +5 6 54 diff --git a/problems/theshopowner/data/secret/3.ans b/problems/theshopowner/data/secret/3.ans new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/problems/theshopowner/data/secret/3.ans @@ -0,0 +1 @@ +11 diff --git a/problems/theshopowner/data/secret/3.in b/problems/theshopowner/data/secret/3.in new file mode 100644 index 0000000..c1669ed --- /dev/null +++ b/problems/theshopowner/data/secret/3.in @@ -0,0 +1,5 @@ +2 +5 +2 +3 5 55 +10 11 25 diff --git a/problems/theshopowner/data/secret/4.ans b/problems/theshopowner/data/secret/4.ans new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/problems/theshopowner/data/secret/4.ans @@ -0,0 +1 @@ +8 diff --git a/problems/theshopowner/data/secret/4.in b/problems/theshopowner/data/secret/4.in new file mode 100644 index 0000000..f743e7b --- /dev/null +++ b/problems/theshopowner/data/secret/4.in @@ -0,0 +1,6 @@ +3 +4 +3 +3 4 25 +45 55 55 +5 6 25 diff --git a/problems/theshopowner/data/secret/5.ans b/problems/theshopowner/data/secret/5.ans new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/problems/theshopowner/data/secret/5.ans @@ -0,0 +1 @@ +42 diff --git a/problems/theshopowner/data/secret/5.in b/problems/theshopowner/data/secret/5.in new file mode 100644 index 0000000..7f35731 --- /dev/null +++ b/problems/theshopowner/data/secret/5.in @@ -0,0 +1,6 @@ +6 +4 +3 +3 4 5 +5 8 25 +8 12 2 diff --git a/problems/theshopowner/data/secret/6.ans b/problems/theshopowner/data/secret/6.ans new file mode 100644 index 0000000..abdfb05 --- /dev/null +++ b/problems/theshopowner/data/secret/6.ans @@ -0,0 +1 @@ +60 diff --git a/problems/theshopowner/data/secret/6.in b/problems/theshopowner/data/secret/6.in new file mode 100644 index 0000000..ed5c6be --- /dev/null +++ b/problems/theshopowner/data/secret/6.in @@ -0,0 +1,7 @@ +6 +12 +4 +6 7 25 +14 17 25 +16 23 25 +24 32 2 diff --git a/problems/theshopowner/data/secret/7.ans b/problems/theshopowner/data/secret/7.ans new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/problems/theshopowner/data/secret/7.ans @@ -0,0 +1 @@ +6 diff --git a/problems/theshopowner/data/secret/7.in b/problems/theshopowner/data/secret/7.in new file mode 100644 index 0000000..3644fb5 --- /dev/null +++ b/problems/theshopowner/data/secret/7.in @@ -0,0 +1,3 @@ +3 +6 +0 diff --git a/problems/theshopowner/data/secret/8.ans b/problems/theshopowner/data/secret/8.ans new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/problems/theshopowner/data/secret/8.ans @@ -0,0 +1 @@ +8 diff --git a/problems/theshopowner/data/secret/8.in b/problems/theshopowner/data/secret/8.in new file mode 100644 index 0000000..bcd7b29 --- /dev/null +++ b/problems/theshopowner/data/secret/8.in @@ -0,0 +1,3 @@ +5 +8 +0 diff --git a/problems/theshopowner/data/secret/9.ans b/problems/theshopowner/data/secret/9.ans new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/problems/theshopowner/data/secret/9.ans @@ -0,0 +1 @@ +6 diff --git a/problems/theshopowner/data/secret/9.in b/problems/theshopowner/data/secret/9.in new file mode 100644 index 0000000..d20d2ae --- /dev/null +++ b/problems/theshopowner/data/secret/9.in @@ -0,0 +1,6 @@ +5 +6 +3 +6 5 58 +4 3 5 +2 1 5 diff --git a/problems/theshopowner/domjudge-problem.ini b/problems/theshopowner/domjudge-problem.ini new file mode 100644 index 0000000..112289d --- /dev/null +++ b/problems/theshopowner/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "The Shop Owner" +timelimit = 3 +points = 2 diff --git a/problems/theshopowner/problem.pdf b/problems/theshopowner/problem.pdf Binary files differnew file mode 100644 index 0000000..9db31ab --- /dev/null +++ b/problems/theshopowner/problem.pdf diff --git a/problems/thewolves/attachments/template.c b/problems/thewolves/attachments/template.c new file mode 100644 index 0000000..271bf24 --- /dev/null +++ b/problems/thewolves/attachments/template.c @@ -0,0 +1,18 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int gray_wolves; + int black_wolves; + scanf("%d%d", &gray_wolves, &black_wolves); + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("answer\n"); + + return 0; +} diff --git a/problems/thewolves/attachments/template.cpp b/problems/thewolves/attachments/template.cpp new file mode 100644 index 0000000..36383f8 --- /dev/null +++ b/problems/thewolves/attachments/template.cpp @@ -0,0 +1,18 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int gray_wolves; + int black_wolves; + cin >> gray_wolves >> black_wolves; cin.ignore(); + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "answer" << endl; +} diff --git a/problems/thewolves/attachments/template.java b/problems/thewolves/attachments/template.java new file mode 100644 index 0000000..9fff199 --- /dev/null +++ b/problems/thewolves/attachments/template.java @@ -0,0 +1,17 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int grayWolves = in.nextInt(); + int blackWolves = in.nextInt(); + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("answer"); + } +} diff --git a/problems/thewolves/attachments/template.js b/problems/thewolves/attachments/template.js new file mode 100644 index 0000000..217c220 --- /dev/null +++ b/problems/thewolves/attachments/template.js @@ -0,0 +1,8 @@ +var inputs = readline().split(' '); +const grayWolves = parseInt(inputs[0]); +const blackWolves = parseInt(inputs[1]); + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('answer'); diff --git a/problems/thewolves/attachments/template.py b/problems/thewolves/attachments/template.py new file mode 100644 index 0000000..bbc0b57 --- /dev/null +++ b/problems/thewolves/attachments/template.py @@ -0,0 +1,9 @@ +import sys +import math + +gray_wolves, black_wolves = [int(i) for i in input().split()] + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("answer") diff --git a/problems/thewolves/data/secret/1.ans b/problems/thewolves/data/secret/1.ans new file mode 100644 index 0000000..0b3fbfd --- /dev/null +++ b/problems/thewolves/data/secret/1.ans @@ -0,0 +1 @@ +12 5 No diff --git a/problems/thewolves/data/secret/1.in b/problems/thewolves/data/secret/1.in new file mode 100644 index 0000000..cba3471 --- /dev/null +++ b/problems/thewolves/data/secret/1.in @@ -0,0 +1 @@ +2 1 diff --git a/problems/thewolves/data/secret/10.ans b/problems/thewolves/data/secret/10.ans new file mode 100644 index 0000000..87af644 --- /dev/null +++ b/problems/thewolves/data/secret/10.ans @@ -0,0 +1 @@ +1600 550 Yes diff --git a/problems/thewolves/data/secret/10.in b/problems/thewolves/data/secret/10.in new file mode 100644 index 0000000..042b582 --- /dev/null +++ b/problems/thewolves/data/secret/10.in @@ -0,0 +1 @@ +150 250 diff --git a/problems/thewolves/data/secret/11.ans b/problems/thewolves/data/secret/11.ans new file mode 100644 index 0000000..c0d9b68 --- /dev/null +++ b/problems/thewolves/data/secret/11.ans @@ -0,0 +1 @@ +2000 700 Yes diff --git a/problems/thewolves/data/secret/11.in b/problems/thewolves/data/secret/11.in new file mode 100644 index 0000000..fad083b --- /dev/null +++ b/problems/thewolves/data/secret/11.in @@ -0,0 +1 @@ +200 300 diff --git a/problems/thewolves/data/secret/12.ans b/problems/thewolves/data/secret/12.ans new file mode 100644 index 0000000..e5667eb --- /dev/null +++ b/problems/thewolves/data/secret/12.ans @@ -0,0 +1 @@ +3200 1100 Yes diff --git a/problems/thewolves/data/secret/12.in b/problems/thewolves/data/secret/12.in new file mode 100644 index 0000000..3557769 --- /dev/null +++ b/problems/thewolves/data/secret/12.in @@ -0,0 +1 @@ +300 500 diff --git a/problems/thewolves/data/secret/13.ans b/problems/thewolves/data/secret/13.ans new file mode 100644 index 0000000..a3d432a --- /dev/null +++ b/problems/thewolves/data/secret/13.ans @@ -0,0 +1 @@ +6000 2000 Yes diff --git a/problems/thewolves/data/secret/13.in b/problems/thewolves/data/secret/13.in new file mode 100644 index 0000000..24c334a --- /dev/null +++ b/problems/thewolves/data/secret/13.in @@ -0,0 +1 @@ +500 1000 diff --git a/problems/thewolves/data/secret/14.ans b/problems/thewolves/data/secret/14.ans new file mode 100644 index 0000000..7cd3135 --- /dev/null +++ b/problems/thewolves/data/secret/14.ans @@ -0,0 +1 @@ +10000 3500 Yes diff --git a/problems/thewolves/data/secret/14.in b/problems/thewolves/data/secret/14.in new file mode 100644 index 0000000..adfca49 --- /dev/null +++ b/problems/thewolves/data/secret/14.in @@ -0,0 +1 @@ +1000 1500 diff --git a/problems/thewolves/data/secret/2.ans b/problems/thewolves/data/secret/2.ans new file mode 100644 index 0000000..525ca49 --- /dev/null +++ b/problems/thewolves/data/secret/2.ans @@ -0,0 +1 @@ +12 4 No diff --git a/problems/thewolves/data/secret/2.in b/problems/thewolves/data/secret/2.in new file mode 100644 index 0000000..8d04f96 --- /dev/null +++ b/problems/thewolves/data/secret/2.in @@ -0,0 +1 @@ +1 2 diff --git a/problems/thewolves/data/secret/3.ans b/problems/thewolves/data/secret/3.ans new file mode 100644 index 0000000..470810b --- /dev/null +++ b/problems/thewolves/data/secret/3.ans @@ -0,0 +1 @@ +20 8 No diff --git a/problems/thewolves/data/secret/3.in b/problems/thewolves/data/secret/3.in new file mode 100644 index 0000000..bce4388 --- /dev/null +++ b/problems/thewolves/data/secret/3.in @@ -0,0 +1 @@ +3 2 diff --git a/problems/thewolves/data/secret/4.ans b/problems/thewolves/data/secret/4.ans new file mode 100644 index 0000000..85d9cda --- /dev/null +++ b/problems/thewolves/data/secret/4.ans @@ -0,0 +1 @@ +20 7 No diff --git a/problems/thewolves/data/secret/4.in b/problems/thewolves/data/secret/4.in new file mode 100644 index 0000000..654d526 --- /dev/null +++ b/problems/thewolves/data/secret/4.in @@ -0,0 +1 @@ +2 3 diff --git a/problems/thewolves/data/secret/5.ans b/problems/thewolves/data/secret/5.ans new file mode 100644 index 0000000..f3c8ff9 --- /dev/null +++ b/problems/thewolves/data/secret/5.ans @@ -0,0 +1 @@ +40 16 Yes diff --git a/problems/thewolves/data/secret/5.in b/problems/thewolves/data/secret/5.in new file mode 100644 index 0000000..9efb403 --- /dev/null +++ b/problems/thewolves/data/secret/5.in @@ -0,0 +1 @@ +6 4 diff --git a/problems/thewolves/data/secret/6.ans b/problems/thewolves/data/secret/6.ans new file mode 100644 index 0000000..951a67d --- /dev/null +++ b/problems/thewolves/data/secret/6.ans @@ -0,0 +1 @@ +32 12 Yes diff --git a/problems/thewolves/data/secret/6.in b/problems/thewolves/data/secret/6.in new file mode 100644 index 0000000..8835c07 --- /dev/null +++ b/problems/thewolves/data/secret/6.in @@ -0,0 +1 @@ +4 4 diff --git a/problems/thewolves/data/secret/7.ans b/problems/thewolves/data/secret/7.ans new file mode 100644 index 0000000..7d20fc2 --- /dev/null +++ b/problems/thewolves/data/secret/7.ans @@ -0,0 +1 @@ +48 19 Yes diff --git a/problems/thewolves/data/secret/7.in b/problems/thewolves/data/secret/7.in new file mode 100644 index 0000000..e5a3ec4 --- /dev/null +++ b/problems/thewolves/data/secret/7.in @@ -0,0 +1 @@ +7 5 diff --git a/problems/thewolves/data/secret/8.ans b/problems/thewolves/data/secret/8.ans new file mode 100644 index 0000000..9e58ceb --- /dev/null +++ b/problems/thewolves/data/secret/8.ans @@ -0,0 +1 @@ +44 16 Yes diff --git a/problems/thewolves/data/secret/8.in b/problems/thewolves/data/secret/8.in new file mode 100644 index 0000000..e605fb0 --- /dev/null +++ b/problems/thewolves/data/secret/8.in @@ -0,0 +1 @@ +5 6 diff --git a/problems/thewolves/data/secret/9.ans b/problems/thewolves/data/secret/9.ans new file mode 100644 index 0000000..a0c7bee --- /dev/null +++ b/problems/thewolves/data/secret/9.ans @@ -0,0 +1 @@ +480 170 Yes diff --git a/problems/thewolves/data/secret/9.in b/problems/thewolves/data/secret/9.in new file mode 100644 index 0000000..2055899 --- /dev/null +++ b/problems/thewolves/data/secret/9.in @@ -0,0 +1 @@ +50 70 diff --git a/problems/thewolves/domjudge-problem.ini b/problems/thewolves/domjudge-problem.ini new file mode 100644 index 0000000..2865791 --- /dev/null +++ b/problems/thewolves/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "The Wolves" +timelimit = 3 +points = 2 diff --git a/problems/thewolves/problem.pdf b/problems/thewolves/problem.pdf Binary files differnew file mode 100644 index 0000000..6448aa0 --- /dev/null +++ b/problems/thewolves/problem.pdf diff --git a/problems/whatsthatprogression/attachments/template.c b/problems/whatsthatprogression/attachments/template.c new file mode 100644 index 0000000..ac44136 --- /dev/null +++ b/problems/whatsthatprogression/attachments/template.c @@ -0,0 +1,26 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int income; + float mr; + int savings; + scanf("%d%f%d", &income, &mr, &savings); + int N; + scanf("%d", &N); + for (int i = 0; i < N; i++) { + int price; + int expenses; + scanf("%d%d", &price, &expenses); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("Yes, the house is affordable with 1 roommate(s) and $1 to spare.\n"); + + return 0; +} diff --git a/problems/whatsthatprogression/attachments/template.cpp b/problems/whatsthatprogression/attachments/template.cpp new file mode 100644 index 0000000..0f9ddf7 --- /dev/null +++ b/problems/whatsthatprogression/attachments/template.cpp @@ -0,0 +1,26 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int income; + float mr; + int savings; + cin >> income >> mr >> savings; cin.ignore(); + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + int price; + int expenses; + cin >> price >> expenses; cin.ignore(); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "Yes, the house is affordable with 1 roommate(s) and $1 to spare." << endl; +} diff --git a/problems/whatsthatprogression/attachments/template.java b/problems/whatsthatprogression/attachments/template.java new file mode 100644 index 0000000..ee06c60 --- /dev/null +++ b/problems/whatsthatprogression/attachments/template.java @@ -0,0 +1,23 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int income = in.nextInt(); + float mr = in.nextFloat(); + int savings = in.nextInt(); + int N = in.nextInt(); + for (int i = 0; i < N; i++) { + int price = in.nextInt(); + int expenses = in.nextInt(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("Yes, the house is affordable with 1 roommate(s) and $1 to spare."); + } +} diff --git a/problems/whatsthatprogression/attachments/template.js b/problems/whatsthatprogression/attachments/template.js new file mode 100644 index 0000000..cb27e76 --- /dev/null +++ b/problems/whatsthatprogression/attachments/template.js @@ -0,0 +1,15 @@ +var inputs = readline().split(' '); +const income = parseInt(inputs[0]); +const mr = parseFloat(inputs[1]); +const savings = parseInt(inputs[2]); +const N = parseInt(readline()); +for (let i = 0; i < N; i++) { + var inputs = readline().split(' '); + const price = parseInt(inputs[0]); + const expenses = parseInt(inputs[1]); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('Yes, the house is affordable with 1 roommate(s) and $1 to spare.'); diff --git a/problems/whatsthatprogression/attachments/template.py b/problems/whatsthatprogression/attachments/template.py new file mode 100644 index 0000000..3fa952c --- /dev/null +++ b/problems/whatsthatprogression/attachments/template.py @@ -0,0 +1,15 @@ +import sys +import math + +inputs = input().split() +income = int(inputs[0]) +mr = float(inputs[1]) +savings = int(inputs[2]) +n = int(input()) +for i in range(n): + price, expenses = [int(j) for j in input().split()] + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("Yes, the house is affordable with 1 roommate(s) and $1 to spare.") diff --git a/problems/whatsthatprogression/data/secret/1.ans b/problems/whatsthatprogression/data/secret/1.ans new file mode 100644 index 0000000..8dc78e9 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/1.ans @@ -0,0 +1 @@ +Geometric Progression diff --git a/problems/whatsthatprogression/data/secret/1.in b/problems/whatsthatprogression/data/secret/1.in new file mode 100644 index 0000000..12339a4 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/1.in @@ -0,0 +1 @@ +1 2 4 8 16 32 diff --git a/problems/whatsthatprogression/data/secret/10.ans b/problems/whatsthatprogression/data/secret/10.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/10.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/10.in b/problems/whatsthatprogression/data/secret/10.in new file mode 100644 index 0000000..40e259c --- /dev/null +++ b/problems/whatsthatprogression/data/secret/10.in @@ -0,0 +1 @@ +-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 diff --git a/problems/whatsthatprogression/data/secret/11.ans b/problems/whatsthatprogression/data/secret/11.ans new file mode 100644 index 0000000..8dc78e9 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/11.ans @@ -0,0 +1 @@ +Geometric Progression diff --git a/problems/whatsthatprogression/data/secret/11.in b/problems/whatsthatprogression/data/secret/11.in new file mode 100644 index 0000000..0e91281 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/11.in @@ -0,0 +1 @@ +-1 2 -4 8 -16 32 -64 128 diff --git a/problems/whatsthatprogression/data/secret/12.ans b/problems/whatsthatprogression/data/secret/12.ans new file mode 100644 index 0000000..8dc78e9 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/12.ans @@ -0,0 +1 @@ +Geometric Progression diff --git a/problems/whatsthatprogression/data/secret/12.in b/problems/whatsthatprogression/data/secret/12.in new file mode 100644 index 0000000..4cae50e --- /dev/null +++ b/problems/whatsthatprogression/data/secret/12.in @@ -0,0 +1 @@ +128 -64 32 -16 8 -4 2 -1 diff --git a/problems/whatsthatprogression/data/secret/13.ans b/problems/whatsthatprogression/data/secret/13.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/13.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/13.in b/problems/whatsthatprogression/data/secret/13.in new file mode 100644 index 0000000..54708f7 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/13.in @@ -0,0 +1 @@ +-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 diff --git a/problems/whatsthatprogression/data/secret/14.ans b/problems/whatsthatprogression/data/secret/14.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/14.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/14.in b/problems/whatsthatprogression/data/secret/14.in new file mode 100644 index 0000000..8e9f1b3 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/14.in @@ -0,0 +1 @@ +-90 -81 -72 -63 -54 -45 -36 -27 -18 -9 0 diff --git a/problems/whatsthatprogression/data/secret/2.ans b/problems/whatsthatprogression/data/secret/2.ans new file mode 100644 index 0000000..8dc78e9 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/2.ans @@ -0,0 +1 @@ +Geometric Progression diff --git a/problems/whatsthatprogression/data/secret/2.in b/problems/whatsthatprogression/data/secret/2.in new file mode 100644 index 0000000..cce79f8 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/2.in @@ -0,0 +1 @@ +1 -3 9 -27 81 -243 diff --git a/problems/whatsthatprogression/data/secret/3.ans b/problems/whatsthatprogression/data/secret/3.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/3.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/3.in b/problems/whatsthatprogression/data/secret/3.in new file mode 100644 index 0000000..4d97e97 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/3.in @@ -0,0 +1 @@ +-1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 diff --git a/problems/whatsthatprogression/data/secret/4.ans b/problems/whatsthatprogression/data/secret/4.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/4.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/4.in b/problems/whatsthatprogression/data/secret/4.in new file mode 100644 index 0000000..7d7df09 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/4.in @@ -0,0 +1 @@ +-2 -4 -6 -8 -10 -12 -14 -16 diff --git a/problems/whatsthatprogression/data/secret/5.ans b/problems/whatsthatprogression/data/secret/5.ans new file mode 100644 index 0000000..03c65c0 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/5.ans @@ -0,0 +1 @@ +Random diff --git a/problems/whatsthatprogression/data/secret/5.in b/problems/whatsthatprogression/data/secret/5.in new file mode 100644 index 0000000..d374182 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/5.in @@ -0,0 +1 @@ +1 3 5 7 9 11 13 15 17 19 21 23 24 25 27 29 31 diff --git a/problems/whatsthatprogression/data/secret/6.ans b/problems/whatsthatprogression/data/secret/6.ans new file mode 100644 index 0000000..03c65c0 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/6.ans @@ -0,0 +1 @@ +Random diff --git a/problems/whatsthatprogression/data/secret/6.in b/problems/whatsthatprogression/data/secret/6.in new file mode 100644 index 0000000..0803afc --- /dev/null +++ b/problems/whatsthatprogression/data/secret/6.in @@ -0,0 +1 @@ +2 4 6 8 10 12 14 16 18 21 22 24 26 29 40 41 diff --git a/problems/whatsthatprogression/data/secret/7.ans b/problems/whatsthatprogression/data/secret/7.ans new file mode 100644 index 0000000..03c65c0 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/7.ans @@ -0,0 +1 @@ +Random diff --git a/problems/whatsthatprogression/data/secret/7.in b/problems/whatsthatprogression/data/secret/7.in new file mode 100644 index 0000000..7d43d2d --- /dev/null +++ b/problems/whatsthatprogression/data/secret/7.in @@ -0,0 +1 @@ +0 1 1 2 3 5 8 13 21 34 55 89 144 diff --git a/problems/whatsthatprogression/data/secret/8.ans b/problems/whatsthatprogression/data/secret/8.ans new file mode 100644 index 0000000..03c65c0 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/8.ans @@ -0,0 +1 @@ +Random diff --git a/problems/whatsthatprogression/data/secret/8.in b/problems/whatsthatprogression/data/secret/8.in new file mode 100644 index 0000000..ff05c48 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/8.in @@ -0,0 +1 @@ +0 9 18 27 36 45 54 63 72 81 90 99 100 108 117 126 135 diff --git a/problems/whatsthatprogression/data/secret/9.ans b/problems/whatsthatprogression/data/secret/9.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/9.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/9.in b/problems/whatsthatprogression/data/secret/9.in new file mode 100644 index 0000000..b5cbb2b --- /dev/null +++ b/problems/whatsthatprogression/data/secret/9.in @@ -0,0 +1 @@ +-6 -4 -2 0 2 4 6 8 diff --git a/problems/whatsthatprogression/domjudge-problem.ini b/problems/whatsthatprogression/domjudge-problem.ini new file mode 100644 index 0000000..4ab45cb --- /dev/null +++ b/problems/whatsthatprogression/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "What's That Progression?" +timelimit = 3 +points = 2 diff --git a/problems/whatsthatprogression/problem.pdf b/problems/whatsthatprogression/problem.pdf Binary files differnew file mode 100644 index 0000000..2687b7a --- /dev/null +++ b/problems/whatsthatprogression/problem.pdf diff --git a/problems/whoisleading/attachments/template.c b/problems/whoisleading/attachments/template.c new file mode 100644 index 0000000..9b6c317 --- /dev/null +++ b/problems/whoisleading/attachments/template.c @@ -0,0 +1,23 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + char teams[101]; + scanf("%[^\n]", teams); fgetc(stdin); + char scores_1[201]; + scanf("%[^\n]", scores_1); fgetc(stdin); + char scores_2[201]; + scanf("%[^\n]", scores_2); + for (int i = 0; i < 2; i++) { + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("Team name: score minutes_leading\n"); + } + + return 0; +} diff --git a/problems/whoisleading/attachments/template.cpp b/problems/whoisleading/attachments/template.cpp new file mode 100644 index 0000000..8162bcb --- /dev/null +++ b/problems/whoisleading/attachments/template.cpp @@ -0,0 +1,23 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + string teams; + getline(cin, teams); + string scores_1; + getline(cin, scores_1); + string scores_2; + getline(cin, scores_2); + for (int i = 0; i < 2; i++) { + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "Team name: score minutes_leading" << endl; + } +} diff --git a/problems/whoisleading/attachments/template.java b/problems/whoisleading/attachments/template.java new file mode 100644 index 0000000..15ddadc --- /dev/null +++ b/problems/whoisleading/attachments/template.java @@ -0,0 +1,20 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + String teams = in.nextLine(); + String scores1 = in.nextLine(); + String scores2 = in.nextLine(); + for (int i = 0; i < 2; i++) { + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("Team name: score minutes_leading"); + } + } +} diff --git a/problems/whoisleading/attachments/template.js b/problems/whoisleading/attachments/template.js new file mode 100644 index 0000000..25c3b89 --- /dev/null +++ b/problems/whoisleading/attachments/template.js @@ -0,0 +1,10 @@ +const teams = readline(); +const scores1 = readline(); +const scores2 = readline(); +for (let i = 0; i < 2; i++) { + + // Write an answer using console.log() + // To debug: console.error('Debug messages...'); + + console.log('Team name: score minutes_leading'); +} diff --git a/problems/whoisleading/attachments/template.py b/problems/whoisleading/attachments/template.py new file mode 100644 index 0000000..d09c28e --- /dev/null +++ b/problems/whoisleading/attachments/template.py @@ -0,0 +1,12 @@ +import sys +import math + +teams = input() +scores_1 = input() +scores_2 = input() +for i in range(2): + + # Write an answer using print + # To debug: print("Debug messages...", file=sys.stderr, flush=True) + + print("Team name: score minutes_leading") diff --git a/problems/whoisleading/data/secret/1.ans b/problems/whoisleading/data/secret/1.ans new file mode 100644 index 0000000..e8ef918 --- /dev/null +++ b/problems/whoisleading/data/secret/1.ans @@ -0,0 +1,2 @@ +A team: 23 42 +Another team: 26 23 diff --git a/problems/whoisleading/data/secret/1.in b/problems/whoisleading/data/secret/1.in new file mode 100644 index 0000000..1f4243a --- /dev/null +++ b/problems/whoisleading/data/secret/1.in @@ -0,0 +1,3 @@ +A team,Another team +8 31 37,32,7,10 +15 19,17 20,27 29 67,76 diff --git a/problems/whoisleading/data/secret/10.ans b/problems/whoisleading/data/secret/10.ans new file mode 100644 index 0000000..52246c7 --- /dev/null +++ b/problems/whoisleading/data/secret/10.ans @@ -0,0 +1,2 @@ +Team C: 13 0 +Team D: 13 0 diff --git a/problems/whoisleading/data/secret/10.in b/problems/whoisleading/data/secret/10.in new file mode 100644 index 0000000..8940aeb --- /dev/null +++ b/problems/whoisleading/data/secret/10.in @@ -0,0 +1,3 @@ +Team C,Team D +20 22,,37, +20,22,22,37 diff --git a/problems/whoisleading/data/secret/2.ans b/problems/whoisleading/data/secret/2.ans new file mode 100644 index 0000000..4ee231a --- /dev/null +++ b/problems/whoisleading/data/secret/2.ans @@ -0,0 +1,2 @@ +A team: 23 42 +Another team: 24 28 diff --git a/problems/whoisleading/data/secret/2.in b/problems/whoisleading/data/secret/2.in new file mode 100644 index 0000000..71edbb8 --- /dev/null +++ b/problems/whoisleading/data/secret/2.in @@ -0,0 +1,3 @@ +A team,Another team +9 34 37,39,11,67 +19 31,21,27 29 69,61 diff --git a/problems/whoisleading/data/secret/3.ans b/problems/whoisleading/data/secret/3.ans new file mode 100644 index 0000000..8eab4e4 --- /dev/null +++ b/problems/whoisleading/data/secret/3.ans @@ -0,0 +1,2 @@ +England: 27 54 +Argentina: 10 5 diff --git a/problems/whoisleading/data/secret/3.in b/problems/whoisleading/data/secret/3.in new file mode 100644 index 0000000..65482af --- /dev/null +++ b/problems/whoisleading/data/secret/3.in @@ -0,0 +1,3 @@ +England,Argentina +,,10 46 54 59 66 75,27 31 37 +79,80,5, diff --git a/problems/whoisleading/data/secret/4.ans b/problems/whoisleading/data/secret/4.ans new file mode 100644 index 0000000..ee95c17 --- /dev/null +++ b/problems/whoisleading/data/secret/4.ans @@ -0,0 +1,2 @@ +Wales: 32 67 +Fiji: 26 12 diff --git a/problems/whoisleading/data/secret/4.in b/problems/whoisleading/data/secret/4.in new file mode 100644 index 0000000..19ca911 --- /dev/null +++ b/problems/whoisleading/data/secret/4.in @@ -0,0 +1,3 @@ +Wales,Fiji +7 29 48 66,30 49 67,2 24, +13 17 73 78,15 18 73,, diff --git a/problems/whoisleading/data/secret/5.ans b/problems/whoisleading/data/secret/5.ans new file mode 100644 index 0000000..c34b6c9 --- /dev/null +++ b/problems/whoisleading/data/secret/5.ans @@ -0,0 +1,2 @@ +France: 28 33 +South Africa: 29 24 diff --git a/problems/whoisleading/data/secret/5.in b/problems/whoisleading/data/secret/5.in new file mode 100644 index 0000000..a6d0285 --- /dev/null +++ b/problems/whoisleading/data/secret/5.in @@ -0,0 +1,3 @@ +France,South Africa +4 22 31,5 32,40 54 73, +8 18 26 67,10 28 67,69, diff --git a/problems/whoisleading/data/secret/6.ans b/problems/whoisleading/data/secret/6.ans new file mode 100644 index 0000000..d01609a --- /dev/null +++ b/problems/whoisleading/data/secret/6.ans @@ -0,0 +1,2 @@ +England: 15 75 +South Africa: 16 3 diff --git a/problems/whoisleading/data/secret/6.in b/problems/whoisleading/data/secret/6.in new file mode 100644 index 0000000..4dd2846 --- /dev/null +++ b/problems/whoisleading/data/secret/6.in @@ -0,0 +1,3 @@ +England,South Africa +,,3 10 24 39,53 +69,70,21 35 78, diff --git a/problems/whoisleading/data/secret/7.ans b/problems/whoisleading/data/secret/7.ans new file mode 100644 index 0000000..243257f --- /dev/null +++ b/problems/whoisleading/data/secret/7.ans @@ -0,0 +1,2 @@ +New Zealand: 73 61 +Uruguay: 0 0 diff --git a/problems/whoisleading/data/secret/7.in b/problems/whoisleading/data/secret/7.in new file mode 100644 index 0000000..b042d0b --- /dev/null +++ b/problems/whoisleading/data/secret/7.in @@ -0,0 +1,3 @@ +New Zealand,Uruguay +20 25 33 38 45 49 53 65 68 73 77,21 26 34 50 54 66 69 74 78,, +,,, diff --git a/problems/whoisleading/data/secret/8.ans b/problems/whoisleading/data/secret/8.ans new file mode 100644 index 0000000..a9c4a02 --- /dev/null +++ b/problems/whoisleading/data/secret/8.ans @@ -0,0 +1,2 @@ +Scotland: 84 72 +Romania: 0 0 diff --git a/problems/whoisleading/data/secret/8.in b/problems/whoisleading/data/secret/8.in new file mode 100644 index 0000000..74a0173 --- /dev/null +++ b/problems/whoisleading/data/secret/8.in @@ -0,0 +1,3 @@ +Scotland,Romania +9 17 21 34 38 40 45 53 58 71 73 77,10 18 22 35 39 40 47 55 59 71 73 78,, +,,, diff --git a/problems/whoisleading/data/secret/9.ans b/problems/whoisleading/data/secret/9.ans new file mode 100644 index 0000000..9be7575 --- /dev/null +++ b/problems/whoisleading/data/secret/9.ans @@ -0,0 +1,2 @@ +Team A: 15 0 +Team B: 15 0 diff --git a/problems/whoisleading/data/secret/9.in b/problems/whoisleading/data/secret/9.in new file mode 100644 index 0000000..37515b0 --- /dev/null +++ b/problems/whoisleading/data/secret/9.in @@ -0,0 +1,3 @@ +Team A,Team B +12 45,13,79, +12 45,13,,79 diff --git a/problems/whoisleading/domjudge-problem.ini b/problems/whoisleading/domjudge-problem.ini new file mode 100644 index 0000000..bd719f9 --- /dev/null +++ b/problems/whoisleading/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Who is Leading?" +timelimit = 3 +points = 2 diff --git a/problems/whoisleading/problem.pdf b/problems/whoisleading/problem.pdf Binary files differnew file mode 100644 index 0000000..84ae1da --- /dev/null +++ b/problems/whoisleading/problem.pdf diff --git a/problems/wordle.py b/problems/wordle.py new file mode 100644 index 0000000..2f976d7 --- /dev/null +++ b/problems/wordle.py @@ -0,0 +1,39 @@ +def get_wordle_result(solution, guess): + result = ['_'] * 5 + solution_counts = {} + guess_counts = {} + + for i in range(5): + if guess[i] == solution[i]: + result[i] = 'G' + else: + solution_counts[solution[i]] = solution_counts.get(solution[i], 0) + 1 + guess_counts[guess[i]] = guess_counts.get(guess[i], 0) + 1 + + for i in range(5): + if result[i] == '_': + if guess[i] in solution_counts and solution_counts[guess[i]] > 0: + if guess_counts[guess[i]] > 0: + result[i] = 'Y' + solution_counts[guess[i]] -= 1 + + return ''.join(result) + +def main(): + import sys + input = sys.stdin.read + data = input().splitlines() + + solution = data[0] + n = int(data[1]) + guesses = data[2:2 + n] + + results = [] + for guess in guesses: + results.append(get_wordle_result(solution, guess)) + + for result in results: + print(result) + +if __name__ == "__main__": + main() diff --git a/problems/wordle/attachments/template.c b/problems/wordle/attachments/template.c new file mode 100644 index 0000000..7aad312 --- /dev/null +++ b/problems/wordle/attachments/template.c @@ -0,0 +1,25 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + char solution[6]; + scanf("%[^\n]", solution); + int n; + scanf("%d", &n); fgetc(stdin); + for (int i = 0; i < n; i++) { + char guess[6]; + scanf("%[^\n]", guess); fgetc(stdin); + } + for (int i = 0; i < n; i++) { + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("__G_Y\n"); + } + + return 0; +} diff --git a/problems/wordle/attachments/template.cpp b/problems/wordle/attachments/template.cpp new file mode 100644 index 0000000..56b2860 --- /dev/null +++ b/problems/wordle/attachments/template.cpp @@ -0,0 +1,25 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + string solution; + getline(cin, solution); + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + string guess; + getline(cin, guess); + } + for (int i = 0; i < n; i++) { + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "__G_Y" << endl; + } +} diff --git a/problems/wordle/attachments/template.java b/problems/wordle/attachments/template.java new file mode 100644 index 0000000..1027853 --- /dev/null +++ b/problems/wordle/attachments/template.java @@ -0,0 +1,25 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + String solution = in.nextLine(); + int n = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < n; i++) { + String guess = in.nextLine(); + } + for (int i = 0; i < n; i++) { + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("__G_Y"); + } + } +} diff --git a/problems/wordle/attachments/template.js b/problems/wordle/attachments/template.js new file mode 100644 index 0000000..6d46846 --- /dev/null +++ b/problems/wordle/attachments/template.js @@ -0,0 +1,12 @@ +const solution = readline(); +const n = parseInt(readline()); +for (let i = 0; i < n; i++) { + const guess = readline(); +} +for (let i = 0; i < n; i++) { + + // Write an answer using console.log() + // To debug: console.error('Debug messages...'); + + console.log('__G_Y'); +} diff --git a/problems/wordle/attachments/template.py b/problems/wordle/attachments/template.py new file mode 100644 index 0000000..fbf4b41 --- /dev/null +++ b/problems/wordle/attachments/template.py @@ -0,0 +1,13 @@ +import sys +import math + +solution = input() +n = int(input()) +for i in range(n): + guess = input() +for i in range(n): + + # Write an answer using print + # To debug: print("Debug messages...", file=sys.stderr, flush=True) + + print("__G_Y") diff --git a/problems/wordle/data/secret/1.ans b/problems/wordle/data/secret/1.ans new file mode 100644 index 0000000..52fd6de --- /dev/null +++ b/problems/wordle/data/secret/1.ans @@ -0,0 +1 @@ +G____ diff --git a/problems/wordle/data/secret/1.in b/problems/wordle/data/secret/1.in new file mode 100644 index 0000000..a6973a1 --- /dev/null +++ b/problems/wordle/data/secret/1.in @@ -0,0 +1,3 @@ +clash +1 +coder diff --git a/problems/wordle/data/secret/10.ans b/problems/wordle/data/secret/10.ans new file mode 100644 index 0000000..51d1013 --- /dev/null +++ b/problems/wordle/data/secret/10.ans @@ -0,0 +1,4 @@ +_G_Y_ +_GGG_ +_GGGG +GGGGG diff --git a/problems/wordle/data/secret/10.in b/problems/wordle/data/secret/10.in new file mode 100644 index 0000000..41aa078 --- /dev/null +++ b/problems/wordle/data/secret/10.in @@ -0,0 +1,6 @@ +woven +4 +young +lover +coven +woven diff --git a/problems/wordle/data/secret/2.ans b/problems/wordle/data/secret/2.ans new file mode 100644 index 0000000..d2aac59 --- /dev/null +++ b/problems/wordle/data/secret/2.ans @@ -0,0 +1 @@ +___G_ diff --git a/problems/wordle/data/secret/2.in b/problems/wordle/data/secret/2.in new file mode 100644 index 0000000..5eb64b3 --- /dev/null +++ b/problems/wordle/data/secret/2.in @@ -0,0 +1,3 @@ +unite +1 +wrath diff --git a/problems/wordle/data/secret/3.ans b/problems/wordle/data/secret/3.ans new file mode 100644 index 0000000..50bb343 --- /dev/null +++ b/problems/wordle/data/secret/3.ans @@ -0,0 +1 @@ +__Y__ diff --git a/problems/wordle/data/secret/3.in b/problems/wordle/data/secret/3.in new file mode 100644 index 0000000..71f8130 --- /dev/null +++ b/problems/wordle/data/secret/3.in @@ -0,0 +1,3 @@ +pound +1 +wings diff --git a/problems/wordle/data/secret/4.ans b/problems/wordle/data/secret/4.ans new file mode 100644 index 0000000..d07c851 --- /dev/null +++ b/problems/wordle/data/secret/4.ans @@ -0,0 +1 @@ +Y____ diff --git a/problems/wordle/data/secret/4.in b/problems/wordle/data/secret/4.in new file mode 100644 index 0000000..96f8390 --- /dev/null +++ b/problems/wordle/data/secret/4.in @@ -0,0 +1,3 @@ +false +1 +livid diff --git a/problems/wordle/data/secret/5.ans b/problems/wordle/data/secret/5.ans new file mode 100644 index 0000000..8aa2d58 --- /dev/null +++ b/problems/wordle/data/secret/5.ans @@ -0,0 +1,2 @@ +G__YG +GY__G diff --git a/problems/wordle/data/secret/5.in b/problems/wordle/data/secret/5.in new file mode 100644 index 0000000..510fbde --- /dev/null +++ b/problems/wordle/data/secret/5.in @@ -0,0 +1,4 @@ +solve +2 +stale +slide diff --git a/problems/wordle/data/secret/6.ans b/problems/wordle/data/secret/6.ans new file mode 100644 index 0000000..812b0a8 --- /dev/null +++ b/problems/wordle/data/secret/6.ans @@ -0,0 +1,2 @@ +___Y_ +_G_Y_ diff --git a/problems/wordle/data/secret/6.in b/problems/wordle/data/secret/6.in new file mode 100644 index 0000000..1c129ff --- /dev/null +++ b/problems/wordle/data/secret/6.in @@ -0,0 +1,4 @@ +flunk +2 +toils +cleft diff --git a/problems/wordle/data/secret/7.ans b/problems/wordle/data/secret/7.ans new file mode 100644 index 0000000..f15ee7d --- /dev/null +++ b/problems/wordle/data/secret/7.ans @@ -0,0 +1,4 @@ +___Y_ +_YG__ +_Y___ +_YYYG diff --git a/problems/wordle/data/secret/7.in b/problems/wordle/data/secret/7.in new file mode 100644 index 0000000..abe8ded --- /dev/null +++ b/problems/wordle/data/secret/7.in @@ -0,0 +1,6 @@ +union +4 +crane +toils +dumpy +quoin diff --git a/problems/wordle/data/secret/8.ans b/problems/wordle/data/secret/8.ans new file mode 100644 index 0000000..ed23c40 --- /dev/null +++ b/problems/wordle/data/secret/8.ans @@ -0,0 +1,4 @@ +Y__Y_ +___GY +GG___ +____G diff --git a/problems/wordle/data/secret/8.in b/problems/wordle/data/secret/8.in new file mode 100644 index 0000000..fbc97a0 --- /dev/null +++ b/problems/wordle/data/secret/8.in @@ -0,0 +1,6 @@ +slyly +4 +least +coils +slump +handy diff --git a/problems/wordle/domjudge-problem.ini b/problems/wordle/domjudge-problem.ini new file mode 100644 index 0000000..3e7a771 --- /dev/null +++ b/problems/wordle/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "Wordle" +timelimit = 3 +points = 2 diff --git a/problems/wordle/problem.pdf b/problems/wordle/problem.pdf Binary files differnew file mode 100644 index 0000000..d0480a7 --- /dev/null +++ b/problems/wordle/problem.pdf diff --git a/teams.json b/teams.json new file mode 100644 index 0000000..a25813c --- /dev/null +++ b/teams.json @@ -0,0 +1,6 @@ +[{ + "id": "1", + "label": "1", + "group_ids": ["24"], + "name": "someteam" +}] diff --git a/teams.yaml b/teams.yaml new file mode 100644 index 0000000..f240669 --- /dev/null +++ b/teams.yaml @@ -0,0 +1,5 @@ +- id: demo1 + username: demo1 + password: demoteam1 + type: team + team_id: 1 diff --git a/upload.sh b/upload.sh new file mode 100755 index 0000000..9fdbea6 --- /dev/null +++ b/upload.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +shopt -s extglob + +if [[ "$1" != '' ]]; then + cd $1 +fi + +echo "Start upload: $(date)" +echo + +for i in *.zip; do + echo "Uploading $i" + curl 'http://cmp.compromyse.xyz/jury/import-export' \ + -X POST \ + -H "Cookie: PHPSESSID=$2" \ + -F 'problem_upload[contest]=' \ + -F "problem_upload[archive]=@$i" \ + -F 'problem_upload[upload]=' +done + +echo +echo "End upload: $(date)" |