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

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

I am getting a runtime error for this program here. I have tried for many days but have been unable to detect the cause of the error. Please help me.

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

»
8 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

Just, start learn C++ )). Write on pure C — for competitive programming is bad idea.

unsigned long long*no_of_meals = 
(unsigned long long*)malloc((maximum_length + 1)*sizeof(unsigned long ));
//                                                    |-----------------> see, use unsigned long long.

unsigned long long*sum_no_of_meals =  
(unsigned long long*)malloc((maximum_length + 1)*sizeof(unsigned long));
//                                                   |--------------> see, use unsigned long long.