Language: C++

#include <iostream> // cin, cout, cerr
#include <algorithm> // minmax, sort, swap
#include <numeric> // iota
#include <cstdio> // printf, scanf
#include <string> // string, stoi, to_string
#include <vector> // vector
#include <queue> // queue, priority_queue
#include <deque> // deque
#include <map> // key-value pairs sorted by keys
#include <set> // set
#include <iomanip> // cout<<setprecision(n)
#include <functional> // function<void(int)>

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ENDL '\n'
#define print(i) std::cout << (i) << '\n'

#define int long long // at least int64 > 9*10^18
#define all(v) (v).begin(), (v).end()
/* libraries */

signed main() {
	int n,m;
	std::cin >> n >> m;
	std::vector<std::vector<int> > g(n,std::vector<int>());
	std::vector<std::vector<int> > t(n,std::vector<int>());
	rep(i,m) {
		int a,b;
		std::cin >> a >> b;
		a--;b--;
		t[a].emplace_back(b);
		g[b].emplace_back(a);
	}

	std::vector<double> dp(n,0);
	std::vector<int> went(n,false);
	std::priority_queue<int> que;
	que.emplace(n-1);
	while(!que.empty()) {
		auto x = que.top();que.pop();
		for( auto i:g[x] ) {
			if(!went[i]) que.emplace(i);
			dp[i]+=(dp[x]+(double)1)/(double)t[i].size();
			went[i] = true;
		}
	}
	int min = dp[0];
	rep(j,n) {
		if(t[j].sjze()<=1) continue;
		int max = 0;
		int maxi = -1;
		for(int to:t[j]) {
			if(dp[to]>max) {
				max = dp[to];
				maxi = to;
			}
		}
		std::vector<double> dp2(n,0);
		std::vector<int> went2(n,false);
		std::priority_queue<int> que2;
		que2.emplace(n-1);
		while(!que2.empty()) {
			auto x = que2.top();que2.pop();
			for( auto i:g[x] ) {
				if(x==maxi && i==j) continue;
				if(!went2[i]) que2.emplace(i);
				dp2[i]+=(dp2[x]+(double)1)/(double)t[i].size();
				went2[i] = true;
			}
		}
		min = std::min(min,dp2[0]);
	}
	print(min);
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:49:25: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<long long int> >, std::vector<long long int> >::value_type' {aka 'class std::vector<long long int>'} has no member named 'sjze'; did you mean 'size'?
   49 |                 if(t[j].sjze()<=1) continue;
      |                         ^~~~
      |                         size
a.cc:71:31: error: no matching function for call to 'min(long long int&, __gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type&)'
   71 |                 min = std::min(min,dp2[0]);
      |                       ~~~~~~~~^~~~~~~~~~~~
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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:71:31: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'})
   71 |                 min = std::min(min,dp2[0]);
      |                       ~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:71:31: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   71 |                 min = std::min(min,dp2[0]);
      |                       ~~~~~~~~^~~~~~~~~~~~