C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
분야별 포럼
C++빌더
델파이
파이어몽키
C/C++
프리파스칼
파이어버드
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

구인/구직
볼랜드포럼에서 다루지 않는 Java, .NET 관련 구인/구직 글은 금지합니다.
[6725] 간단한 c++ 프로그래밍 해주실분 구합니다[3만]
땡중 [kdj1795] 1367 읽음    2014-12-02 13:40
페이 : 3만
내일 오후 6시 이전까지 해주셔야합니다.

가장많이 나온 문자열을 찾아주는 프로그램입니다.

해쉬함수를 이용해서 패스워드를 서치하는 프로그램입니다.
STL과 string 클래스사용 안되고
vector클래스 사용가능합니다.



예를들어
인풋 : 3(사이즈)  accacacea
아웃풋 : cac

Length-3 substrings and their frequencies
accacacea  acc, cca, cac, aca, cac, ace, cea
acc: 1
cca: 1
cac: 2 <--가장 많이 나온 문자열
aca: 1
ace: 1
cea: 1

Size of all length-15 strings
aaaaaaaaaaaaaaa ~ zzzzzzzzzzzzzzz
0 ~ 26^15–1 (= 1,677,259,342,285,725,925,375)


아래는 원본 문제입니다.


A password with size N can be found by searching the text for the most frequent substring with N characters. After finding the password, the password can be used to decode the message.

Your mission has been simplified as you are only requested to write a program that, given the size of the password and the encoded message, determines the password following the strategy given above.

Input consists of two lines with the size of the password, 0 < N <= 15, followed by the text representing the encoded message whose size is less than or equal to 5,000,000. To simplify things, the input text only includes lower-case alphabet letters.


Ricardo Lopes, CPUP'2003 Round 1
University of Porto local Contest

테스트 case 첨부하여 올립니다


하실분 연락부탁드립니다.

010 2570 1795

+ -

관련 글 리스트
6725 간단한 c++ 프로그래밍 해주실분 구합니다[3만] 땡중 1367 2014/12/02
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.