We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Warmup
- Birthday Cake Candles
- Discussions
Birthday Cake Candles
Birthday Cake Candles
Sort by
recency
|
5349 Discussions
|
Please Login in order to post a comment
M = max(candles) return len([candle for candle in candles if candle == M])
include
using namespace std;
using ll = long long;
int main(){ int n; cin >> n; multiset s; for (int i = 0; i < n; i++){ int temp; cin >> temp; s.insert(temp); } cout << s.count(*s.rbegin()); }
This solution to the Birthday Cake Candles problem is clear and efficient—just like how Zebra Blinds in Miami bring a clean and modern look to any space by balancing light and privacy perfectly. If you’re interested in sleek window treatments,
check out Zebra Blinds in Miami for stylish options that blend form and function seamlessly!