func_code_string: #include <bits/stdc++.h>   using namespace std;   double ans = 0.0000;   void bfs();   list<int> arr[100005];   int visited[100005], dep[100005];   int main() {     int n, i, start, end;     cin >> n;     n--;     while (n--) {       cin >> start;       cin >> end;       arr[start].push_back(end);       arr[end].push_back(start);     }     bfs();     cout.precision(7);     cout << fixed << ans;     return 0;   }   void bfs() {     int node;     dep[1] = 1;     queue<int> qu;     list<int>::iterator iter = arr[1].begin();     node = 1;     visited[1] = 1;     qu.push(1);     while (!qu.empty()) {       for (iter = arr[node].begin(); iter != arr[node].end(); ++iter) {         if (!visited[*iter]) {           qu.push(*iter);           visited[*iter] = 1;           dep[*iter] = dep[node] + 1;         }       }       int k = qu.front();       qu.pop();       node = qu.front();       ans += 1 / (double)dep[k];     }   }   