摘要:
[toc] Description 有三个好朋友喜欢在一起玩游戏,A君写下一个字符串S,B君将其复制一遍得到T,C君在T的任意位置(包括首尾)插入一个字符得到U.现在你得到了U,请你找出S. Input 第一行一个数N,表示U的长度. 第二行一个字符串U,保证U由大写字母组成 Output 输出一行 阅读全文
摘要:
Description 在$Mars$星球上,每个$Mars$人都随身佩带着一串能量项链。在项链上有$N$颗能量珠。能量珠是一颗有头标记与尾标记的珠子,这些标记对应着某个正整数。并且,对于相邻的两颗珠子,前一颗珠子的尾标记一定等于后一颗珠子的头标记。因为只有这样,通过吸盘(吸盘是$Mars$人吸收能 阅读全文
摘要:
Description 设一个n个节点的二叉树tree的中序遍历为(1,2,3,…,n),其中数字1,2,3,…,n为节点编号。 每个节点都有一个分数(均为正整数),记第i个节点的分数为$d_i$,tree及它的每个子树都有一个加分,任一棵子树subtree(也包含tree本身)的加分计算方法如下: 阅读全文
摘要:
Description 奶牛们打算通过锻炼来培养自己的运动细胞,作为其中的一员,贝茜选择的运动方式是每天进行$n$分钟的晨跑。在每分钟的开始,贝茜会选择下一分钟是用来跑步还是休息。 贝茜的体力限制了她跑步的距离。更具体地,如果贝茜选择在第$i$分钟内跑步,她可以在这一分钟内跑$d_i$米,并且她的疲 阅读全文
摘要:
Description Farmer John has completely forgotten how many cows he owns! He is too embarrassed to go to his fields to count the cows, since he doesn't 阅读全文
摘要:
Description Xuanxuan has n sticks of different length. One day, she puts all her sticks in a line, represented by S1, S2, S3, ...Sn. After measuring t 阅读全文
摘要:
中国加油,武汉加油!!! 阅读全文
摘要:
[toc] Description Given two strings a and b we define $a b$ to be their concatenation. For example, if a = "abc" and b = "def" then $a b$ = "abcdef". 阅读全文
摘要:
[toc] Description The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundred 阅读全文
摘要:
[toc] Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo 阅读全文