| 
 | 
| Show all threads     Hide all threads     Show all messages     Hide all messages |  | Test#4 | Artem Bakhretdinov | 2069. Hard Rock | 12 Nov 2023 22:30 | 1   |  Test#4 Artem Bakhretdinov 12 Nov 2023 22:30 What's the test#4?   I'm sure my solution is correct: #include <algorithm> #include <array> #include <iostream> #include <limits>   uint32_t *arr_n; uint32_t *arr_m; int n, m; uint64_t max_sum = 0; uint32_t min_popularity = std::numeric_limits<uint32_t>::max();   void find_most_popular_route(int i, int j, uint64_t sum, uint32_t cur_min) {     if (i == n - 1 && j == m - 1) {     if (sum > max_sum) {       max_sum = sum;       min_popularity = cur_min;     }     return;   }     if (i < n - 1) {     find_most_popular_route(i + 1, j, sum + arr_m[j],                             std::min(cur_min, arr_m[j]));   }     if (j < m - 1) {     find_most_popular_route(i, j + 1, sum + arr_n[i],                             std::min(cur_min, arr_n[i]));   } }   int main() {   std::cin >> n >> m;     if (n > 100000 || n < 2 || m > 100000 || m < 2)     return 0;     arr_n = new uint32_t[n];   for (int i = 0; i < n; i++) {     std::cin >> arr_n[i];   }     arr_m = new uint32_t[m];   for (int i = 0; i < m; i++) {     std::cin >> arr_m[i];   }   std::cout << std::endl << std::endl;     find_most_popular_route(0, 0, 0, min_popularity);   std::cout << min_popularity << std::endl;   //   std::cout << max_sum << std::endl;     delete[] arr_n;   delete[] arr_m;     return 0; }  |  | WA 4 | miro.v.k | 2069. Hard Rock | 12 Nov 2023 22:16 | 2   |  WA 4 miro.v.k 9 Jul 2019 17:21 I have WA4. Can someone give me that test ? Re: WA 4 Artem Bakhretdinov 12 Nov 2023 22:16  |  | Very funny problem | Didi (OSU11) | 2069. Hard Rock | 13 Nov 2017 02:34 | 2   |  You don't must develop hard solution. Your work should not payed many time. Just pay attention, and look again on tests. Attention will save your time. I am sorry, for my poor English. Good luck!   Edited by author 18.10.2015 16:52 Нужен максимум из 4-х минимумов)  |  | WA #18 | Amil Khare | 2069. Hard Rock | 27 Sep 2017 21:37 | 2   |  WA #18 Amil Khare 27 Sep 2017 21:11 I got WA at test 18. Any tests for me? Got it fixed just, was using wrong indexing -> for rows used N, however, I had to use M.  |  | Why TLE11? | Combatcook | 2069. Hard Rock | 15 Mar 2016 20:07 | 3   |  I use only 2 loops for 1 to 10000 but get TLE11... why? --   Edited by author 14.03.2016 22:38   Edited by author 16.03.2016 09:37 10^5 is 100000, not 10000. Fix that and get AC.  |  | test6 | DeadLine | 2069. Hard Rock | 18 Oct 2015 09:47 | 2   |  test6 DeadLine 18 Oct 2015 00:10  |  | 1st test | BARNAUL1710_4 | 2069. Hard Rock | 17 Oct 2015 16:31 | 3   |  1st test BARNAUL1710_4 17 Oct 2015 15:15 Why the "coolest" rout is 4? 4 + 7 + 8 = 19, isn't it? "Определим крутость маршрута как минимальную популярность группы среди всех улиц, по которым рокеры проедут".  |  | The first sample  | saodem74 | 2069. Hard Rock | 17 Oct 2015 14:41 | 1   |  <deleted>     Edited by author 17.10.2015 14:47  |  
  |  
  | 
|