Language: C++

#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+3;
const int MOD = 1e9+7;
vector<vector<int> > g;
long long n;
long long dp[N][2];

void dfs(int u,int p){
	dp[u][0]=1;
	dp[u][1]=1;
	for(int i=0;i<g[u].size();i++){
		if(g[u][i]==p)
			continue;
		dfs(g[u][i],u);

		dp[u][0] *= (dp[g[u][i]][0]+dp[g[u][i]][1]);
		dp[u][0] %= MOD;

		dp[u][1] *= dp[g[u][i]][0];
		dp[u][1] %= MOD;
	}

}

int main(){
	ios_base::sync_with_stdio(false); 
	cin.tie(0); 
	cout.tie(0);
    
    freopen("tassage.txt","r",stdin);

    cin>>n;
    int a,b;
    g.clear();
    g.resize(n+1);
    for(int i=0;i<n-1;i++){
    	cin>>a>>b; 
    	a--;b--;
    	g[a].push_back(b);
    	g[b].push_back(a);
    }

    dfs(0,-1);
    
    cout<<dp[0][0] + dp[0][1];


	return 0;
    }#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+3;
const int MOD = 1e9+7;
vector<vector<int> > g;
long long n;
long long dp[N][2];

void dfs(int u,int p){
	dp[u][0]=1;
	dp[u][1]=1;
	for(int i=0;i<g[u].size();i++){
		if(g[u][i]==p)
			continue;
		dfs(g[u][i],u);

		dp[u][0] *= (dp[g[u][i]][0]+dp[g[u][i]][1]);
		dp[u][0] %= MOD;

		dp[u][1] *= dp[g[u][i]][0];
		dp[u][1] %= MOD;
	}

}

int main(){
	ios_base::sync_with_stdio(false); 
	cin.tie(0); 
	cout.tie(0);


    cin>>n;
    int a,b;
    g.clear();
    g.resize(n+1);
    for(int i=0;i<n-1;i++){
    	cin>>a>>b; 
    	a--;b--;
    	g[a].push_back(b);
    	g[b].push_back(a);
    }

    dfs(0,-1);
    
    cout<<dp[0][0] + dp[0][1];


	return 0;
    }

Compiler output:
a.cc:50:6: error: stray '#' in program
   50 |     }#include<bits/stdc++.h>
      |      ^
a.cc:50:7: error: 'include' does not name a type
   50 |     }#include<bits/stdc++.h>
      |       ^~~~~~~
a.cc:52:11: error: redefinition of 'const int N'
   52 | const int N = 1e5+3;
      |           ^
a.cc:3:11: note: 'const int N' previously defined here
    3 | const int N = 1e5+3;
      |           ^
a.cc:53:11: error: redefinition of 'const int MOD'
   53 | const int MOD = 1e9+7;
      |           ^~~
a.cc:4:11: note: 'const int MOD' previously defined here
    4 | const int MOD = 1e9+7;
      |           ^~~
a.cc:54:22: error: redefinition of 'std::vector<std::vector<int> > g'
   54 | vector<vector<int> > g;
      |                      ^
a.cc:5:22: note: 'std::vector<std::vector<int> > g' previously declared here
    5 | vector<vector<int> > g;
      |                      ^
a.cc:55:11: error: redefinition of 'long long int n'
   55 | long long n;
      |           ^
a.cc:6:11: note: 'long long int n' previously declared here
    6 | long long n;
      |           ^
a.cc:56:11: error: redefinition of 'long long int dp [100003][2]'
   56 | long long dp[N][2];
      |           ^~
a.cc:7:11: note: 'long long int dp [100003][2]' previously declared here
    7 | long long dp[N][2];
      |           ^~
a.cc:58:6: error: redefinition of 'void dfs(int, int)'
   58 | void dfs(int u,int p){
      |      ^~~
a.cc:9:6: note: 'void dfs(int, int)' previously defined here
    9 | void dfs(int u,int p){
      |      ^~~
a.cc:75:5: error: redefinition of 'int main()'
   75 | int main(){
      |     ^~~~
a.cc:26:5: note: 'int main()' previously defined here
   26 | int main(){
      |     ^~~~