Skip to content

Instantly share code, notes, and snippets.

@ellenia
Created June 6, 2017 14:52
Show Gist options
  • Save ellenia/05f0bfc8b07eaa10512b6454a68f02e3 to your computer and use it in GitHub Desktop.
Save ellenia/05f0bfc8b07eaa10512b6454a68f02e3 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
class Solution {
static void Main(String[] args) {
int n = Convert.ToInt32(Console.ReadLine());
string[] height_temp = Console.ReadLine().Split(' ');
int[] height = Array.ConvertAll(height_temp,Int32.Parse);
Console.WriteLine((from x in height where x == height.Max() select x).Count());
/* int tallest = height.Max();
int count = height.Count(c => c == tallest);
Console.WriteLine(count);*/
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment