Language: C++

#include <stdio.h>  
#include <algorithm>  
#include <assert.h>
#include <bitset>
#include <cmath>  
#include <complex>  
#include <deque>  
#include <functional>  
#include <iostream>  
#include <limits.h>  
#include <map>  
#include <math.h>  
#include <queue>  
#include <set>  
#include <stdlib.h>  
#include <string.h>  
#include <string>  
#include <time.h>  
#include <unordered_map>  
#include <unordered_set>  
#include <vector>
 
#pragma warning(disable:4996)  
#pragma comment(linker, "/STACK:336777216")  
using namespace std;
 
#define pb(x) push_back(x)  
#define rep(i,n) for(int i=0;i<n;i++)  
#define all(x) (x).begin(), (x).end()  
#define len(p) (sizeof(p)/sizeof(*p))
#define debug(x) cerr << #x << ": " << x << '\n'; 
// #define int long long
 
typedef tuple<int, int, int> t3;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <db, db> pdd;
template <class T> void print(T x){ cout << x << '\n'; }
template <class T> void print(T *x, size_t l){ rep(i,l){cout << *(x+i) << ' ';} cout << '\n'; }
template<typename T1, typename T3> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {return s << "(" << p.first << ", " << p.second << ")";}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& v) { int len = v.size(); for (int i = 0; i < len; ++i) { s << v[i]; if (i < len - 1) s << " "; } return s; }
 
signed main(void){
    int n, m;
    cin >> n >> m;
    double t = 0, lastT = -1;
    double p = 1, q = 1 / pow(2, m);
    int oneT = (100*(n-m) + 1900*m);
    int times = 1;
    while(t - lastT > 0.0001){
        lastT = t;
        // print(lastT);
        // print(oneT * p * q);
        t += times++ * oneT * p * q;
        p *= (1-q);
    }
    print(t);
      
}



Compiler output:
a.cc:45:83: error: 'T2' was not declared in this scope; did you mean 'T3'?
   45 | template<typename T1, typename T3> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {return s << "(" << p.first << ", " << p.second << ")";}
      |                                                                                   ^~
      |                                                                                   T3
a.cc:45:85: error: template argument 2 is invalid
   45 | template<typename T1, typename T3> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {return s << "(" << p.first << ", " << p.second << ")";}
      |                                                                                     ^
a.cc: In function 'std::ostream& operator<<(std::ostream&, const int&)':
a.cc:45:113: error: request for member 'first' in 'p', which is of non-class type 'const int'
   45 | template<typename T1, typename T3> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {return s << "(" << p.first << ", " << p.second << ")";}
      |                                                                                                                 ^~~~~
a.cc:45:132: error: request for member 'second' in 'p', which is of non-class type 'const int'
   45 | template<typename T1, typename T3> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {return s << "(" << p.first << ", " << p.second << ")";}
      |                                                                                                                                    ^~~~~~