Entries from 2016-07-09 to 1 day
https://www.hackerrank.com/challenges/find-median-1 The classical two heap technique.. Don't forget to add ( int ) before calling size for container.. void solve(){ int N; cin >> N; vi A( N ); for( int i = 0; i < N; ++i ) cin >> A[ i ]; pr…
https://www.hackerrank.com/challenges/2s-complement It's easy to count the number of 1s that will be written in positive range with digit DP, simply remember the number of ways to reach some state will do. Let's think about cases where it'…