Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
int n､m;
  int ans=0
cin>>n>>m;
  vector<int> a(n);
  for(int i=0;i<n;i++){
    cin>>a[i];
    ans+=a[i];
  }
  for(int j=0;j<m;j++){
    int x=0;
    for(int i=0;i<n;i++){
      x=max(x,a[i]);
      }
    sum+=x;
    for(int i=0;i<n;i++){
      if(x==a[i]/2){
      a[i]/=2;
      }
    } 
  }
  ansｰ=sum;
  cout<<ans<<endl;
  return 0;
    
}
#include<iostream>
#include<vector>
using namespace std;
int main(){
int n､m;
  long long ans=0,sum=0;
cin>>n>>m;
  vector<long long> a(n);
  for(int i=0;i<n;i++){
    cin>>a[i];
    ans+=a[i];
  }
  for(int j=0;j<m;j++){
    int x=0;
    for(int i=0;i<n;i++){
      x=max(x,a[i]);
      }
    sum+=x;
    for(int i=0;i<n;i++){
      if(x==a[i]/2){
      a[i]/=2;
      }
    } 
  }
  ansｰ=sum;
  cout<<ans<<endl;
  return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected ',' or ';' before 'cin'
    7 | cin>>n>>m;
      | ^~~
a.cc:8:17: error: 'n' was not declared in this scope
    8 |   vector<int> a(n);
      |                 ^
a.cc:13:17: error: 'm' was not declared in this scope
   13 |   for(int j=0;j<m;j++){
      |                 ^
a.cc:18:5: error: 'sum' was not declared in this scope
   18 |     sum+=x;
      |     ^~~
a.cc:25:3: error: 'ans\U0000ff70' was not declared in this scope
   25 |   ansｰ=sum;
      |   ^~~~
a.cc:25:8: error: 'sum' was not declared in this scope
   25 |   ansｰ=sum;
      |        ^~~
a.cc: At global scope:
a.cc:33:5: error: redefinition of 'int main()'
   33 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:36:6: error: 'n' was not declared in this scope
   36 | cin>>n>>m;
      |      ^
a.cc:36:9: error: 'm' was not declared in this scope; did you mean 'tm'?
   36 | cin>>n>>m;
      |         ^
      |         tm
a.cc:45:12: error: no matching function for call to 'max(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)'
   45 |       x=max(x,a[i]);
      |         ~~~^~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:45:12: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'})
   45 |       x=max(x,a[i]);
      |         ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
a.cc:54:3: error: 'ans\U0000ff70' was not declared in this scope
   54 |   ansｰ=sum;
      |   ^~~~