199502025-12-30 11:53:09ZsoltAranycipők (45)cpp17Részben helyes 27/452ms568 KiB
#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n,x,maxi;
    cin>>n>>maxi;
    vector<int>v;
    for(int i=1; i<n; i++)
    {
        cin>>x;
        if(x>maxi)
        {
           maxi=x;
           v.clear();
           v.push_back(i+1);
        }
        else
        {
            if(x==maxi)
            {
                v.push_back(i+1);
            }
        }
    }
    cout<<maxi<<"\n"<<v.size()<<"\n";
    for(int i:v)
    {
        cout<<i<<"\n";
    }
    return 0;
}
RészfeladatÖsszpontTesztVerdiktIdőMemória
base27/45
1Elfogadva0/01ms508 KiB
2Elfogadva0/02ms316 KiB
3Részben helyes1/31ms316 KiB
4Részben helyes1/31ms568 KiB
5Elfogadva3/31ms316 KiB
6Részben helyes1/31ms316 KiB
7Elfogadva3/31ms316 KiB
8Részben helyes1/31ms316 KiB
9Elfogadva3/31ms556 KiB
10Részben helyes1/32ms316 KiB
11Elfogadva3/31ms316 KiB
12Elfogadva3/31ms508 KiB
13Részben helyes1/31ms316 KiB
14Részben helyes1/31ms388 KiB
15Részben helyes1/31ms348 KiB
16Elfogadva3/32ms316 KiB
17Részben helyes1/31ms316 KiB