Блог пользователя ahmed_drawy

Автор ahmed_drawy, 6 лет назад, По-английски

in the latest div3 contest Codeforces Round 540 (Div. 3) , in 1118D2 - Coffee and Coursework (Hard Version) 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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится

Автор ahmed_drawy, история, 6 лет назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится