129032025-01-03 11:37:31PKBDNS szakaszok száma (75 pont)cpp17Time limit exceeded 0/75300ms748 KiB

#include <bits/stdc++.h>
using namespace std;

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

	string dns;
	cin >> dns;

	int found_dns = 0;

	for (int i = 0; i < dns_length; i++) {
		if (dns[i] == 'A') {
			for (int j = i+1; j < dns_length; j++) {
				if (dns[j] == 'G') {
					for (int k = j+1; k<dns_length; k++) {
						if (dns[k] == 'T') {
							found_dns++;
						}
					}
				}
			}
		}
	}


	cout << found_dns - 1;
}
SubtaskSumTestVerdictTimeMemory
base0/75
1Accepted0/01ms508 KiB
2Time limit exceeded0/0272ms568 KiB
3Wrong answer0/31ms320 KiB
4Wrong answer0/41ms320 KiB
5Wrong answer0/41ms548 KiB
6Wrong answer0/41ms320 KiB
7Wrong answer0/41ms356 KiB
8Wrong answer0/31ms500 KiB
9Wrong answer0/31ms320 KiB
10Wrong answer0/42ms320 KiB
11Wrong answer0/49ms404 KiB
12Wrong answer0/42ms320 KiB
13Wrong answer0/413ms320 KiB
14Wrong answer0/410ms412 KiB
15Time limit exceeded0/3300ms568 KiB
16Time limit exceeded0/4298ms568 KiB
17Time limit exceeded0/4298ms568 KiB
18Time limit exceeded0/4289ms748 KiB
19Time limit exceeded0/4289ms572 KiB
20Time limit exceeded0/4293ms568 KiB
21Time limit exceeded0/3298ms616 KiB
22Time limit exceeded0/4280ms568 KiB