727-D (Div 2) personal solution correction

Правка en1, от abyboi, 2021-06-21 20:32:44

This is the problem I have been trying to solve:

https://mirror.codeforces.com/contest/1539/problem/D

This was my attempted solution:

https://mirror.codeforces.com/contest/1539/submission/120232784

The attempt was inspired from the tutorial — Sorting b_i and using a custom two pointer technique for buying multiple products at once. However, it is failing test #8 and I don't know what is the reason (I think that maybe some integer overflow/a small bug is present otherwise my approach is correct). If someone could guide me on how to go about this that'd be great!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский abyboi 2021-06-21 20:33:01 1 (published)
en1 Английский abyboi 2021-06-21 20:32:44 615 Initial revision (saved to drafts)