Why is memset giving error here?

Правка en1, от ComboGirl, 2023-09-19 18:29:23

In the following two submissions 224059045 and 224058953 the only difference is one line where I replaced

memset(dc, n+5, sizeof(dc));

with

for(int i=1;i<=n;i++) dc[i] = n+5;

and it WA on the first but AC with the latter. I'm not sure why this is happening. Any ideas?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ComboGirl 2023-09-19 18:29:23 479 Initial revision (published)