Skip to content

Commit

Permalink
Solve Iu-Di-Oh! in python
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Dec 26, 2023
1 parent 9b5406d commit c086711
Show file tree
Hide file tree
Showing 6 changed files with 6,770 additions and 0 deletions.
25 changes: 25 additions & 0 deletions solutions/beecrowd/2542/2542.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import sys


for line in sys.stdin:
n = int(line)
m, l = map(int, input().split())

marcos_cards = []
for _ in range(m):
marcos_cards.append(list(map(int, input().split())))

leonardo_cards = []
for _ in range(l):
leonardo_cards.append(list(map(int, input().split())))

marcos_card, leonardo_card = map(int, input().split())

attribute = int(input())

if marcos_cards[marcos_card - 1][attribute - 1] > leonardo_cards[leonardo_card - 1][attribute - 1]:
print('Marcos')
elif leonardo_cards[leonardo_card - 1][attribute - 1] > marcos_cards[marcos_card - 1][attribute - 1]:
print('Leonardo')
else:
print('Empate')
40 changes: 40 additions & 0 deletions solutions/beecrowd/2542/generate_in.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash

set -euo pipefail

TESTCASES=80
MAX_NUMBER=80

for _ in $(seq 1 ${TESTCASES}); do
n=$((RANDOM % MAX_NUMBER + 1))
m=$((RANDOM % MAX_NUMBER + 1))
l=$((RANDOM % MAX_NUMBER + 1))

echo "${n}"
echo "${m} ${l}"

for _ in $(seq 1 $m); do
if [[ n -eq 1 ]]; then
echo "$((RANDOM % 100 + 1))"
else
for _ in $(seq 1 $((n - 1))); do
echo -n "$((RANDOM % 100 + 1)) "
done
echo "$((RANDOM % 100 + 1))"
fi
done

for _ in $(seq 1 $l); do
if [[ n -eq 1 ]]; then
echo "$((RANDOM % 100 + 1))"
else
for _ in $(seq 1 $((n - 1))); do
echo -n "$((RANDOM % 100 + 1)) "
done
echo "$((RANDOM % 100 + 1))"
fi
done

echo "$((RANDOM % m + 1)) $((RANDOM % l + 1))"
echo "$((RANDOM % n + 1))"
done
Loading

0 comments on commit c086711

Please sign in to comment.