Submission #12216443


Source Code Expand

//%std
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
inline int read()
{
	int out = 0, fh = 1;
	char jp = getchar();
	while ((jp > '9' || jp < '0') && jp != '-')
		jp = getchar();
	if (jp == '-')
		fh = -1, jp = getchar();
	while (jp >= '0' && jp <= '9')
		out = out * 10 + jp - '0', jp = getchar();
	return out * fh;
}
char s[12];
int main()
{
	scanf("%s", s);
	int n = strlen(s);
	if (n & 1)
		puts("No");
	else
	{
		for (int i = 0; i < n; i += 2)
			if (s[i] != 'h' || s[i + 1] != 'i')
			{
				puts("No");
				return 0;
			}
		puts("Yes");
	}
	return 0;
}

Submission Info

Submission Time
Task A - Hitachi String
User KaguraMea
Language C++14 (GCC 5.4.1)
Score 100
Code Size 616 Byte
Status AC
Exec Time 1 ms
Memory 256 KiB

Compile Error

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

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 17
Set Name Test Cases
Sample 00_sample_01, 00_sample_02, 00_sample_03
All 00_sample_01, 00_sample_02, 00_sample_03, 02_random_01, 02_random_02, 02_random_03, 02_random_04, 02_random_05, 90_handmake_01, 90_handmake_02, 90_handmake_03, 90_handmake_04, 90_handmake_05, 90_handmake_06, 90_handmake_07, 90_handmake_08, 90_handmake_09
Case Name Status Exec Time Memory
00_sample_01 AC 1 ms 256 KiB
00_sample_02 AC 1 ms 256 KiB
00_sample_03 AC 1 ms 256 KiB
02_random_01 AC 1 ms 256 KiB
02_random_02 AC 1 ms 256 KiB
02_random_03 AC 1 ms 256 KiB
02_random_04 AC 1 ms 256 KiB
02_random_05 AC 1 ms 256 KiB
90_handmake_01 AC 1 ms 256 KiB
90_handmake_02 AC 1 ms 256 KiB
90_handmake_03 AC 1 ms 256 KiB
90_handmake_04 AC 1 ms 256 KiB
90_handmake_05 AC 1 ms 256 KiB
90_handmake_06 AC 1 ms 256 KiB
90_handmake_07 AC 1 ms 256 KiB
90_handmake_08 AC 1 ms 256 KiB
90_handmake_09 AC 1 ms 256 KiB