Language: C++

#include<bits/stdc++.h>
using namespace std;
#define long long ll
struct node{
  ll a , b;
}a0[ 201000 ];
ll a1[ 201000 ] , n , t ;
ll dp[ 201000 ] , cnt1 , cnt2 , ans;  

bool mycmp( node x , node y ){
	return y.a* x.b < x.a * y.b ;  
}
int main( ){
  scanf("%lld%lld" , &n , &t );
   for( int i = 1 ; i <= 31 ; i ++ ) dp[ i ] = t + 1;
  for( int i = 1 ; i <= n ; i ++ ){
   int a , b;
   scanf("%lld%lld" , &a , &b );
   b ++ ; b += a;
   if( a == 0 ) a1[ ++cnt1 ] = b;else 
   a0[ ++cnt2 ] = { a , b };    
  }
  sort( a0 + 1 , a0 + cnt2 + 1 , mycmp );
	sort( a1 + 1 , a1 + cnt1 + 1 );
	for( int i = 1 ; i <= cnt2 ; i ++ ){
	for( int j = 30 ; j >= 0 ; j -- ){
			if( dp[ j ] <= t ) 
			 dp[ j + 1 ] = min( dp[ j + 1 ] , dp[ j ] + a0[ i ].a * dp[ j ] + a0[ i ].b );
	}
	}
	for( int i = 1 ; i <= 30 ; i ++ ){
		if( dp[ i ] <= t ){
         int lef = t - dp[ i ] , num = i ;
			for( int j = 1 ; j <= cnt1 ; j ++ ){
			 if( lef < a1[ j ] ) break;
			 lef -= a1[ j ];
			 num ++;
		   }
		   ans = max( ans , num );
	   }
    }
	 
	printf("%lld" , ans );
}

Compiler output:
a.cc:5:3: error: 'll' does not name a type
    5 |   ll a , b;
      |   ^~
a.cc:7:1: error: 'll' does not name a type
    7 | ll a1[ 201000 ] , n , t ;
      | ^~
a.cc:8:1: error: 'll' does not name a type
    8 | ll dp[ 201000 ] , cnt1 , cnt2 , ans;
      | ^~
a.cc: In function 'bool mycmp(node, node)':
a.cc:11:18: error: 'struct node' has no member named 'a'
   11 |         return y.a* x.b < x.a * y.b ;
      |                  ^
a.cc:11:23: error: 'struct node' has no member named 'b'
   11 |         return y.a* x.b < x.a * y.b ;
      |                       ^
a.cc:11:29: error: 'struct node' has no member named 'a'
   11 |         return y.a* x.b < x.a * y.b ;
      |                             ^
a.cc:11:35: error: 'struct node' has no member named 'b'
   11 |         return y.a* x.b < x.a * y.b ;
      |                                   ^
a.cc: In function 'int main()':
a.cc:14:23: error: 'n' was not declared in this scope; did you mean 'yn'?
   14 |   scanf("%lld%lld" , &n , &t );
      |                       ^
      |                       yn
a.cc:14:28: error: 't' was not declared in this scope; did you mean 'tm'?
   14 |   scanf("%lld%lld" , &n , &t );
      |                            ^
      |                            tm
a.cc:15:38: error: 'dp' was not declared in this scope; did you mean 'dup'?
   15 |    for( int i = 1 ; i <= 31 ; i ++ ) dp[ i ] = t + 1;
      |                                      ^~
      |                                      dup
a.cc:20:17: error: 'a1' was not declared in this scope; did you mean 'a'?
   20 |    if( a == 0 ) a1[ ++cnt1 ] = b;else
      |                 ^~
      |                 a
a.cc:20:23: error: 'cnt1' was not declared in this scope
   20 |    if( a == 0 ) a1[ ++cnt1 ] = b;else
      |                       ^~~~
a.cc:21:10: error: 'cnt2' was not declared in this scope
   21 |    a0[ ++cnt2 ] = { a , b };
      |          ^~~~
a.cc:23:23: error: 'cnt2' was not declared in this scope
   23 |   sort( a0 + 1 , a0 + cnt2 + 1 , mycmp );
      |                       ^~~~
a.cc:24:15: error: 'a1' was not declared in this scope; did you mean 'y1'?
   24 |         sort( a1 + 1 , a1 + cnt1 + 1 );
      |               ^~
      |               y1
a.cc:24:29: error: 'cnt1' was not declared in this scope
   24 |         sort( a1 + 1 , a1 + cnt1 + 1 );
      |                             ^~~~
a.cc:27:29: error: 'dp' was not declared in this scope; did you mean 'dup'?
   27 |                         if( dp[ j ] <= t )
      |                             ^~
      |                             dup
a.cc:28:77: error: 'struct node' has no member named 'a'
   28 |                          dp[ j + 1 ] = min( dp[ j + 1 ] , dp[ j ] + a0[ i ].a * dp[ j ] + a0[ i ].b );
      |                                                                             ^
a.cc:28:99: error: 'struct node' has no member named 'b'
   28 |                          dp[ j + 1 ] = min( dp[ j + 1 ] , dp[ j ] + a0[ i ].a * dp[ j ] + a0[ i ].b );
      |                                                                                                   ^
a.cc:32:21: error: 'dp' was not declared in this scope; did you mean 'dup'?
   32 |                 if( dp[ i ] <= t ){
      |                     ^~
      |                     dup
a.cc:37:26: error: 'num' was not declared in this scope; did you mean 'enum'?
   37 |                          num ++;
      |                          ^~~
      |                          enum
a.cc:39:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   39 |                    ans = max( ans , num );
      |                    ^~~
      |                    abs
a.cc:39:37: error: 'num' was not declared in this scope; did you mean 'enum'?
   39 |                    ans = max( ans , num );
      |                                     ^~~
      |                                     enum
a.cc:43:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   43 |         printf("%lld" , ans );
      |                         ^~~
      |                         abs