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:11:7: error: extended character ” is not valid in an identifier
   11 | scanf(”%d %d”,&n,&T);
      |       ^
a.cc:11:12: error: extended character ” is not valid in an identifier
   11 | scanf(”%d %d”,&n,&T);
      |            ^
a.cc:16:7: error: extended character ” is not valid in an identifier
   16 | scanf(”%d %d”,&a,&b);
      |       ^
a.cc:16:12: error: extended character ” is not valid in an identifier
   16 | scanf(”%d %d”,&a,&b);
      |            ^
a.cc:28:12: error: extended character − is not valid in an identifier
   28 |  for(int j=MX−2;j>=0;j−−) {
      |            ^
a.cc:28:22: error: extended character − is not valid in an identifier
   28 |  for(int j=MX−2;j>=0;j−−) {
      |                      ^
a.cc:28:22: error: extended character − is not valid in an identifier
a.cc:30:34: error: extended character ∗ is not valid in an identifier
   30 | dp[j+1]=min(dp[ j+1],(p. first+1)∗dp[ j]+p.second);
      |                                  ^
a.cc:37:9: error: extended character − is not valid in an identifier
   37 |  ll zan=T−dp[ i ];
      |         ^
a.cc:40:2: error: extended character − is not valid in an identifier
   40 |  zan−=all [pos];
      |  ^
a.cc:45:9: error: extended character ” is not valid in an identifier
   45 |  printf(”%d\n”,ret);
      |         ^
a.cc:45:12: error: stray '\' in program
   45 |  printf(”%d\n”,ret);
      |            ^
a.cc:45:13: error: extended character ” is not valid in an identifier
   45 |  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:11:7: error: '\U0000201d' was not declared in this scope
   11 | scanf(”%d %d”,&n,&T);
      |       ^
a.cc:11:9: error: 'd' was not declared in this scope
   11 | scanf(”%d %d”,&n,&T);
      |         ^
a.cc:11:12: error: 'd\U0000201d' was not declared in this scope
   11 | scanf(”%d %d”,&n,&T);
      |            ^~
a.cc:28:12: error: 'MX\U000022122' was not declared in this scope
   28 |  for(int j=MX−2;j>=0;j−−) {
      |            ^~~~
a.cc:28:22: error: 'j\U00002212\U00002212' was not declared in this scope
   28 |  for(int j=MX−2;j>=0;j−−) {
      |                      ^~~
a.cc:30:34: error: expected ')' before '\U00002217dp'
   30 | dp[j+1]=min(dp[ j+1],(p. first+1)∗dp[ j]+p.second);
      |            ~                     ^~~
      |                                  )
a.cc:37:9: error: 'T\U00002212dp' was not declared in this scope
   37 |  ll zan=T−dp[ i ];
      |         ^~~~
a.cc:40:2: error: 'zan\U00002212' was not declared in this scope
   40 |  zan−=all [pos];
      |  ^~~~