Language: C++

#include <utility>
#include <algorithm>
#include <iostream>
using namespace std;
int main(){
  int N, M, v;
  pair<int,int> vote_area[110];
  while (cin >> N >> M & M >0) {
    //ペアの初期化
    for (int j = 0; j < M; ++j)
    {
      vote_area[j].first = 0;
      vote_area[j].second = j+1;/* code */
    }

    for (int i = 0; i < N; ++i)
    {
      for (int j = 0; j < M; ++j)
      {
        cin >> v;/* i人目の人が場所jに行きたいかどうか */  
        vote_area[j].first += v;
        // cout << vote_area[j].first;
      }
      // cout << endl;
    }

//あるタイミングで整列する
    sort(vote_area, vote_area+M);
    reverse(vote_area, vote_area+M);
    for (int i = 0; i < M; ++i)
    {
      cout << vote_area[i].second;
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: no match for 'operator&' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'bool')
    8 |   while (cin >> N >> M & M >0) {
      |          ~~~~~~~~~~~~~ ^ ~~~~
      |                   |        |
      |                   |        bool
      |                   std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:8:24: note: candidate: 'operator&(int, int)' (built-in)
    8 |   while (cin >> N >> M & M >0) {
      |          ~~~~~~~~~~~~~~^~~~~~
a.cc:8:24: note:   no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
                 from /usr/include/c++/14/string:68,
                 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:3:
/usr/include/c++/14/cstddef:141:3: note: candidate: 'constexpr std::byte std::operator&(byte, byte)'
  141 |   operator&(byte __l, byte __r) noexcept
      |   ^~~~~~~~
/usr/include/c++/14/cstddef:141:18: note:   no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::byte'
  141 |   operator&(byte __l, byte __r) noexcept
      |             ~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:84:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator&(_Ios_Fmtflags, _Ios_Fmtflags)'
   84 |   operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:84:27: note:   no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::_Ios_Fmtflags'
   84 |   operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:134:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator&(_Ios_Openmode, _Ios_Openmode)'
  134 |   operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:134:27: note:   no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::_Ios_Openmode'
  134 |   operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:181:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator&(_Ios_Iostate, _Ios_Iostate)'
  181 |   operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:181:26: note:   no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::_Ios_Iostate'
  181 |   operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~^~~