結果

問題 No.730 アルファベットパネル
ユーザー KamedKamed
提出日時 2019-02-18 14:48:10
言語 C++11
(gcc 11.4.0)
結果
MLE  
実行時間 -
コード長 509 bytes
コンパイル時間 524 ms
コンパイル使用メモリ 59,864 KB
実行使用メモリ 866,632 KB
最終ジャッジ日時 2024-04-15 22:48:23
合計ジャッジ時間 6,926 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
int main()
{
	std::vector<char>str;
	bool flag = false;
	if (str.empty())
	{
		str.resize(1);
	}
	while (true)
	{
		std::cin >> str[0];
		if (str[0] == '0')
		{
			break;
		}
		else
		{
			str.push_back(str[0]);
		}
	}
	str.erase(str.begin());
	for (int i = 0,n = (unsigned)str.size(); i < n; i++)
	{
		if (str[0] == str[i])
		{
			flag = true;
			break;
		}
		else{}
	}

	if (flag)
	{
		std::cout << "YES" << std::endl;
	}
	else
	{
		std::cout << "NO" << std::endl;
	}
}
0