Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
#define INF 100000000

int map[100][100];
int n,k,count,tmin=100;
int dd[101],col[100];

int main(){
  int t,a,b,c,d,e;
  cin >> n >> k;
  while(n!=0&&k!=0){
    for (int i=0;i<10000;i++)map[i/100][i%100]=0;
    for (int i=0;i<k;i++){
      cin >> t;
      //      for (int y=0;y<k;y++){
      //for (int x=0;x<k;x++)
      //  cout << map[y][x] << " ";
      //cout << endl;
      //}
      if (t == 0){
	cin >> a >> b;
	for (int j=0;j<101;j++)dd[j]=INF;
	for (int j=0;j<101;j++)col[j]=0;
	dd[a-1]=0;
	count = 1;
	col[a-1]=1;
	for (int m=0;m<n;m++)
	  if(map[a-1][m]>0)
	    dd[m]=min(dd[m],dd[a-1]+map[a-1][m]);

	while (count < n){
	  for (int m=0;m<n;m++) 
	    if (col[m]==0)
	      if (dd[tmin]>dd[m]) tmin = m;

	  // for (int m=0;m<n;m++)cout << dd[m] << " ";//Dbg
	  // cout << endl;//Dbg

	  col[tmin]=1;
	  count ++;

	  for (int m=0;m<n;m++)
	    if(map[tmin][m]>0)
	      dd[m]=min(dd[m],dd[tmin]+map[tmin][m]);
	  tmin=100;
	}
	if (dd[b-1]==INF)cout << -1 << endl;
	else cout << dd[b-1] <<endl;
      }else{
	cin >> c >> d >> e;
	c--;d--;
	if (map[c][d]==0){
	  map[c][d]=e;
	  map[d][c]=e;
	}
	map[c][d]=min(map[c][d],e);
	map[d][c]=min(map[d][c],e);
      }
    }
    cin >> n >> k;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: reference to 'count' is ambiguous
   27 |         count = 1;
      |         ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:7:9: note:                 'int count'
    7 | int n,k,count,tmin=100;
      |         ^~~~~
a.cc:33:16: error: reference to 'count' is ambiguous
   33 |         while (count < n){
      |                ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:7:9: note:                 'int count'
    7 | int n,k,count,tmin=100;
      |         ^~~~~
a.cc:42:11: error: reference to 'count' is ambiguous
   42 |           count ++;
      |           ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:7:9: note:                 'int count'
    7 | int n,k,count,tmin=100;
      |         ^~~~~