forked from kilian-hu/hackerrank-solutions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstub.py
54 lines (37 loc) · 1.03 KB
/
stub.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'getMaxArea' function below.
#
# The function is expected to return a LONG_INTEGER_ARRAY.
# The function accepts following parameters:
# 1. INTEGER w
# 2. INTEGER h
# 3. BOOLEAN_ARRAY isVertical
# 4. INTEGER_ARRAY distance
#
def getMaxArea(w, h, isVertical, distance):
# Write your code here
pass
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
w = int(input().strip())
h = int(input().strip())
isVertical_count = int(input().strip())
isVertical = []
for _ in range(isVertical_count):
isVertical_item = int(input().strip()) != 0
isVertical.append(isVertical_item)
distance_count = int(input().strip())
distance = []
for _ in range(distance_count):
distance_item = int(input().strip())
distance.append(distance_item)
result = getMaxArea(w, h, isVertical, distance)
fptr.write('\n'.join(map(str, result)))
fptr.write('\n')
fptr.close()