Language: C++

#include<bits/stdc++.h>
using maespace std;
#define limit 100002
struct edge{
	int to;
  	int cost;4
}
void dfs(int v,int p,ll dist)
{
  depth[v]=dist;
  
  for(auto x:arr[v])
  {
    	if(x.to==p)
        {
         	continue; 
        }
    	else
        {
         	dfs(x.to,v,dist+x.cost); 
        }
  }
  
}
int main()
{
 	 
  vector<edge> arr[limit];
  ll depth[limit];
  int n;
  cin>>n;
  
  for(int i=0;i<n-1;i++)
  {
    
    int a,bc;
    cin>>a>>b>>c;
    a--;b--;
    
    arr[a].push_back({b,c});
    arr[b].push_back({a,c});
    
  }
  int q,k;
  cin>>q>>k;
  dfs(k,-1,0);
  for(int i=0;i<q;i++)
  {
    
    int x,y;
    x--,y--;
    
    cout<<depth[x]+depth[y]<<endl;
    
  }
  
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'maespace'
    2 | using maespace std;
      |       ^~~~~~~~
a.cc:6:18: error: expected unqualified-id before numeric constant
    6 |         int cost;4
      |                  ^
a.cc:7:2: error: expected ';' after struct definition
    7 | }
      |  ^
      |  ;
a.cc:8:22: error: 'll' has not been declared
    8 | void dfs(int v,int p,ll dist)
      |                      ^~
a.cc: In function 'void dfs(int, int, int)':
a.cc:10:3: error: 'depth' was not declared in this scope
   10 |   depth[v]=dist;
      |   ^~~~~
a.cc:12:14: error: 'arr' was not declared in this scope
   12 |   for(auto x:arr[v])
      |              ^~~
a.cc: In function 'int main()':
a.cc:28:3: error: 'vector' was not declared in this scope
   28 |   vector<edge> arr[limit];
      |   ^~~~~~
a.cc:28:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:28:14: error: expected primary-expression before '>' token
   28 |   vector<edge> arr[limit];
      |              ^
a.cc:28:16: error: 'arr' was not declared in this scope
   28 |   vector<edge> arr[limit];
      |                ^~~
a.cc:29:3: error: 'll' was not declared in this scope
   29 |   ll depth[limit];
      |   ^~
a.cc:31:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   31 |   cin>>n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:37:13: error: 'b' was not declared in this scope; did you mean 'bc'?
   37 |     cin>>a>>b>>c;
      |             ^
      |             bc
a.cc:37:16: error: 'c' was not declared in this scope; did you mean 'bc'?
   37 |     cin>>a>>b>>c;
      |                ^
      |                bc
a.cc:53:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   53 |     cout<<depth[x]+depth[y]<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:53:11: error: 'depth' was not declared in this scope
   53 |     cout<<depth[x]+depth[y]<<endl;
      |           ^~~~~
a.cc:53:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   53 |     cout<<depth[x]+depth[y]<<endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~