Reincarnation Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 843 Accepted Submission(s): 283 Problem Description Now you are back,and have a task to do:Given you a string s consist of lower
题目链接:https://vjudge.net/problem/SPOJ-SUBST1 SUBST1 - New Distinct Substrings #suffix-array-8 Given a string, we need to find the total number of its distinct substrings. Input T- number of test cases. T<=20; Each test case consists of one string, who
SETI Time Limit: 4000/2000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) Submit Statistic Next Problem Problem Description Amateur astronomers Tom and Bob try to find radio broadcasts of extraterrestrial civilizations in the air. Recentl
Boring count Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 828 Accepted Submission(s): 342 Problem Description You are given a string S consisting of lowercase letters, and your task is co
首先,要求找到最长最短字符串,我们应该用数组将其存起来,输入的个数是不固定的,我们就可以用Scanner获取要输入的个数,最终找到的个数也不固定,我们可以封装两个方法,并且返回值类型为数组. 我遇到的问题,开始我想到的是字符串拼接,么想到返回值用数组存,导致每次返回的个数都是固定的,就算有多个. 代码如下: import java.util.Scanner; //输入n行字符串,找出最长最短字符串(若有个数相同的,都打印出来) public class FindString { public s
// Example3.cpp : 定义控制台应用程序的入口点. //以特定单词为分界,求取字符串的左右子串 #include "StdAfx.h" #include <string> #include <iostream> using namespace std; int main(void) { string str,str1,str2; int index; str="cjc is a good boy"; cout<<&q