Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace SearchForANumber
- {
- class Program
- {
- static void Main(string[] args)
- {
- var numbers = Console.ReadLine()
- .Split(' ')
- .Select(int.Parse)
- .ToList();
- var commandArgs = Console.ReadLine()
- .Split(' ')
- .Select(int.Parse)
- .ToList();
- var result = numbers.Take(commandArgs[0]).ToList();
- result.RemoveRange(0, commandArgs[1]);
- if (result.Contains(commandArgs[2]))
- {
- Console.WriteLine("YES!");
- }
- else
- {
- Console.WriteLine("NO!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement