Codeforces Round 1126 — Problem C

Правка en1, от waidfj, 2026-10-10 22:47:41

I am struggling with a small issue in 2271C - XOR Problem of today's contest.

For n = 2, my code gave this array as output: [2, 1, 0, 2, 0, 1, 2] and it passed the judge's test. However, I just read the expected answer [0, 2, 0, 1, 0, 2, 0] and now I think that my output should've gotten wrong.

Looking at the expected answer, it has a length of 7 and 0 subarrays, and thus the beauty of it is 7. But in my array its length is 7 and it has 2 subbarrays ([2, 1, 0, 2, 0, 1] and [1, 0, 2, 0, 1, 2]) which gives it a beauty of 5, which is not the maximum, which means it's wrong.

Can someone please help me understand if I'm missing something, why was my array judged accurate? 394017566

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский waidfj 2026-10-10 22:47:41 739 Initial revision (published)