Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- using System.Linq;
- using System.Globalization;
- using System.Collections.Generic;
- using System.Text;
- public class Example
- {
- public static void Main(string[] args)
- {
- string map = Console.ReadLine();
- while(true)
- {
- string [] clues = Console.ReadLine().Split().ToArray();
- string trace ="\\"+clues[0]+"+";
- MatchCollection m = Regex.Matches(map, trace);
- foreach (Match tr in m)
- {
- if (tr.Length>=int.Parse(clues[1]))
- {
- Console.WriteLine($"Hideout found at index {tr.Index} and it is with size {tr.Length}!");
- return;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement