题目大意:
对于长度为
2∗n−1
的
01
序列,有
k
个
分析:
AC code:
#include <cstdio>
using namespace std;
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int n;
scanf("%d", &n);
n = (n>>1)+1;
if(n%3 == 0 || n%3 == 1) printf("%d\n", n);
else printf("%d\n", n-1);
#ifndef ONLINE_JUDGE
fclose(stdin);
fclose(stdout);
#endif
return 0;
}