摘要:
原题链接 题解 先考虑操作一,首先要数组总和不小于 \(s\) 其次,我们可以通过两边删数来得到子数组,如果两边任一边有二,我们删掉二之后, \(sum\) 减二,如果全是一,我们两边的一都删掉(数组长度大于1), \(sum\) 减二,所以如果 \(sum\) 是偶数,那么我一定能得到 \([2, 阅读全文
posted @ 2024-06-25 20:14
纯粹的
阅读(18)
评论(0)
推荐(0)
摘要:
原题链接 题解 对于最后一个A,其右边的B都能走 对于倒数第二个A,他能走到第一个A之前的位置 ... 第一个A到最后一个B的距离 code #include<bits/stdc++.h> using namespace std; int a[15]; int solve() { int n; ci 阅读全文
posted @ 2024-06-25 19:01
纯粹的
阅读(14)
评论(0)
推荐(0)
摘要:
原题链接 题解 对于 \(n\) 来说,所有数都比他小,所以他一定能到达数组末尾 对于 \(n-1\) 来说,同理 ... 所以 1 一定要在开头 code #include<bits/stdc++.h> using namespace std; int a[15]; bool solve() { 阅读全文
posted @ 2024-06-25 18:59
纯粹的
阅读(15)
评论(0)
推荐(0)

浙公网安备 33010602011771号