Language: C++

 #include <bits/stdc++.h> 
#define MX 32
using namespace std; 
typedef long long int ll ;
typedef pair <ll , ll> P;
bool comp(P p,P q) { 
return p.second∗q. first<q.second∗p. first ; }
 ll dp[MX]; int main() 
 { int n,T; 
scanf(”%d %d”,&n,&T); 
vector <int> all ; 
 vector <P> vx; 
for(int i=0;i<n; i++) 
 { int a,b; 
 scanf(”%d %d”,&a,&b); 
b++;
b+=a; if (a==0) all .push_back(b);
 else { 
vx.push_back(P(a,b)); } 
 } sort(vx.begin() ,vx.end() ,comp); 
for(int i=0;i<MX; i++) dp[ i]=T+1;
 dp[0]=0; 
 for(int i=0;i<vx. size(); i++) { 
 P p=vx[ i ]; for(int j=MX−2;j>=0;j−−) 
 { if (dp[ j]>T) continue; 
dp[ j+1]=min(dp[ j+1],(p. first+1)∗dp[ j]+p.second);
}
 } sort(all .begin() ,all .end());
 int ret=0; 
for(int i=0;i<MX; i++) 
 { if (dp[ i]>T) continue; 
 ll zan=T−dp[ i ]; int pos=0; 
 while(pos<all . size()&&zan>=all [pos]) { 
 zan−=all [pos]; pos++; 
 } ret=max(ret ,pos+i); 
 } printf(”%d\n”,ret); 
return 0; }


Compiler output:
a.cc:7:10: error: extended character ∗ is not valid in an identifier
    7 | return p.second∗q. first<q.second∗p. first ; }
      |          ^
a.cc:7:28: error: extended character ∗ is not valid in an identifier
    7 | return p.second∗q. first<q.second∗p. first ; }
      |                            ^
a.cc:10:7: error: extended character ” is not valid in an identifier
   10 | scanf(”%d %d”,&n,&T);
      |       ^
a.cc:10:12: error: extended character ” is not valid in an identifier
   10 | scanf(”%d %d”,&n,&T);
      |            ^
a.cc:15:8: error: extended character ” is not valid in an identifier
   15 |  scanf(”%d %d”,&a,&b);
      |        ^
a.cc:15:13: error: extended character ” is not valid in an identifier
   15 |  scanf(”%d %d”,&a,&b);
      |             ^
a.cc:24:25: error: extended character − is not valid in an identifier
   24 |  P p=vx[ i ]; for(int j=MX−2;j>=0;j−−)
      |                         ^
a.cc:24:35: error: extended character − is not valid in an identifier
   24 |  P p=vx[ i ]; for(int j=MX−2;j>=0;j−−)
      |                                   ^
a.cc:24:35: error: extended character − is not valid in an identifier
a.cc:26:35: error: extended character ∗ is not valid in an identifier
   26 | dp[ j+1]=min(dp[ j+1],(p. first+1)∗dp[ j]+p.second);
      |                                   ^
a.cc:32:9: error: extended character − is not valid in an identifier
   32 |  ll zan=T−dp[ i ]; int pos=0;
      |         ^
a.cc:34:2: error: extended character − is not valid in an identifier
   34 |  zan−=all [pos]; pos++;
      |  ^
a.cc:36:11: error: extended character ” is not valid in an identifier
   36 |  } printf(”%d\n”,ret);
      |           ^
a.cc:36:14: error: stray '\' in program
   36 |  } printf(”%d\n”,ret);
      |              ^
a.cc:36:15: error: extended character ” is not valid in an identifier
   36 |  } printf(”%d\n”,ret);
      |               ^
a.cc: In function 'bool comp(P, P)':
a.cc:7:10: error: 'P' {aka 'struct std::pair<long long int, long long int>'} has no member named 'second\U00002217q'; did you mean 'second'?
    7 | return p.second∗q. first<q.second∗p. first ; }
      |          ^~~~~~~~
      |          second
a.cc:7:28: error: 'P' {aka 'struct std::pair<long long int, long long int>'} has no member named 'second\U00002217p'; did you mean 'second'?
    7 | return p.second∗q. first<q.second∗p. first ; }
      |                            ^~~~~~~~
      |                            second
a.cc: In function 'int main()':
a.cc:10:7: error: '\U0000201d' was not declared in this scope
   10 | scanf(”%d %d”,&n,&T);
      |       ^
a.cc:10:9: error: 'd' was not declared in this scope
   10 | scanf(”%d %d”,&n,&T);
      |         ^
a.cc:10:12: error: 'd\U0000201d' was not declared in this scope
   10 | scanf(”%d %d”,&n,&T);
      |            ^~
a.cc:24:25: error: 'MX\U000022122' was not declared in this scope
   24 |  P p=vx[ i ]; for(int j=MX−2;j>=0;j−−)
      |                         ^~~~
a.cc:24:35: error: 'j\U00002212\U00002212' was not declared in this scope
   24 |  P p=vx[ i ]; for(int j=MX−2;j>=0;j−−)
      |                                   ^~~
a.cc:26:35: error: expected ')' before '\U00002217dp'
   26 | dp[ j+1]=min(dp[ j+1],(p. first+1)∗dp[ j]+p.second);
      |             ~                     ^~~
      |                                   )
a.cc:32:9: error: 'T\U00002212dp' was not declared in this scope
   32 |  ll zan=T−dp[ i ]; int pos=0;
      |         ^~~~
a.cc:34:2: error: 'zan\U00002212' was not declared in this scope
   34 |  zan−=all [pos]; pos++;
      |  ^~~~