-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
27 lines (20 loc) · 662 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import sort as st
import simplesort as simplest
import parser as ps
import algo
result = ps.parse("videos_worth_spreading.in")
videoSize = result[0]
endpointLatency = result[1]
videoRequestByEndpoint = result[2]
V = result[3]
E = result[4]
R = result[5]
C = result[6]
X = result[7]
endpointLatencyAsc = [[]]
for i in range(len(endpointLatency)):
endpointLatencyAsc.append(simplest.quickSort(endpointLatency[i]))
endpointLatencyAsc.pop(0)
videoRequestDesc = list(reversed(st.quickSort(videoRequestByEndpoint)))
result = algo.algo(videoSize, endpointLatency,videoRequestByEndpoint, videoRequestDesc, endpointLatencyAsc, V, E, R, C, X)
ps.output(result)