Submission #60039103


Source Code Expand

/*
*            /$$           /$$
*           |__/          |__/
*  /$$$$$$$$ /$$ /$$$$$$$$ /$$  /$$$$$$
* |____ /$$/| $$|____ /$$/| $$ /$$__  $$
*    /$$$$/ | $$   /$$$$/ | $$| $$  \ $$
*   /$$__/  | $$  /$$__/  | $$| $$  | $$
*  /$$$$$$$$| $$ /$$$$$$$$| $$|  $$$$$$$
* |________/|__/|________/|__/ \____  $$
*                                   | $$
*                                   | $$
*                                   |__/
*/
//hj23308保佑我
//Missile保佑我
/*
* 醒了在梦里挣扎,不觉黯淡了朝霞
*/
/*
* 我很高兴你没有忘了我,但是我现在更希望你已经忘了我了。
* 希望在你的记忆中,我只是尘土一撮,从你的全世界路过,然后四散飞扬不留下一点痕迹,而你要不回头的往前走。
* 我更希望我只是从你的全世界路过,只是路过
*/
/*
* 只是我在十字路口守了太久,守到黄沙如雨掩埋一切痕迹,才发现自己等的人已经离开了。
*/
/*
* 听我的 别回头 回头就可能会泪流满面,会被黄沙掩埋,所以即使痛苦也要向前走
*/
/*
* 我听到了「天行健」的回响,这是一个伟大斗士的不息自强;
* 我听到了「破万法」的回响,这是一个黑道打手的守护欲望;
* 我看见了「生生不息」的激荡,这是一个骗子的伟大乐章!
*/
/*
* 我用虚假的面具照顾着细腻的感情;
* 我以华丽的衣物下藏着腐烂的血肉;
* 当我摘下面具,褪去衣物,即便是我最亲近的人,也无法直视我
*/
#include<bits/stdc++.h>
using namespace std;
const int MAXN=1e5+5;
int n;
string a;
map<char,bool>Map;
int main()
{
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	std::ios::sync_with_stdio(false);
	cin.tie(0),cout.tie(0);
	cin>>a;
	n=a.length();
	a=" "+a;
	for(int i=1;i<=n;i+=2) {
		if(a[i]!=a[i+1]) {
			cout<<"No\n";
			return 0;
		}
		if(Map.count(a[i])) {
			cout<<"No\n";
			return 0;
		}
		Map[a[i]]=true;
	}
	cout<<"Yes\n";
	return 0;
}

Submission Info

Submission Time
Task B - 1122 String
User Ziziq
Language C++ 20 (gcc 12.2)
Score 150
Code Size 2059 Byte
Status AC
Exec Time 1 ms
Memory 3604 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 150 / 150
Status
AC × 3
AC × 25
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt
Case Name Status Exec Time Memory
example_00.txt AC 1 ms 3604 KiB
example_01.txt AC 1 ms 3464 KiB
example_02.txt AC 1 ms 3376 KiB
hand_00.txt AC 1 ms 3476 KiB
hand_01.txt AC 1 ms 3420 KiB
hand_02.txt AC 1 ms 3384 KiB
hand_03.txt AC 1 ms 3420 KiB
hand_04.txt AC 1 ms 3320 KiB
hand_05.txt AC 1 ms 3320 KiB
hand_06.txt AC 1 ms 3476 KiB
random_00.txt AC 1 ms 3480 KiB
random_01.txt AC 1 ms 3468 KiB
random_02.txt AC 1 ms 3600 KiB
random_03.txt AC 1 ms 3452 KiB
random_04.txt AC 1 ms 3412 KiB
random_05.txt AC 1 ms 3452 KiB
random_06.txt AC 1 ms 3468 KiB
random_07.txt AC 1 ms 3480 KiB
random_08.txt AC 1 ms 3324 KiB
random_09.txt AC 1 ms 3416 KiB
random_10.txt AC 1 ms 3420 KiB
random_11.txt AC 1 ms 3508 KiB
random_12.txt AC 1 ms 3436 KiB
random_13.txt AC 1 ms 3420 KiB
random_14.txt AC 1 ms 3464 KiB