Submission #1191620

#TimeUsernameProblemLanguageResultExecution timeMemory
1191620SmuggingSpunSjekira (COCI20_sjekira)C11
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#define taskname "D"
using namespace std;
typedef long long ll;
int main(){
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	if(fopen(taskname".inp", "r")){
		freopen(taskname".inp", "r", stdin);
	}
	int n;
	cin >> n;
	vector<int>a(n);
	ll ans = 0;
	for(int& x : a){
		cin >> x;
		ans += x;
	}
	for(int _ = 1; _ < n; _++){
		int u, v;
		cin >> u >> v;
		ans += max(a[u - 1], a[v - 1]);
	}
	cout << ans - *max_element(a.begin(), a.end());
}

Compilation message (stderr)

sjekira.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.