Submission #53122133
Source Code Expand
Copy
import java.util.*;public class Main {static Scanner in;public static void main(String[] args) {in = new Scanner(System.in);String s = in.nextLine();String t = in.nextLine();int[] res = new int[s.length()];for(int i = 0; i < s.length(); i++){for(int j = 0; j < t.length(); j++){if(s.charAt(i) == t.charAt(j)){res[i++] = j+1;}}}for(int i = 0; i < res.length; i++){System.out.print(res[i] + " ");}
import java.util.*; public class Main { static Scanner in; public static void main(String[] args) { in = new Scanner(System.in); String s = in.nextLine(); String t = in.nextLine(); int[] res = new int[s.length()]; for(int i = 0; i < s.length(); i++){ for(int j = 0; j < t.length(); j++){ if(s.charAt(i) == t.charAt(j)){ res[i++] = j+1; } } } for(int i = 0; i < res.length; i++){ System.out.print(res[i] + " "); } } }
Submission Info
Submission Time | |
---|---|
Task | B - Typing |
User | JuanXX0 |
Language | Java (OpenJDK 17) |
Score | 200 |
Code Size | 607 Byte |
Status | AC |
Exec Time | 552 ms |
Memory | 60212 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample00.txt, sample01.txt, sample02.txt |
All | sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt, testcase13.txt, testcase14.txt, testcase15.txt, testcase16.txt, testcase17.txt, testcase18.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample00.txt | AC | 79 ms | 38380 KB |
sample01.txt | AC | 80 ms | 38324 KB |
sample02.txt | AC | 79 ms | 38736 KB |
testcase00.txt | AC | 79 ms | 38376 KB |
testcase01.txt | AC | 520 ms | 54340 KB |
testcase02.txt | AC | 549 ms | 57380 KB |
testcase03.txt | AC | 552 ms | 57576 KB |
testcase04.txt | AC | 457 ms | 54052 KB |
testcase05.txt | AC | 247 ms | 45724 KB |
testcase06.txt | AC | 343 ms | 48440 KB |
testcase07.txt | AC | 315 ms | 48968 KB |
testcase08.txt | AC | 510 ms | 55736 KB |
testcase09.txt | AC | 186 ms | 43068 KB |
testcase10.txt | AC | 165 ms | 41384 KB |
testcase11.txt | AC | 172 ms | 41940 KB |
testcase12.txt | AC | 174 ms | 41508 KB |
testcase13.txt | AC | 164 ms | 42168 KB |
testcase14.txt | AC | 473 ms | 53948 KB |
testcase15.txt | AC | 441 ms | 52868 KB |
testcase16.txt | AC | 472 ms | 60212 KB |
testcase17.txt | AC | 422 ms | 52112 KB |
testcase18.txt | AC | 446 ms | 53376 KB |