Pascal Triangle- # include < bits / stdc ++. h > using namespace std ; int main () { ios_base :: sync_with_stdio ( false ); cin . tie ( NULL ); int n ; cin >> n ; vector < int > cur ( n + 1 ), prev ( n + 1 ); for ( int i = 1 ; i <= n ; i ++) { prev [ 0 ]= 1 ; for ( int j = 1 ; j <= i ; j ++) { if ( j == 1 || j == i ) cur [ j ]= prev [ j - 1 ]; else cur [ j ]= prev [ j ]+ prev [ j - 1 ]; ...
competitive programming guides eg.algorithms,problems,tricks ,datastructure based on cp.