Submission #689718

# Submission time Handle Problem Language Result Execution time Memory
689718 2023-01-29T07:18:44 Z Warinchai Autići (COCI22_autici) C++17
0 / 50
36 ms 580 KB
#include<bits/stdc++.h>
using namespace std;
int ar[100005];
int mn=INT_MAX;
int main(){
	int n;
	cin>>n;
	long long sum=0;
	for(int i=0;i<n;i++){
		cin>>ar[i];
		if(ar[i]<mn){
			mn=ar[i];
		}
		sum+=ar[i];
	}
	long long x=mn*(n-2)+sum;
	cout<<x;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 14 ms 580 KB Output is correct
3 Incorrect 36 ms 568 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 232 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Incorrect 1 ms 212 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 14 ms 580 KB Output is correct
3 Incorrect 36 ms 568 KB Output isn't correct
4 Halted 0 ms 0 KB -