cswork / OA打开练习工作台

CitadelOA #3

Palindromic Binary Subsequences (Length 5)

估计中等可在线判题

考点(AI 标注)前缀和区间子序列

Choose 5 increasing indices that form a palindrome; different indices count as different subsequences, without deduplicating by text. Output the result modulo 1000000007.

输入格式

One line containing a 01 string; complete OCR range 5≤length≤100000.

输出格式

Output a single integer, the answer.

样例 1

输入:

0100110

输出:

5

样例 2

输入:

010110

输出:

3

样例 3

输入:

01111

输出:

0

样例说明

The outputs of the three public examples are, in order: 5; 3; 0. These answers were verified by independent enumeration or direct simulation.