IdentifyingWood
SRM 635 · 2014-08-25 · by Xellos0
SRM 635 · 2014-08-25 · by Xellos0 · Brute Force, Simple Search, Iteration
Problem Statement
Problem Statement
We call a pair of
Given
Notes
- String t is contained in string s as a subsequence if we can obtain t by removing zero or more (not necessarily consecutive) characters from s.
Constraints
- s and t will consist only of lowercase English letters.
- s and t will each be between 1 and 10 characters long, inclusive.
Examples
0)
"absdefgh" "asdf" Returns: "Yep, it's wood."
1)
"oxoxoxox" "ooxxoo" Returns: "Nope."
2)
"oxoxoxox" "xxx" Returns: "Yep, it's wood."
3)
"qwerty" "qwerty" Returns: "Yep, it's wood."
4)
"string" "longstring" Returns: "Nope."
Submissions are judged against all 80 archived test cases, of which 5 are shown here. Case numbers match the judge’s.
Coding Area
Language: C++17 · define a public class IdentifyingWood with a public method string check(string s, string t) · 80 test cases · 2 s / 256 MB per case