Submission #74361898


Source Code Expand

#include <stdio.h>
#include <string.h>

int main(void) {
	int N, i;
	char target[16];
	int ans = 0;
	if (scanf("%15s", target) != 1) return 1;
	if (scanf("%d", &N) != 1) return 1;
	for (i = 0; i < N; i++) {
		char yubiwa[32] = "";
		size_t len;
		if (scanf("%15s", yubiwa) != 1) return 1;
		len = strlen(yubiwa);
		memcpy(yubiwa + len, yubiwa, len);
		if (strstr(yubiwa, target)) ans++;
	}
	printf("%d\n", ans);
	return 0;
}

Submission Info

Submission Time
Task B - 指輪 (Ring)
User mikecat
Language C23 (GCC 14.2.0)
Score 100
Code Size 445 Byte
Status AC
Exec Time 1 ms
Memory 1756 KiB

Judge Result

Set Name set01 set02 set03 set04 set05
Score / Max Score 20 / 20 20 / 20 20 / 20 20 / 20 20 / 20
Status
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
Set Name Test Cases
set01 data1
set02 data2
set03 data3
set04 data4
set05 data5
Case Name Status Exec Time Memory
data1 AC 1 ms 1656 KiB
data2 AC 0 ms 1648 KiB
data3 AC 0 ms 1716 KiB
data4 AC 0 ms 1624 KiB
data5 AC 0 ms 1756 KiB