License Plates
Xem dạng PDF
Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
You are given a string of characters called s, including letters, digits and special characters.
Your task is finding all license plates from s without changing the order of characters in s. Each license plates must follow the template DDLLDDDDD, which D represents a digit and L represents a letter (eg. 61AA23456, 51AB23145, …)
Input
A string s (do not exceed ~10^{6}~ characters)
Output
All distinct license plates in lexicographical order. Each license plates is separated by a space.
Example
Input
61AA235556Ab33411
Output
56Ab33411 61AA23555
Bình luận