71322023-12-31 12:05:47KristófHús sütés (75 pont)cpp17Wrong answer 0/7543ms4396 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int volgy[n];
    for(int i=0;i<n;i++){
        cin>>volgy[i];
    }

    int nagy=0;
    int nagysz=0;
    int kicsi=10000000;
    int ered=0;

    for(int i=0;i<n;i++){
        if(nagy<volgy[i]){
            nagy=volgy[i];
        }
    }
    for(int i=0;i<n;i++){
        if(volgy[i]<kicsi){
            kicsi=volgy[i];
           
        }
         if(volgy[i]==nagy){
                nagysz++;

            }
    }
    cout<<nagysz<<" "<<nagy<<endl;
    int ans=kicsi+n-1;

    if(nagysz==1){
        cout<<nagy;
    }
    else{
        cout<<ans;
    }


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/03ms1872 KiB
2Wrong answer0/03ms2080 KiB
3Wrong answer0/020ms2776 KiB
4Wrong answer0/33ms2376 KiB
5Wrong answer0/33ms2496 KiB
6Wrong answer0/33ms2512 KiB
7Wrong answer0/33ms2720 KiB
8Wrong answer0/43ms2832 KiB
9Wrong answer0/43ms2972 KiB
10Wrong answer0/43ms3172 KiB
11Wrong answer0/43ms3032 KiB
12Wrong answer0/43ms3152 KiB
13Wrong answer0/439ms3928 KiB
14Wrong answer0/439ms4044 KiB
15Wrong answer0/539ms4260 KiB
16Wrong answer0/539ms4332 KiB
17Wrong answer0/539ms4292 KiB
18Wrong answer0/439ms4396 KiB
19Wrong answer0/439ms4180 KiB
20Wrong answer0/443ms4180 KiB
21Wrong answer0/427ms4200 KiB
22Wrong answer0/235ms4336 KiB
23Wrong answer0/219ms4340 KiB