题目描述 You are given a correct solution of the sudoku puzzle. If you don't know what is the sudoku, you can read about it here. The picture showing the ...
分类:
其他好文 时间:
2020-04-14 12:24:00
阅读次数:
126
题目描述 老师交给小可可一个维护数列的任务,现在小可可希望你来帮他完成。 有长为N的数列,不妨设为a1,a2,…,aN 。有如下三种操作形式: (1)把数列中的一段数全部乘一个值; (2)把数列中的一段数全部加一个值; (3)询问数列中的一段数的和,由于答案可能很大,你只需输出这个数模P的值。 输入 ...
分类:
其他好文 时间:
2020-04-14 01:04:44
阅读次数:
69
C HDU_5578 求字符串中所有相同字母的最小距离H。 Input 实例个数T然后T行字符串字符串中仅含有小写字母。1≤T≤501≤len≤1000(len为字符串长度) Output 对于每个实例输出Case #t: H,表示第t个实例的答案是H。 如果没有相同的字母,H=-1。 Sample ...
分类:
其他好文 时间:
2020-04-12 20:58:54
阅读次数:
73
Programmer Rostislav got seriously interested in the Link/Cut Tree data structure, which is based on Splay trees. Specifically, he is now studying the ...
分类:
其他好文 时间:
2020-04-12 20:18:43
阅读次数:
92
题目大意:给你几个数,这些数里面只有0或1,你有两种操作:1.把一段区域内的所有数前后交换位置。2.把一段区域内所有数取反。(区域可大可小,可以是所有数也 可以只有一个数)。两个操作各有它的代价,你操作一次就要消耗一次代价,求把所有数都变成1所需要的最小代价。 输入:第一行输入n , ab, c : ...
分类:
其他好文 时间:
2020-04-11 13:03:11
阅读次数:
50
Many years ago Berland was a small country where only nn people lived. Each person had some savings: the ii -th one had aiai burles. The government co ...
分类:
编程语言 时间:
2020-04-11 12:55:51
阅读次数:
113
Young boy Artem tries to paint a picture, and he asks his mother Medina to help him. Medina is very busy, that's why she asked for your help. Artem wa ...
分类:
其他好文 时间:
2020-04-09 12:41:45
阅读次数:
91
水题: 链接:https://codeforces.com/contest/1291/problem/A 题意:给一个字符数组,删去数组中的一些数,使得剩下的数字的和为偶数,其中的数字有偶数多个奇数且首尾数字为奇数 找两个奇数就满足题意了: 代码: #include <cstdio> #includ ...
分类:
其他好文 时间:
2020-04-08 18:46:51
阅读次数:
59
Square Coins Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15764 Accepted Submission(s): 10843 ...
分类:
其他好文 时间:
2020-04-07 20:38:31
阅读次数:
128
题目链接:https://vjudge.net/problem/UVA-401 题意:判断是否为镜像串和倒序串 题解:分别判断即可:倒叙串逆序判断是否相等 镜像串列出两个字符串判断是否相等 注意:1.注意输出格式,每一个输出后有一个空格 2.判断镜像串满足条件有两个:一是是否在该字符串中,二是是否相 ...
分类:
其他好文 时间:
2020-04-07 18:12:43
阅读次数:
68