ahmed_drawy's blog

By ahmed_drawy, 9 months ago, In English,

in the latest div3 contest Codeforces Round #540 (Div. 3) , in 1118D2 - Кофе и курсовая работа (сложная версия) i have solved the easy version using DP but i want to know can i optimize it to be 1D and solve the harder version ?? here's my submission for the easy version 50191639

my approach is for each cup (indx) we can take it and proceed to the next day or we can increase the answer and take another cup and proceed to the next day and minimize

i sorted the array in descending order to take the largest cups first because i don't have a case of not taking the cup at all

Read more »

 
 
 
 
  • Vote: I like it
  • +6
  • Vote: I do not like it

By ahmed_drawy, history, 13 months ago, In English,

i want help in atcoder beginner contest 112 problem D since the editorial is in japanese and i didn't find any related topic on google

i don't know how to find the MAX GCD for a sequence of numbers of length N (not ordered any sequence of length N) and sum of sequence = M

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it