Submission details
Task:Leimasin
Sender:TapaniS
Submission time:2025-09-27 08:55:27 +0300
Language:Java
Status:READY
Result:76
Feedback
groupverdictscore
#1ACCEPTED33
#2ACCEPTED43
#30
Test results
testverdicttimegroup
#1ACCEPTED0.13 s1, 2, 3details
#2ACCEPTED0.13 s1, 2, 3details
#3ACCEPTED0.14 s1, 2, 3details
#4ACCEPTED0.14 s1, 2, 3details
#5ACCEPTED0.19 s2, 3details
#6ACCEPTED0.18 s2, 3details
#7ACCEPTED0.22 s2, 3details
#8ACCEPTED0.30 s2, 3details
#9ACCEPTED0.79 s3details
#10ACCEPTED0.79 s3details
#11--3details
#12--3details
#13--3details
#14--3details

Code

import java.util.*;

public class leimasin {


	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		//int t = input.nextInt();

		String numbersLine = input.nextLine();
		String[] numberParts = numbersLine.split("\\s+");

		int n = Integer.parseInt(numberParts[0]);  // merkkijonon pituus
        int m = Integer.parseInt(numberParts[1]);  // leimasin pituus
		int k = Integer.parseInt(numberParts[2]);  // leimausten maara
		
		String line = input.nextLine();
				
		char[] stamp = line.toCharArray();
		
		String line2 = input.nextLine();
		String[] parts = line2.split("\\s+");
		
		int[] numbers = new int[parts.length];
		
		for (int i = 0; i < parts.length; i++) {
            numbers[i] = Integer.parseInt(parts[i]);
        }
		
		input.close(); 
		
		// Program here

		int ans = 0;

		
		char[] jono = new char[n];
		
		Arrays.fill(jono, '.'); 


		for (int num : numbers) {  // leimausten maara
            
			int alku = num - 1;
			
			for (int i2 = 0; i2 < m; i2++) {  // leimasin pituus
			
				jono[alku+i2] = stamp[i2];
			
			
			}  // leimasin pituus
			
        }  // leimausten maara


		System.out.println(jono);


    }
}

Test details

Test 1

Group: 1, 2, 3

Verdict: ACCEPTED

input
1000 1 100
a
585 600 750 170 794 845 341 39...

correct output
............a....aa..............

user output
............a....aa..............

Test 2

Group: 1, 2, 3

Verdict: ACCEPTED

input
1000 4 100
zhrb
795 569 744 662 315 869 913 21...

correct output
.........................zhrb....

user output
.........................zhrb....

Test 3

Group: 1, 2, 3

Verdict: ACCEPTED

input
1000 100 100
wkmtgzytnfwptwukbartgunjyrkyml...

correct output
wkmtgzywkmtgzytnfwptwukbartgun...

user output
wkmtgzywkmtgzytnfwptwukbartgun...

Test 4

Group: 1, 2, 3

Verdict: ACCEPTED

input
1000 1000 100
njplbyvkaytbcyzbylzntnmpfapvfg...

correct output
njplbyvkaytbcyzbylzntnmpfapvfg...

user output
njplbyvkaytbcyzbylzntnmpfapvfg...

Test 5

Group: 2, 3

Verdict: ACCEPTED

input
100000 1 1000
a
61541 4948 46214 29629 8779 76...

correct output
.................................

user output
.................................

Test 6

Group: 2, 3

Verdict: ACCEPTED

input
100000 10 1000
ntsconpqnv
17118 69319 2115 8873 892 9994...

correct output
.....................ntsconpqn...

user output
.....................ntsconpqn...

Test 7

Group: 2, 3

Verdict: ACCEPTED

input
100000 10000 1000
wcyeepjmmvavmoncfxclqrsebjzwbf...

correct output
.................................

user output
.................................

Test 8

Group: 2, 3

Verdict: ACCEPTED

input
100000 100000 1000
chdcxwwznawllrxcxlckeziomcsjhc...

correct output
chdcxwwznawllrxcxlckeziomcsjhc...

user output
chdcxwwznawllrxcxlckeziomcsjhc...

Test 9

Group: 3

Verdict: ACCEPTED

input
1000000 1 500000
a
406018 635983 429225 943593 90...

correct output
.a...aa.....a.aaaa.a.aaa..aa.a...

user output
.a...aa.....a.aaaa.a.aaa..aa.a...

Test 10

Group: 3

Verdict: ACCEPTED

input
1000000 10 500000
frvhrhlrxi
85148 459715 677814 98302 4081...

correct output
frvhfrvhrhlrxihrhlrxifrvhrfrvf...

user output
frvhfrvhrhlrxihrhlrxifrvhrfrvf...

Test 11

Group: 3

Verdict:

input
1000000 1000 500000
hklmkntjqgilackgurwlerwvvfjwwr...

correct output
.hklhklmkntjqgilackgurwlerwvvf...

user output
(empty)

Test 12

Group: 3

Verdict:

input
1000000 10000 500000
yxajftmelgwiofcugtrvcltdemhyuu...

correct output
yxajftyxayxajftmelgwiofcugtrvc...

user output
(empty)

Test 13

Group: 3

Verdict:

input
1000000 100000 500000
yyzteckvutdnprlklyxgenyqpznght...

correct output
.yyyyzteckvutdnpryyzteckvutdnp...

user output
(empty)

Test 14

Group: 3

Verdict:

input
1000000 1000000 500000
hhgvveiosloznsihxtccfjbizayyhl...

correct output
hhgvveiosloznsihxtccfjbizayyhl...

user output
(empty)