题意:求出给定串的全排列 解题思路:对于给定的字符串,对它sort以后进行求下一个排列即可 是UVA146的加强版, 解题代码: View Code ...
.题目大意 求一个长度不超过 的字符串的最小周期. .思路 非常简单,基本就是根据周期的定义做出来的,几乎不需要过脑. .应该注意的地方 最后输出的方式要注意,不然很容易就PE了.不过个人认为,其实这题Sample Output给的不好 注意输出的要求是最小周期 .代码 include stdio.h include string.h define maxn int main int T,m,i ...
2016-10-11 22:57 1 1721 推荐指数:
题意:求出给定串的全排列 解题思路:对于给定的字符串,对它sort以后进行求下一个排列即可 是UVA146的加强版, 解题代码: View Code ...
uva1354 天平难题。主要有 回溯法,二叉树模拟。 当然,这道题也有很多剪枝,但是这个用二叉树性质模拟的数组应该过了,这样写,这道题,完全就足够了。 原题目链接:https://uva.onlinejudge.org/external/13/1354.pdf 题目大意: 就是首先给 ...
第24届全国青少年信息学奥林匹克联赛初赛 普及组C++语言试题 竞赛时间:2018 年 10 月 13 日 14:30~16:30 选手注意: 1、试题纸共有 7 页,答题纸共有 2 页,满分 100 分。请在答题纸上作答,写在试题纸上的一律无效 ...
1.题目大意 Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more ...
1.题目大意 Given an array of integers, every element appears twice except for one. Find that single one ...
1.题目大意 Write a program that outputs the string representation of numbers from 1 to n. But for mult ...
noip 2016 j3 海港(模拟)noip 2016 j2 回文日期(枚举)noip 2015 j3 求和(数学推导)noip 2015 j1 金币(模拟)noip 2014 j1 珠心算测验(枚 ...
题目 题目链接 Given a non-empty string check if it can be constructed by taking a substring of it and app ...