Skip to content

Instantly share code, notes, and snippets.

@Zerumi
Created August 24, 2022 22:34
Show Gist options
  • Save Zerumi/160bd0dbdd2ec88d794068f3498f0860 to your computer and use it in GitHub Desktop.
Save Zerumi/160bd0dbdd2ec88d794068f3498f0860 to your computer and use it in GitHub Desktop.
N = 12
time = [4,3,1,7,6,3,1,2,7,8,6,6]
deps = [[0],[0],[1,2],[3],[3],[5],[4,6],[7],[0],[0],[9],[10]]
for i in range(N):
totaltime = time[i]
if (deps[i][0] == 0): continue
maxdeptime = max(time[x - 1] for x in deps[i])
totaltime += maxdeptime
time[i] = totaltime
print(max(time))
@Zerumi
Copy link
Author

Zerumi commented Aug 24, 2022

Решение нового задания #22 ЕГЭ по информатике 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment