CF — round 176 — Div 2 — problem B- pipeline
source link: https://codeforces.com/blog/entry/7188
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
CF — round 176 — Div 2 — problem B- pipeline
By sntmessages, 10 years ago,
i have some doubt about this problem. it is written in the problem statement that "Vova needs the pipeline to have exactly n pipes with flowing out water."
considering this statement the answer for test case : 21 8 is '-1' . since for k=8 number of pipes can be 1,8,14,19,23,26,28,29 and it is written that pipeline should have exactly n pipes with flowing out water, therefore, 21 cant be possible.
i have run custom test and it is showing me o/p as '4'. am i missing something? please help.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK