cheran-senthil / PyRival

⚡ Competitive Programming Library
https://pyrival.readthedocs.io/
Apache License 2.0
1.15k stars 311 forks source link

Faster but uglier Floyd Warshall #78

Closed whosyourjay closed 1 year ago

whosyourjay commented 1 year ago

The natural solution to this codeforces problem is too slow https://codeforces.com/contest/295/submission/181063482

Caching the array accesses makes it about 3x faster https://codeforces.com/contest/295/submission/181063716