Skip to content

Commit 6d18a12

Browse files
1289, 7785, 11758
1 parent 3c79a9e commit 6d18a12

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

11758.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
def ccw(x1, y1, x2, y2, x3, y3):
2+
return (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1)
3+
4+
x1, y1 = map(int, input().split())
5+
x2, y2 = map(int, input().split())
6+
x3, y3 = map(int, input().split())
7+
8+
result = ccw(x1, y1, x2, y2, x3, y3)
9+
10+
if result == 0:
11+
print(0)
12+
elif result > 0:
13+
print(1)
14+
elif result < 0:
15+
print(-1)

1269.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
input()
2+
a = set(list(map(int, input().split())))
3+
b = set(list(map(int, input().split())))
4+
5+
print(len(a.symmetric_difference(b)))

7785.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
n = int(input())
2+
company = set()
3+
4+
for _ in range(n):
5+
name, el = input().split()
6+
if el == "enter":
7+
company.add(name)
8+
else:
9+
company.remove(name)
10+
11+
c = reversed(sorted(list(company)))
12+
13+
for name in c:
14+
print(name)

0 commit comments

Comments
 (0)