Skip to content

Instantly share code, notes, and snippets.

View mrugacz95's full-sized avatar

Marcin Mrugas mrugacz95

View GitHub Profile
@mrugacz95
mrugacz95 / gan.csv
Created February 1, 2021 22:41
OI 28 gan time comparsion
Python C++
Test 0 0.03 0.00
Test 1 0.03 0.00
Test 2 0.64 0.60
Test 3 26.48 1.16
Test 4 24.56 1.44
@mrugacz95
mrugacz95 / gra.csv
Created February 1, 2021 22:40
OI 28 gra time comparsion
Python C++
Test 0 0.02 0.03
Test 1 0.02 0.03
Test 2 0.02 0.03
Test 3 0.02 0.03
Większe testy
Test 4 9.30 5.20
Test 5 6.25 3.60
Test 6 7.84 4.26
Test 7 12.39 6.60
@mrugacz95
mrugacz95 / tab.csv
Created February 1, 2021 22:38
IO 28 tab time comparsion
Python C++
Test 0 0.02 0.00
Test 1 0.02 0.00
Test 2 0.02 0.00
Test 3 0.61 0.68
@mrugacz95
mrugacz95 / lic.csv
Last active February 1, 2021 22:37
OI 28 Lic time comparsion
Python C++ (struktura) C++ (zwiększenie szerokości kolumn)
Test 0 0.02 0.00 0.00
Test 1 0.02 0.00 0.00
Test 2 0.06 0.02 0.02
Test 3 0.98 0.39 1.02
Test 4 0.96 0.31 2.72
@mrugacz95
mrugacz95 / cuk.csv
Created February 1, 2021 22:32
OI 28 cuk time comparsion
Python C++
Test 0 0.02 0.00
Test 1 0.02 0.00
Test 2 0.02 0.00
Test 3 0.02 0.00
Test 4 1.09 0.93
@mrugacz95
mrugacz95 / time.dat
Last active February 1, 2021 22:31
Python vs Cpp time comparsion
cuk - czas wykonania (s)
---------------------------
Python C++
Test 0 -- 0.02 -- 0.00
Test 1 -- 0.02 -- 0.00
Test 2 -- 0.02 -- 0.00
Test 3 -- 0.02 -- 0.00
Test 4 -- 1.09 -- 0.93
lic - czas wykonania (s)
@mrugacz95
mrugacz95 / points.csv
Last active January 28, 2021 19:10
OI XXVIII Results
Python C++
Cukiernia 100 100
Licznik długu 100 100
Tablica Binarna 100 100
Gra platformowa 42 100
Gang Biciaków 25 100
Suma 367 500
@mrugacz95
mrugacz95 / cukiernia_times.csv
Last active January 13, 2021 23:15
Czasy wykonania zadania Cukiernia OI XXVIII
Test Wynik Czas Punkty
1 OK 0.04s / 14.00s 1 / 1
2 OK 0.04s / 14.00s 1 / 1
3 OK 0.04s / 14.00s 1 / 1
4 OK 0.04s / 14.00s 1 / 1
5 OK 0.04s / 14.00s 1 / 1
6 OK 0.04s / 14.00s 1 / 1
7 OK 0.04s / 14.00s 1 / 1
8 OK 0.04s / 14.00s 1 / 1
9 OK 0.04s / 14.00s 1 / 1
Input:
5 // number of rows
5 1 1 // first row
0 3 4
1 4 3
4 0 0
0 0 0
Output:
9
# solution to task `slonie` oi16 https://www.oi.edu.pl/static/attachment/20110704/oi16.pdf
def main():
n = int(input())
m = list(map(int, input().split(' ')))
a = list(map(lambda x: int(x) - 1, input().split(' ')))
b = list(map(lambda x: int(x) - 1, input().split(' ')))
p = [0 for _ in range(n)]
for i in range(n):
p[b[i]] = a[i]
C = []