71302023-12-31 12:04:47KristófHús sütés (75 pont)cpp17Wrong answer 0/7543ms4760 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==0){
        cout<<nagy;
    }
    else{
        cout<<ans;
    }


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/03ms1872 KiB
2Wrong answer0/03ms2064 KiB
3Wrong answer0/020ms2728 KiB
4Wrong answer0/33ms2592 KiB
5Wrong answer0/33ms2668 KiB
6Wrong answer0/33ms2704 KiB
7Wrong answer0/33ms2920 KiB
8Wrong answer0/43ms3160 KiB
9Wrong answer0/43ms3364 KiB
10Wrong answer0/43ms3492 KiB
11Wrong answer0/43ms3420 KiB
12Wrong answer0/43ms3552 KiB
13Wrong answer0/439ms4440 KiB
14Wrong answer0/439ms4460 KiB
15Wrong answer0/539ms4564 KiB
16Wrong answer0/539ms4620 KiB
17Wrong answer0/539ms4620 KiB
18Wrong answer0/439ms4624 KiB
19Wrong answer0/439ms4620 KiB
20Wrong answer0/443ms4616 KiB
21Wrong answer0/427ms4760 KiB
22Wrong answer0/235ms4704 KiB
23Wrong answer0/219ms4692 KiB