Language: C++

var
  flag:boolean;
  da,sl:int64;
  hs:array[1..2] of int64;
  x,y,n,u,m,i:longint;
  hd,nx,t,ys:array[0..200100] of longint;
  procedure jb(x,y:longint);
    begin
      u:=u+1;
      nx[u]:=hd[x];
      hd[x]:=u;
      t[u]:=y;
    end;
  function ss(q,sc:longint):boolean;
    var
      i:longint;
      cg:boolean;
    begin writeln(' ',q,' ',sc);
      ys[q]:=sc;
      sl:=sl+1;
      hs[sc]:=hs[sc]+1;
      cg:=true;
      i:=hd[q];
      while i<>0 do
        begin
          //if (ys[t[i]]=0)and(ss(t[i],3-sc)=false) then cg:=false;
          if ys[t[i]]=0 then cg:=ss(t[i],3-sc) and cg;
          if ys[t[i]]=sc then
            begin
              cg:=false;
              flag:=false;
            end;writeln(q,' ',t[i],' ',cg);
          i:=nx[i];
        end;writeln(q,' ',cg);
      exit(cg);
    end;
begin
  readln(n,m);
  for i:=1 to m do
    begin
      readln(x,y);
      jb(x,y);
      jb(y,x);
    end;
  for i:=1 to n do
    if ys[i]=0 then
      begin
        hs[1]:=0;
        hs[2]:=0;
        sl:=0;
        flag:=true;
        if ss(i,1)<>flag then writeln('?');
        if flag then da:=da+hs[1]*hs[2]
        else da:=da+sl*(sl-1) div 2;
      end;
  writeln(da-m);
end.

Compiler output:
a.cc:4:12: error: too many decimal points in number
    4 |   hs:array[1..2] of int64;
      |            ^~~~
a.cc:6:20: error: too many decimal points in number
    6 |   hd,nx,t,ys:array[0..200100] of longint;
      |                    ^~~~~~~~~
a.cc:1:1: error: 'var' does not name a type
    1 | var
      | ^~~
a.cc:3:3: error: 'da' does not name a type
    3 |   da,sl:int64;
      |   ^~
a.cc:4:5: error: found ':' in nested-name-specifier, expected '::'
    4 |   hs:array[1..2] of int64;
      |     ^
      |     ::
a.cc:4:3: error: 'hs' does not name a type
    4 |   hs:array[1..2] of int64;
      |   ^~
a.cc:5:3: error: 'x' does not name a type
    5 |   x,y,n,u,m,i:longint;
      |   ^
a.cc:6:3: error: 'hd' does not name a type
    6 |   hd,nx,t,ys:array[0..200100] of longint;
      |   ^~
a.cc:7:3: error: 'procedure' does not name a type
    7 |   procedure jb(x,y:longint);
      |   ^~~~~~~~~
a.cc:8:5: error: 'begin' does not name a type
    8 |     begin
      |     ^~~~~
a.cc:10:7: error: 'nx' does not name a type
   10 |       nx[u]:=hd[x];
      |       ^~
a.cc:11:7: error: 'hd' does not name a type
   11 |       hd[x]:=u;
      |       ^~
a.cc:12:7: error: 't' does not name a type
   12 |       t[u]:=y;
      |       ^
a.cc:13:5: error: 'end' does not name a type
   13 |     end;
      |     ^~~
a.cc:14:3: error: 'function' does not name a type; did you mean 'union'?
   14 |   function ss(q,sc:longint):boolean;
      |   ^~~~~~~~
      |   union
a.cc:15:5: error: 'var' does not name a type
   15 |     var
      |     ^~~
a.cc:17:9: error: found ':' in nested-name-specifier, expected '::'
   17 |       cg:boolean;
      |         ^
      |         ::
a.cc:17:7: error: 'cg' does not name a type
   17 |       cg:boolean;
      |       ^~
a.cc:18:5: error: 'begin' does not name a type
   18 |     begin writeln(' ',q,' ',sc);
      |     ^~~~~
a.cc:19:7: error: 'ys' does not name a type
   19 |       ys[q]:=sc;
      |       ^~
a.cc:20:7: error: 'sl' does not name a type
   20 |       sl:=sl+1;
      |       ^~
a.cc:21:7: error: 'hs' does not name a type
   21 |       hs[sc]:=hs[sc]+1;
      |       ^~
a.cc:22:7: error: 'cg' does not name a type
   22 |       cg:=true;
      |       ^~
a.cc:23:7: error: 'i' does not name a type
   23 |       i:=hd[q];
      |       ^
a.cc:24:7: error: expected unqualified-id before 'while'
   24 |       while i<>0 do
      |       ^~~~~
a.cc:28:11: error: expected unqualified-id before 'if'
   28 |           if ys[t[i]]=sc then
      |           ^~
a.cc:31:15: error: 'flag' does not name a type
   31 |               flag:=false;
      |               ^~~~
a.cc:32:13: error: 'end' does not name a type
   32 |             end;writeln(q,' ',t[i],' ',cg);
      |             ^~~
a.cc:32:24: error: expected constructor, destructor, or type conversion before '(' token
   32 |             end;writeln(q,' ',t[i],' ',cg);
      |                        ^
a.cc:33:11: error: 'i' does not name a type
   33 |           i:=nx[i];
      |           ^
a.cc:34:9: error: 'end' does not name a type
   34 |         end;writeln(q,' ',cg);
      |         ^~~
a.cc:34:20: error: expected constructor, destructor, or type conversion before '(' token
   34 |         end;writeln(q,' ',cg);
      |                    ^
a.cc:35:11: error: expected constructor, destructor, or type conversion before '(' token
   35 |       exit(cg);
      |           ^
a.cc:36:5: error: 'end' does not name a type
   36 |     end;
      |     ^~~
a.cc:37:1: error: 'begin' does not name a type
   37 | begin
      | ^~~~~
a.cc:39:3: error: expected unqualified-id before 'for'
   39 |   for i:=1 to m do
      |   ^~~
a.cc:42:9: error: expected constructor, destructor, or type conversion before '(' token
   42 |       jb(x,y);
      |         ^
a.cc:43:9: error: expected constructor, destructor, or type conversion before '(' token
   43 |       jb(y,x);
      |         ^
a.cc:44:5: error: 'end' does not name a type
   44 |     end;
      |     ^~~
a.cc:45:3: error: expected unqualified-id before 'for'
   45 |   for i:=1 to n do
      |   ^~~
a.cc:49:9: error: 'hs' does not name a type
   49 |         hs[2]:=0;
      |         ^~
a.cc:50:9: error: 'sl' does not name a type
   50 |         sl:=0;
      |         ^~
a.cc:51:9: error: 'flag' does not name a type
   51 |         flag:=true;
      |         ^~~~
a.cc:52:9: error: expected unqualified-id before 'if'
   52 |         if ss(i,1)<>flag then writeln('?');
      |         ^~
a.cc:53:9: error: expected unqualified-id before 'if'
   53 |         if flag then da:=da+hs[1]*hs[2]
      |         ^~
a.cc:55:7: error: 'end' does not name a type
   55 |       end;
      |       ^~~
a.cc:56:10: error: expected constructor, destructor, or type conversion before '(' token
   56 |   writeln(da-m);
      |          ^
a.cc:57:1: error: 'end' does not name a type
   57 | end.
      | ^~~