Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

Автор c1ph3rx, история, 19 месяцев назад, По-английски

Hello. In yesterday's contest i was trying to solve its C problem but didn't finish it, so i have tried it again today but after implementing the idea that i had, i get time limit exceeded on test 3 (even though i implemented it with binary search, at least i think so). So here is what i tried: I reversed the sequence and then for every subsequence starting from index i and ending at size of vector for its maximal cost took maximal size of subsequences subsequence where its all members are >= of theirs indices+1-i; 196127370 Is the observation bad or did i implement it wrong, or both. Thanks for help.

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

»
19 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

$$$int binarys(vector<int>&v, int l, int x){ ... }$$$