Submission #71265646


Source Code Expand

Copy
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
int inputs[26];
#define I(x) (inputs[(x) - 'A'])
int tiisakunaihou(int a, int b) {
return a >= b ? a : b;
}
int ccnt = 0;
char candidates[1 << 9][9];
int cmp(const void* x, const void* y) {
return strcmp(x, y);
}
#define CYCLE (59 * 61)
int ans_cnt = 0;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>

int inputs[26];
#define I(x) (inputs[(x) - 'A'])

int tiisakunaihou(int a, int b) {
	return a >= b ? a : b;
}

int ccnt = 0;
char candidates[1 << 9][9];

int cmp(const void* x, const void* y) {
	return strcmp(x, y);
}

#define CYCLE (59 * 61)
int ans_cnt = 0;
int anses[CYCLE];

/* https://oeis.org/A000396 */
const int kanzensu[5] = { 6, 28, 496, 8128, 33550336 };

int main(void) {
	int i;
	for (i = 0; i < 26; i++) {
		if (scanf("%d", &inputs[i]) != 1) return 1;
	}
	printf("%d\n", I('A') - I('B'));
	printf("%d\n", I('C') + I('D'));
	printf("%d\n", tiisakunaihou(I('F') + 1 - I('E'), 0));
	printf("%d\n", (I('G') + I('H') + I('I') + 3) / 3);
	for (i = 1; i < (1 << 8); i++) {
		int j, cnt = 0;
		for (j = 0; j < 8; j++) {
			if ((i >> j) & 1) candidates[ccnt][cnt++] = "dagabaji"[j];
		}
		if (cnt == I('J')) ccnt++;
	}
	qsort(candidates, ccnt, sizeof(*candidates), cmp);
	puts(candidates[0]);
	for (i = 0; i < CYCLE; i++) {
		if (i % 59 == I('K') && i % 61 == I('L')) anses[ans_cnt++] = i;
	}
	if (ans_cnt == 0) {
		puts("null\nnull");
	} else {
		int idx = I('M') - (anses[0] != 0);
		int fav = anses[idx % ans_cnt] + CYCLE * (idx / ans_cnt);
		int fav2 = 0;
		for (i = 0; i < 5; i++) {
			if (abs(kanzensu[i] - fav) >= I('N')) {
				fav2 = kanzensu[i];
				break;
			}
		}
		if (fav < fav2) {
			printf("%d\n%d\n", fav, fav2);
		} else {
			printf("%d\n%d\n", fav2, fav);
		}
	}
	printf("%d\n",
		((I('O') + I('P') + I('Q')) * (I('R') + I('S') + I('T')) % 9973) *
		((I('U') + I('V') + I('W')) * (I('X') + I('Y') + I('Z')) % 9973) % 9973
	);
	return 0;
}

Submission Info

Submission Time
Task A - 宇宙人
User mikecat
Language C (gcc 12.2.0)
Score 100
Code Size 1715 Byte
Status AC
Exec Time 0 ms
Memory 1728 KiB

Judge Result

Set Name Sample Subtask1
Score / Max Score 0 / 0 100 / 100
Status
AC × 1
AC × 16
Set Name Test Cases
Sample 0_00.txt
Subtask1 0_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt, 1_13.txt, 1_14.txt, 1_15.txt
Case Name Status Exec Time Memory
0_00.txt AC 0 ms 1628 KiB
1_01.txt AC 0 ms 1720 KiB
1_02.txt AC 0 ms 1728 KiB
1_03.txt AC 0 ms 1612 KiB
1_04.txt AC 0 ms 1724 KiB
1_05.txt AC 0 ms 1576 KiB
1_06.txt AC 0 ms 1616 KiB
1_07.txt AC 0 ms 1560 KiB
1_08.txt AC 0 ms 1628 KiB
1_09.txt AC 0 ms 1620 KiB
1_10.txt AC 0 ms 1712 KiB
1_11.txt AC 0 ms 1560 KiB
1_12.txt AC 0 ms 1708 KiB
1_13.txt AC 0 ms 1624 KiB
1_14.txt AC 0 ms 1616 KiB
1_15.txt AC 0 ms 1632 KiB


2025-11-28 (Fri)
07:51:28 +09:00