56062023-08-03 00:33:45lazingergoBájital (80 pont)cpp17Wrong answer 0/80301ms43684 KiB
#include <iostream>
#include <fstream>
#include <algorithm>
#include <climits>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <vector>
#include <string>
#include <stack>
#include <queue>

#define ll long long
#define ull unsigned long lon
#define vi vector<int>

using namespace std;


void solve()
{
    int n;
    cin>>n;
    int* x=new int[n];
    
    for(int i=0; i<n ;i++)
    {
        cin>>x[i];
    }
    int nr=0;
    for(int i=0; i<n; i++)
    {
        if(x[i]==i)
        {
            nr++;
        }
    }
    
    if(nr%2==0)
    {
        cout<<"E: "<<nr/2<<endl;
    }
    else
    {
        cout<<"E: "<<nr/2+1<<endl;
    }

}


int main()
{
    int t;
    cin>>t;

    while(t--)
    {
        solve();
    }
}
SubtaskSumTestVerdictTimeMemory
base0/80
1Wrong answer0/03ms1872 KiB
2Wrong answer0/021ms4600 KiB
3Time limit exceeded0/2254ms2592 KiB
4Time limit exceeded0/2270ms2764 KiB
5Time limit exceeded0/2248ms2432 KiB
6Time limit exceeded0/2270ms3140 KiB
7Time limit exceeded0/4266ms2612 KiB
8Time limit exceeded0/4273ms3888 KiB
9Time limit exceeded0/2273ms4364 KiB
10Time limit exceeded0/2248ms4692 KiB
11Time limit exceeded0/2277ms5360 KiB
12Time limit exceeded0/2261ms6416 KiB
13Time limit exceeded0/2270ms7004 KiB
14Time limit exceeded0/2264ms8008 KiB
15Time limit exceeded0/2261ms8984 KiB
16Time limit exceeded0/2256ms9832 KiB
17Time limit exceeded0/2261ms10352 KiB
18Time limit exceeded0/2273ms11604 KiB
19Time limit exceeded0/2214ms11776 KiB
20Time limit exceeded0/2264ms12556 KiB
21Time limit exceeded0/2268ms13220 KiB
22Time limit exceeded0/2256ms14032 KiB
23Wrong answer0/43ms13976 KiB
24Wrong answer0/43ms14104 KiB
25Wrong answer0/42ms14204 KiB
26Time limit exceeded0/4301ms43684 KiB
27Time limit exceeded0/4273ms14956 KiB
28Time limit exceeded0/4266ms15780 KiB
29Time limit exceeded0/4248ms16440 KiB
30Time limit exceeded0/2254ms16960 KiB
31Time limit exceeded0/2270ms17696 KiB
32Time limit exceeded0/2273ms18480 KiB
33Time limit exceeded0/2252ms19056 KiB