125222024-12-21 14:56:24PappMatyasDNS szakaszok száma (75 pont)cpp17Wrong answer 32/754ms572 KiB
#include <iostream>

using namespace std;

int main()
{
    int n, an = 0, ae, ans = 0;
    cin >> n;
    char c[100000];
    cin >> c;
    for(int i = 0; i < n; i++)
    {
        if(c[i] == 'A')
        {
            an++;
        }
        else if(c[i] == 'G')
        {
            ae = an;
        }
        else if(c[i] == 'T')
        {
            ans+=ae;
        }
    }
    cout << ans;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base32/75
1Accepted0/01ms508 KiB
2Accepted0/04ms568 KiB
3Wrong answer0/31ms320 KiB
4Accepted4/41ms320 KiB
5Accepted4/41ms412 KiB
6Accepted4/41ms320 KiB
7Wrong answer0/41ms320 KiB
8Wrong answer0/31ms320 KiB
9Wrong answer0/31ms320 KiB
10Accepted4/41ms320 KiB
11Wrong answer0/41ms320 KiB
12Accepted4/41ms320 KiB
13Accepted4/41ms332 KiB
14Accepted4/41ms320 KiB
15Wrong answer0/33ms568 KiB
16Wrong answer0/43ms568 KiB
17Accepted4/43ms572 KiB
18Wrong answer0/43ms424 KiB
19Wrong answer0/43ms568 KiB
20Wrong answer0/43ms568 KiB
21Wrong answer0/33ms512 KiB
22Wrong answer0/43ms424 KiB