提交时间:2024-12-14 10:57:52
运行 ID: 2102
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a[n]; int max = 0; int temp = 0; for(int i = 0;i < n;i++) { cin>>a[i]; temp += a[i]; if(max < a[i]) { max = a[i]; } } if(temp <= 100) { cout<<"No"<<endl<<temp; } else { cout<<"Yes"<<endl<<temp - max; } return 0; }