1222: FJ的字符串 [水题] 时间限制: 1 Sec 内存限制: 128 MB 提交: 92 解决: 20 统计 题目描述 FJ在沙盘上写了这样一些字符串: A1  =  “A” A2  =  “ABA” A3  =  “ABACABA” A4  =  “ABACABADABACABA” …  … 你能找出其中的规律并写所有的数列AN吗? 输入 仅有一个数:N  ≤  26. 输出 请输出相应的字符串AN,以一个换行符结束.输出中不得含有多余的空格或换行.回车符. 样例输入 2 3 样例输…
1001: 字符串“水”题 时间限制: 1 Sec  内存限制: 128 MB提交: 210  解决: 39[提交][状态][讨论版] 题目描述 给出一个长度为 n 的字符串(1<=n<=100000),求有多少个连续字串中所有的字母都出现了偶数次.  输入 第一行一个正整数 T,表示数据组数(1 <= T <= 10). 接下来 T 行,每行有一个只包含小写字母的字符串.  输出 每个答案输出满足要求字符串个数.每个答案占一行. 样例输入 3 a aabbcc abcabc 样例…
B - 大还是小? Time Limit:5000MS     Memory Limit:65535KB     64bit IO Format: Description 输入两个实数,判断第一个数大,第二个数大还是一样大.每个数的格式为: [整数部分].[小数部分] 简单起见,整数部分和小数部分都保证非空,且整数部分不会有前导 0.不过,小数部分的最 后可以有 0,因此 0.0 和 0.000 是一样大的. Input 输入包含不超过 20 组数据.每组数据包含一行,有两个实数(格式如前所述)…
B. The Time 题目连接: http://www.codeforces.com/contest/622/problem/B Description You are given the current time in 24-hour format hh:mm. Find and print the time after a minutes. Note that you should find only the time after a minutes, see the examples t…
A. Infinite Sequence 题目连接: http://www.codeforces.com/contest/622/problem/A Description Consider the infinite sequence of integers: 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5.... The sequence is built in the following way: at first the number 1 is wr…
A. Divisibility Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/597/problem/A Description Find the number of k-divisible numbers on the segment [a, b]. In other words you need to find the number of such integer values x tha…
A. Towers 题目连接: http://www.codeforces.com/contest/37/problem/A Description Little Vasya has received a young builder's kit. The kit consists of several wooden bars, the lengths of all of them are known. The bars can be put one on the top of the other…
题目链接: A. Vanya and Fence time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vanya and his friends are walking along the fence of height h and they do not want the guard to notice them. In orde…
题意:给定 n 条边,判断是不是树. 析:水题,判断是不是树,首先是有没有环,这个可以用并查集来判断,然后就是边数等于顶点数减1. 代码如下: #include <bits/stdc++.h> using namespace std; const int maxn =1000 + 5; int p[maxn]; int Find(int x){ return x == p[x] ? x : p[x] = Find(p[x]); } int main(){ int n, m, x, y; cin…
分析:水题. #include<iostream> using namespace std; #define N 5050 char a[N],b[N],tmp[N]; void Read(char p[]) { getchar(); gets(tmp); while(gets(tmp)) { if(strcmp(tmp,"END")==0) break; if(strlen(tmp)!=0) strcat(p,tmp); strcat(p,"\n");…