F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Huge String

Time Limit: 3000/3000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)
Total Submission(s): 698    Accepted Submission(s): 149


Problem Description
You can get a huge string from a tiny one S by repeating doing following replacement N times.

What's the substring containing M characters starting at the index K?
 

Input
There are multiple test cases. Process to the End of File.
The first line of each test contains the string S made up of nonspacing graphic characters, whose length doesn't exceed 100. The second line contains three integers: 0 ¡Ü N ¡Ü 100, 1 ¡Ü M ¡Ü 200 and 0 ¡Ü K ¡Ü 1081.
 

Output
For each test case, output the substring [K, min(length(S), K + M))
 

Sample Input
W 2 4 8 ACM-ICPC 1 8 0
 

Sample Output
W ACM-ICPC
 

Hint

H.html download ·½±ãͼÖÐÎÄ×Ö¸´ÖÆ
http://pan.baidu.com/share/link?shareid=463767611&uk=352484775
 

Author
Zejun Wu (watashi)
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-26 07:51:05, Gzip enabled