Language: C++

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cassert>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
typedef long long ll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000001
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
int main()
{
    int n,h;
    cin >> n >> h;
    char x[105][25];
    int t[105];
    int len[105];
    for(int i=0;i<n;i++)
    {
        scanf("%s%d",x[i],&t[i]);
        len[i] = strlen(x[i]);
    }
    int ok=0,sum=0;
    for(int i=0;i<n;i++)
    {
        int nx = 0,miss = 0;
        while(1)
        {
            printf("? %s\n", x[i]);
            fflush(stdout);
            char c[2];
            scanf("%s", c);
            int q,w;
            if(x[i][nx] >= 'a' && x[i][nx] <= 'z') q = x[i][nx]-'a';
            else q = x[i][nx]-'A';
            if(c[0] >= 'a' && c[0] <= 'z') w = c[0]-'a';
            else w = c[0]-'A';
            sum++;
            if(q == w)
            {
                x[i][nx] = '_'; nx++; ok++;
                if(nx == len[i]) break;
            }
            else
            {
                miss++;
                if(miss > t[i])
                {
                    h--;
                    if(h == 0)
                    {
                        printf("! Game Over\n"); fflush(stdout); return 0;
                    }
                    break;
                }
            }
        }
    }
    double x = (double)ok/(double)sum*1000;
    int s = floor(x);
    printf("! Game Clear %.1lf\n", (double)s/10.0); fflush(stdout); return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:77:12: error: conflicting declaration 'double x'
   77 |     double x = (double)ok/(double)sum*1000;
      |            ^
a.cc:33:10: note: previous declaration as 'char x [105][25]'
   33 |     char x[105][25];
      |          ^
a.cc:78:18: error: no matching function for call to 'floor(char [105][25])'
   78 |     int s = floor(x);
      |             ~~~~~^~~
In file included from a.cc:4:
/usr/include/c++/14/cmath:269:5: note: candidate: 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::floor(_Tp)'
  269 |     floor(_Tp __x)
      |     ^~~~~
/usr/include/c++/14/cmath:269:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/cmath: In substitution of 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::floor(_Tp) [with _Tp = char (*)[25]]':
a.cc:78:18:   required from here
   78 |     int s = floor(x);
      |             ~~~~~^~~
/usr/include/c++/14/cmath:269:5: error: no type named '__type' in 'struct __gnu_cxx::__enable_if<false, double>'
  269 |     floor(_Tp __x)
      |     ^~~~~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cstdio:41,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:198:1: note: candidate: 'double floor(double)'
  198 | __MATHCALLX (floor,, (_Mdouble_ __x), (__const__));
      | ^~~~~~~~~~~
In file included from /usr/include/math.h:275,
                 from /usr/include/c++/14/cmath:47:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:198:1: note:   no known conversion for argument 1 from 'char [105][25]' to 'double'
  198 | __MATHCALLX (floor,, (_Mdouble_ __x), (__const__));
      | ^
/usr/include/c++/14/cmath:261:3: note: candidate: 'constexpr long double std::floor(long double)'
  261 |   floor(long double __x)
      |   ^~~~~
/usr/include/c++/14/cmath:261:21: note:   no known conversion for argument 1 from 'char [105][25]' to 'long double'
  261 |   floor(long double __x)
      |         ~~~~~~~~~~~~^~~
/usr/include/c++/14/cmath:257:3: note: candidate: 'constexpr float std::floor(float)'
  257 |   floor(float __x)
      |   ^~~~~
/usr/include/c++/14/cmath:257:15: note:   no known conversion for argument 1 from 'char [105][25]' to 'float'
  257 |   floor(float __x)
      |         ~~~~~~^~~