LXS
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
给你一个长度为 的数组 ,你需要求出一个最长的子序列 ,使得其相邻两项按位与的结果均非零()。
请输出这个最长子序列长度。
输入格式
第一行一个整数 。
接下来一行, 个整数 ,描述这个数组。
输出格式
一行一个整数,表示答案。
样例输入
7
1 4 5 6 2 3 4
样例输出
5
数据范围
对于的数据,
对于另外的数据,
对于所有数据,
2023CSP赛前冲刺模拟7
- Status
- Done
- Rule
- OI
- Problem
- 4
- Start at
- 2023-10-4 8:30
- End at
- 2023-10-4 12:00
- Duration
- 3.5 hour(s)
- Host
- Partic.
- 4