cmimc

Code for the 2021 CMIMC Programming Contest

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
import numpy as np
import matplotlib.pyplot as plt

lines = open("in2").readlines()

x = []
y = []
for line in lines:
    x.append(int(line.split()[0]))
    y.append(int(line.split()[1]))

R = open("r").readlines()
ans = open("out").readlines()

for i in range(0, 100):
    c = plt.Circle((float(ans[i].split()[0]), float(ans[i].split()[1])), radius=int(R[i]))
    plt.gca().add_artist(c)

plt.scatter(x, y)
plt.show()