摘要:
题面 Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. 阅读全文
摘要:
题目描述 The good folks in Texas are having a heatwave this summer. Their Texas Longhorn cows make for good eating but are not so adept at creating creamy 阅读全文
摘要:
题面 Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 include include include include include 阅读全文
摘要:
题面 Description 在 Mars 星球上,每个 Mars 人都随身佩带着一串能量项链。在项链上有 N 颗能量珠。能量珠是一颗有头标记与尾标记的珠子,这些标记对应着某个正整数。并且,对于相邻的两颗珠子,前一颗珠子的尾标记一定等于后一颗珠子的头标记。 因为只有这样,通过吸盘(吸盘是 Mars 阅读全文
摘要:
题面 题目描述 Farmer John has noticed that his cows often move between nearby fields. Taking this into account, he wants to plant enough grass in each of hi 阅读全文
摘要:
题面 大致题意: 给定两个数列A,B,长度分别为N和M 求出 满足 Ak=B1 ,Ak+1=B2......Ak+M 1=Bm 的最小k值 如果有多个k值输出最小的一个 题解 KMP裸题 直接计算B数列的next值KMP匹配即可 cpp include include include include 阅读全文
摘要:
题面 题目描述 Bessie is planning the annual Great Cow Gathering for cows all across the country and, of course, she would like to choose the most convenient 阅读全文
摘要:
题面 Description N 种物品,第 i 种物品有 s i 个,单个重量为 w i ,单个价值为 v i 。现有一个限重为 W 的背包,求能容 纳的物品的最大总价值。 Input 输入第一行二个整数 N , W ( N ≤ 1000 , M ≤ 10000) 。 接下来 N 行,每行三个整数 阅读全文
摘要:
Description 给出一张 n × n 的棋盘,格子有黑有白。现在要在棋盘上放棋子,要求: • 黑格子上不能有棋子 • 每行每列至多只有一枚棋子 你的任务是求出有多少种合法的摆放方案。答案模 109+7109+7 。 Input 输入的第一行一个整数 n ( n ≤ 15) 。 接下来一个 n 阅读全文
摘要:
题面 题目描述 给出一个长度不超过200的由小写英文字母组成的字母串(约定;该字串以每行20个字母的方式输入,且保证每行一定为20个)。要求将此字母串分成k份(1 include include include include include using namespace std; //f[i][ 阅读全文
摘要:
题面 题目描述 Erwin最近对一种叫"thair"的东西巨感兴趣。。。 在含有n个整数的序列a1,a2......an中, 三个数被称作"thair"当且仅当i include include include include include include using namespace std; 阅读全文