Language: C++

#include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<climits>
#include<cfloat>
#include <quadmath.h> 

using namespace std;

typedef long double __float128;

ld EPS = 1e-20;


ld add(ld a, ld b){
  if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0;
  return a+b;
}

struct point{
  ld x,y,z;
  point(){}
  point(ld x,ld y,ld z) : x(x) , y(y), z(z){}

  point operator + (point p){
    return point(add(x,p.x), add(y,p.y),add(z,p.z));
  }

  point operator - (point p){
    return point(add(x,-p.x), add(y,-p.y),add(z,-p.z));
  }
};


ld dist(point a,point b){
  return sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2)+pow(a.z-b.z,2));
}

ld tetrahedra_volume(ld a,ld b,ld c,ld x,ld y,ld z){
#define sqr(x) ((x)*(x))
   ld tv=sqr(a*x)*(sqr(b)+sqr(c)-sqr(a)+sqr(y)+sqr(z)-sqr(x))
      +sqr(b*y)*(sqr(c)+sqr(a)-sqr(b)+sqr(z)+sqr(x)-sqr(y))
      +sqr(c*z)*(sqr(a)+sqr(b)-sqr(c)+sqr(x)+sqr(y)-sqr(z))
      -sqr(a*y*z)-sqr(b*z*x)-sqr(c*x*y)-sqr(a*b*c);

   ld V=sqrt(tv/144.0);
   if(V!=V)return -1;
   return sqrt(tv/144.0);
#undef sqr
}

ld tetrahedra_volume(point A,point B,point C,point D){
  ld a=dist(B,C),b=dist(C,A),c=dist(A,B);
  ld d=dist(D,A),e=dist(D,B),f=dist(D,C);
  ld V=tetrahedra_volume(a,b,c,d,e,f);
  if(V<0)return -1;
  return V;
}

int main(void){

  point P,Q,A,B,C;
  cin >> P.x >> P.y >> P.z;
  cin >> Q.x >> Q.y >> Q.z;
  cin >> A.x >> A.y >> A.z;
  cin >> B.x >> B.y >> B.z;
  cin >> C.x >> C.y >> C.z;

  ld res1=tetrahedra_volume(A,C,P,Q);
  ld res2=tetrahedra_volume(B,C,P,Q);
  ld res3=tetrahedra_volume(A,B,P,Q);
  if(res1==-1 || res2==-1 || res3==-1){
    cout << "MISS" << endl;
    return 0;
  }

  ld res4=tetrahedra_volume(A,B,C,P);
  ld res5=tetrahedra_volume(A,B,C,Q);

  if(res5==-1)cout << "MISS" << endl;
  else if(abs((res1+res2+res3)-(res4+res5))<EPS)cout << "MISS" << endl;
  else cout << "HIT" << endl;

  return 0;
}

Compiler output:
a.cc:11:21: error: conflicting declaration 'typedef long double __float128'
   11 | typedef long double __float128;
      |                     ^~~~~~~~~~
cc1plus: note: previous declaration as '__float128'
a.cc:13:1: error: 'ld' does not name a type
   13 | ld EPS = 1e-20;
      | ^~
a.cc:16:1: error: 'ld' does not name a type
   16 | ld add(ld a, ld b){
      | ^~
a.cc:22:3: error: 'ld' does not name a type
   22 |   ld x,y,z;
      |   ^~
a.cc:24:11: error: expected ')' before 'x'
   24 |   point(ld x,ld y,ld z) : x(x) , y(y), z(z){}
      |        ~  ^~
      |           )
a.cc: In member function 'point point::operator+(point)':
a.cc:27:22: error: 'x' was not declared in this scope
   27 |     return point(add(x,p.x), add(y,p.y),add(z,p.z));
      |                      ^
a.cc:27:26: error: 'struct point' has no member named 'x'
   27 |     return point(add(x,p.x), add(y,p.y),add(z,p.z));
      |                          ^
a.cc:27:18: error: 'add' was not declared in this scope; did you mean 'fadd'?
   27 |     return point(add(x,p.x), add(y,p.y),add(z,p.z));
      |                  ^~~
      |                  fadd
a.cc:27:34: error: 'y' was not declared in this scope; did you mean 'yn'?
   27 |     return point(add(x,p.x), add(y,p.y),add(z,p.z));
      |                                  ^
      |                                  yn
a.cc:27:38: error: 'struct point' has no member named 'y'
   27 |     return point(add(x,p.x), add(y,p.y),add(z,p.z));
      |                                      ^
a.cc:27:45: error: 'z' was not declared in this scope
   27 |     return point(add(x,p.x), add(y,p.y),add(z,p.z));
      |                                             ^
a.cc:27:49: error: 'struct point' has no member named 'z'
   27 |     return point(add(x,p.x), add(y,p.y),add(z,p.z));
      |                                                 ^
a.cc: In member function 'point point::operator-(point)':
a.cc:31:22: error: 'x' was not declared in this scope
   31 |     return point(add(x,-p.x), add(y,-p.y),add(z,-p.z));
      |                      ^
a.cc:31:27: error: 'struct point' has no member named 'x'
   31 |     return point(add(x,-p.x), add(y,-p.y),add(z,-p.z));
      |                           ^
a.cc:31:18: error: 'add' was not declared in this scope; did you mean 'fadd'?
   31 |     return point(add(x,-p.x), add(y,-p.y),add(z,-p.z));
      |                  ^~~
      |                  fadd
a.cc:31:35: error: 'y' was not declared in this scope; did you mean 'yn'?
   31 |     return point(add(x,-p.x), add(y,-p.y),add(z,-p.z));
      |                                   ^
      |                                   yn
