逻辑题
文章平均质量分 67
why 先生
正在努力的新手
展开
-
A. Ichihime and Triangle 叮叮叮
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Ichihime is the current priestess of the Mahjong Soul Temple. She claims to be human, despite her cat ears. These days the temple is holding a math con原创 2021-04-05 19:48:55 · 116 阅读 · 0 评论 -
Even Array 偶数 数组
给你一个长度为n的数组a[0…n1],它由非负整数组成。注意数组索引从零开始。 如果每个索引的奇偶性与该索引处元素的奇偶性匹配,则数组称为好数组。更正式地说,如果对于所有I(0≤I≤n-1),等式imod2=a[i]mod2成立,其中xmod2是x除以2的余数,则数组是好的。 比如数组[0,5,2,1]和[0,17,0,3]是好的,数组[2,4,6,7]是坏的,因为对于i=1,I和a[i]的parity是不同的:imod2=1mod2=1,但是a[i]mod2=4mod2=0。 在一次移动中,您可以获取数组原创 2021-03-23 20:38:33 · 365 阅读 · 0 评论