Submission #3690358


Source Code Expand

#include <bits/stdc++.h>

int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		std::string s[3];
		for (int j = 0; j < 3; j++)
			std::cin >> s[j];
		switch (s[0][0])
		{
		case 'B':
			printf("%c", s[2].front());
			break;
		case 'M':
			printf("%c", s[2][s[2].size() / 2]);
			break;
		case 'E':
			printf("%c", s[2].back());
			break;
		}
	}
	printf("\n");

	return 0;
}

Submission Info

Submission Time
Task A - エンド・オブ・ビギニング
User TanakaTaroh
Language C++14 (GCC 5.4.1)
Score 100
Code Size 420 Byte
Status AC
Exec Time 2 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:6:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
                 ^

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 19
Set Name Test Cases
All 00_sample_00.txt, 00_sample_01.txt, 10_min_00.txt, 10_min_01.txt, 10_min_02.txt, 20_max_00.txt, 20_max_01.txt, 20_max_02.txt, 90_random_00.txt, 90_random_01.txt, 90_random_02.txt, 90_random_03.txt, 90_random_04.txt, 90_random_05.txt, 90_random_06.txt, 90_random_07.txt, 90_random_08.txt, 90_random_09.txt, 99_medium_00.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 256 KB
00_sample_01.txt AC 1 ms 256 KB
10_min_00.txt AC 1 ms 256 KB
10_min_01.txt AC 1 ms 256 KB
10_min_02.txt AC 1 ms 256 KB
20_max_00.txt AC 2 ms 256 KB
20_max_01.txt AC 2 ms 256 KB
20_max_02.txt AC 2 ms 256 KB
90_random_00.txt AC 1 ms 256 KB
90_random_01.txt AC 2 ms 256 KB
90_random_02.txt AC 1 ms 256 KB
90_random_03.txt AC 1 ms 256 KB
90_random_04.txt AC 2 ms 256 KB
90_random_05.txt AC 1 ms 256 KB
90_random_06.txt AC 1 ms 256 KB
90_random_07.txt AC 1 ms 256 KB
90_random_08.txt AC 1 ms 256 KB
90_random_09.txt AC 1 ms 256 KB
99_medium_00.txt AC 1 ms 256 KB