a.cc:31:40: error: 'struct point' has no member named 'y'
   31 |     return point(add(x,-p.x), add(y,-p.y),add(z,-p.z));
      |                                        ^
a.cc:31:47: error: 'z' was not declared in this scope
   31 |     return point(add(x,-p.x), add(y,-p.y),add(z,-p.z));
      |                                               ^
a.cc:31:52: error: 'struct point' has no member named 'z'
   31 |     return point(add(x,-p.x), add(y,-p.y),add(z,-p.z));
      |                                                    ^
a.cc: At global scope:
a.cc:36:1: error: 'ld' does not name a type
   36 | ld dist(point a,point b){
      | ^~
a.cc:40:1: error: 'ld' does not name a type
   40 | ld tetrahedra_volume(ld a,ld b,ld c,ld x,ld y,ld z){
      | ^~
a.cc:53:1: error: 'ld' does not name a type
   53 | ld tetrahedra_volume(point A,point B,point C,point D){
      | ^~
a.cc: In function 'int main()':
a.cc:64:12: error: 'struct point' has no member named 'x'
   64 |   cin >> P.x >> P.y >> P.z;
      |            ^
a.cc:64:19: error: 'struct point' has no member named 'y'
   64 |   cin >> P.x >> P.y >> P.z;
      |                   ^
a.cc:64:26: error: 'struct point' has no member named 'z'
   64 |   cin >> P.x >> P.y >> P.z;
      |                          ^
a.cc:65:12: error: 'struct point' has no member named 'x'
   65 |   cin >> Q.x >> Q.y >> Q.z;
      |            ^
a.cc:65:19: error: 'struct point' has no member named 'y'
   65 |   cin >> Q.x >> Q.y >> Q.z;
      |                   ^
a.cc:65:26: error: 'struct point' has no member named 'z'
   65 |   cin >> Q.x >> Q.y >> Q.z;
      |                          ^
a.cc:66:12: error: 'struct point' has no member named 'x'
   66 |   cin >> A.x >> A.y >> A.z;
      |            ^
a.cc:66:19: error: 'struct point' has no member named 'y'
   66 |   cin >> A.x >> A.y >> A.z;
      |                   ^
a.cc:66:26: error: 'struct point' has no member named 'z'
   66 |   cin >> A.x >> A.y >> A.z;
      |                          ^
a.cc:67:12: error: 'struct point' has no member named 'x'
   67 |   cin >> B.x >> B.y >> B.z;
      |            ^
a.cc:67:19: error: 'struct point' has no member named 'y'
   67 |   cin >> B.x >> B.y >> B.z;
      |                   ^
a.cc:67:26: error: 'struct point' has no member named 'z'
   67 |   cin >> B.x >> B.y >> B.z;
      |                          ^
a.cc:68:12: error: 'struct point' has no member named 'x'
   68 |   cin >> C.x >> C.y >> C.z;
      |            ^
a.cc:68:19: error: 'struct point' has no member named 'y'
   68 |   cin >> C.x >> C.y >> C.z;
      |                   ^
a.cc:68:26: error: 'struct point' has no member named 'z'
   68 |   cin >> C.x >> C.y >> C.z;
      |                          ^
a.cc:70:3: error: 'ld' was not declared in this scope
   70 |   ld res1=tetrahedra_volume(A,C,P,Q);
      |   ^~
a.cc:71:5: error: expected ';' before 'res2'
   71 |   ld res2=tetrahedra_volume(B,C,P,Q);
      |     ^~~~~
      |     ;
a.cc:72:5: error: expected ';' before 'res3'
   72 |   ld res3=tetrahedra_volume(A,B,P,Q);
      |     ^~~~~
      |     ;
a.cc:73:6: error: 'res1' was not declared in this scope
   73 |   if(res1==-1 || res2==-1 || res3==-1){
      |      ^~~~
a.cc:73:18: error: 'res2' was not declared in this scope
   73 |   if(res1==-1 || res2==-1 || res3==-1){
      |                  ^~~~
a.cc:73:30: error: 'res3' was not declared in this scope
   73 |   if(res1==-1 || res2==-1 || res3==-1){
      |                              ^~~~
a.cc:78:5: error: expected ';' before 'res4'
   78 |   ld res4=tetrahedra_volume(A,B,C,P);
      |     ^~~~~
      |     ;
a.cc:79:5: error: expected ';' before 'res5'
   79 |   ld res5=tetrahedra_volume(A,B,C,Q);
      |     ^~~~~
      |     ;
a.cc:81:6: error: 'res5' was not declared in this scope
   81 |   if(res5==-1)cout << "MISS" << endl;
      |      ^~~~
a.cc:82:16: error: 'res1' was not declared in this scope
   82 |   else if(abs((res1+res2+res3)-(res4+res5))<EPS)cout << "MISS" << endl;
      |                ^~~~
a.cc:82:21: error: 'res2' was not declared in this scope
   82 |   else if(abs((res1+res2+res3)-(res4+res5))<EPS)cout << "MISS" << endl;
      |                     ^~~~
a.cc:82:26: error: 'res3' was not declared in this scope
   82 |   else if(abs((res1+res2+res3)-(res4+res5))<EPS)cout << "MISS" << endl;
      |                          ^~~~
a.cc:82:33: error: 'res4' was not declared in this scope
   82 |   else if(abs((res1+res2+res3)-(res4+res5))<EPS)cout << "MISS" << endl;
      |                                 ^~~~
a.cc:82:45: error: 'EPS' was not declared in this scope
   82 |   else if(abs((res1+res2+res3)-(res4+res5))<EPS)cout << "MISS" << endl;
      |                                             ^~~