239532026-02-02 14:36:53PKAÉrdekes túra (70 pont)cpp17Wrong answer 7/7029ms1268 KiB
#include <iostream>
#include<vector>
using namespace std;

int main()
{
    long long current = 0;
    long long turakszama = 0;
    long long leghosszab =  0;
    long long N;
    cin >> N;
    vector<long long>szamok(N);
    for(long long i = 0; i < N; i++){
        cin >> szamok[i];
    }
    current++;
    for(long long i = 1; i< N; i++){
        if(szamok[i]!= szamok[i-1]){
            current++;
        }else{
            if(current >= 2){
                turakszama++;
            }
            if(current > leghosszab && current != 1){
                leghosszab= current;
            }
            current = 0;
        }
    }
    cout << turakszama<<endl;
    cout <<leghosszab;
}
SubtaskSumTestVerdictTimeMemory
base7/70
1Wrong answer0/01ms316 KiB
2Wrong answer0/025ms1076 KiB
3Wrong answer0/31ms316 KiB
4Partially correct1/31ms316 KiB
5Partially correct1/31ms316 KiB
6Partially correct1/31ms316 KiB
7Partially correct1/31ms316 KiB
8Partially correct1/31ms316 KiB
9Wrong answer0/31ms508 KiB
10Wrong answer0/31ms408 KiB
11Wrong answer0/31ms500 KiB
12Partially correct2/32ms508 KiB
13Wrong answer0/42ms316 KiB
14Wrong answer0/416ms804 KiB
15Wrong answer0/417ms896 KiB
16Wrong answer0/417ms956 KiB
17Wrong answer0/418ms916 KiB
18Wrong answer0/419ms820 KiB
19Wrong answer0/427ms1076 KiB
20Wrong answer0/425ms1076 KiB
21Wrong answer0/429ms1268 KiB
22Wrong answer0/421ms1268 KiB