Skip to content

Commit d3f1326

Browse files
committed
deleted unnecessary comments
1 parent 0cec1e3 commit d3f1326

File tree

4 files changed

+8
-20
lines changed

4 files changed

+8
-20
lines changed

NestingDepth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def NestingTesting(S):
1818
return Sp
1919

2020

21-
T = int(input()) # liczba przypadkow
21+
T = int(input())
2222

2323
for t in range(int(T)):
2424
S = input()

ParentingPartnering.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
# Code I finally used in ParentingPartnering problem on CodeJam 2020
22

33
def CameronJamie(przedzialy):
4-
# tworzę za pomocą list comprehension listę skladajaca sie z krotek + numer krotki
54
przedzialy = [(przedzialy[i][0], przedzialy[i][1], i) for i in range(len(przedzialy))]
6-
# sortuję według czasu rozpoczęcia się zajęcia (lambda zwraca start)
75
przedzialy.sort(key=lambda x: x[0])
86
literyPlusNumer = []
97
kCameron = 0
108
kJamie = 0
11-
# odwołuje się do krotek z listy przedzialy gdzie jest start,
12-
# zakończenie oraz indeks krotki
139
for start, koniec, numer in przedzialy:
1410
if start < kCameron and start < kJamie:
1511
return "IMPOSSIBLE"
@@ -20,27 +16,22 @@ def CameronJamie(przedzialy):
2016
literyPlusNumer.append(("J", numer))
2117
kJamie = koniec
2218

23-
# sortuję po indeksie
2419
literyPlusNumer.sort(key=lambda x: x[1])
25-
# łańcuch literek
2620
ostateczny_lancuch = ''
2721
for literka, numer in literyPlusNumer:
2822
ostateczny_lancuch += literka
2923

3024
return ostateczny_lancuch
3125

3226

33-
# Liczba przypadków
3427
T = int(input())
3528
lista_zbierajaca = []
3629
for i in range(1, T+1):
37-
N = int(input().strip()) # liczba przedzialow czasowych
38-
# czyszczenie listy z przedzialami czasowymi:
30+
N = int(input().strip())
3931
przedzialy = []
4032
for n in range(N):
41-
# mapuję listę funkcją int()
4233
nowe_zajecie = list(map(int, input().strip().split()))
43-
przedzialy.append(nowe_zajecie) # przekazywane do przedzialy
34+
przedzialy.append(nowe_zajecie)
4435
literyPlusNumer = CameronJamie(przedzialy)
4536
lista_zbierajaca.append(literyPlusNumer)
4637
for t in range(len(lista_zbierajaca)):

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# CodeJam2020
2-
These are my solutions to problems from CodeJam 2020, which qualified me to 1 Round through Qualification Round and passed the subject Intro to Programming at the beginning of the semester (I was propably the only student of the whole year who did it)..
2+
These are my solutions to problems from CodeJam 2020, which qualified me to 1 Round through Qualification Round and passed the subject Intro to Programming at the beginning of the semester (I was propably the only student of the whole year who did it).

Vestigium.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
11
# Code I finally used in Vestigium problem on CodeJam 2020
22

33

4-
T = int(input()) # liczba przypadkow
4+
T = int(input())
55

66
for t in range(T):
7-
N = int(input()) # pobranie wymiaru macierzy (N x N)
7+
N = int(input())
88
rows_wer = 0
99
columns_wer = 0
1010
trace = 0
1111
matrix = []
12-
# mechanizm liczenia wierszy które zawierają powtórzenia
1312
for n in range(N):
1413
row = input().split()
1514
if len(row) != len(set(row)):
1615
rows_wer += 1
1716
matrix += row
18-
19-
# mechanizm liczenia śladu macierzy
17+
2018
for x in range(N):
2119
trace += int(matrix[x * (N+1)])
2220

23-
# mechanizm liczenia kolumn które zawierają powtórzenia
2421
for y in range(N):
2522
column = []
26-
for z in range(N): # de facto tworzenie kolumny
23+
for z in range(N):
2724
column.append(matrix[(z * N) + y])
2825

2926
if len(column) != len(set(column)):

0 commit comments

Comments
 (0)