Submission #37551901


Source Code Expand

	#include <bits/stdc++.h>
#define ll long long
using namespace std;
//ameetea
int main(){
	string xd;
	cin>>xd;
	int q[26],boo=1,cont=0;
	memset(q,0,sizeof(q));
	for(int i=0;i<xd.size();i++){
		if((isalpha(xd[i]) and q[xd[i]-'a']) or (cont<=0 and isalpha(xd[i])))	boo=0;
		else if(isalpha(xd[i]) and !q[xd[i]-'a'])	q[xd[i]-'a']=1;
		else if(xd[i]==')')	memset(q,0,sizeof(q));
	}
	if(!boo)	cout<<"No";
	else	cout<<"Yes";
}
/*

*/

Submission Info

Submission Time
Task D - Scope
User kev132
Language C++ (GCC 9.2.1)
Score 0
Code Size 449 Byte
Status WA
Exec Time 18 ms
Memory 3904 KiB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:10:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   10 |  for(int i=0;i<xd.size();i++){
      |              ~^~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 400
Status
AC × 3
WA × 1
AC × 15
WA × 13
Set Name Test Cases
Sample example0.txt, example1.txt, example2.txt, example3.txt
All example0.txt, example1.txt, example2.txt, example3.txt, random0.txt, random1.txt, random10.txt, random11.txt, random12.txt, random13.txt, random14.txt, random15.txt, random16.txt, random17.txt, random18.txt, random19.txt, random2.txt, random20.txt, random21.txt, random22.txt, random23.txt, random3.txt, random4.txt, random5.txt, random6.txt, random7.txt, random8.txt, random9.txt
Case Name Status Exec Time Memory
example0.txt WA 6 ms 3384 KiB
example1.txt AC 2 ms 3408 KiB
example2.txt AC 2 ms 3464 KiB
example3.txt AC 2 ms 3468 KiB
random0.txt WA 13 ms 3796 KiB
random1.txt WA 12 ms 3804 KiB
random10.txt WA 12 ms 3768 KiB
random11.txt WA 13 ms 3708 KiB
random12.txt AC 14 ms 3820 KiB
random13.txt AC 13 ms 3796 KiB
random14.txt AC 14 ms 3792 KiB
random15.txt AC 11 ms 3828 KiB
random16.txt AC 12 ms 3780 KiB
random17.txt AC 16 ms 3780 KiB
random18.txt AC 12 ms 3828 KiB
random19.txt AC 14 ms 3896 KiB
random2.txt WA 13 ms 3768 KiB
random20.txt AC 17 ms 3804 KiB
random21.txt AC 16 ms 3900 KiB
random22.txt AC 12 ms 3712 KiB
random23.txt AC 14 ms 3840 KiB
random3.txt WA 11 ms 3784 KiB
random4.txt WA 15 ms 3904 KiB
random5.txt WA 16 ms 3668 KiB
random6.txt WA 11 ms 3728 KiB
random7.txt WA 18 ms 3728 KiB
random8.txt WA 16 ms 3712 KiB
random9.txt WA 13 ms 3672 KiB