Submission #20298885


Source Code Expand

#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define INF 2147483647
#define ft first
#define sec second
#define pr pair<int,int>
#define ISCC ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
int t ,n ,l ,r ,mid ,tp ,k;
string s;
int main() 
{
	cin>>s;
	int ok=1;
	for(int i=0 ;i<s.size() ;i++)
	{
		if((i&1)==0 && s[i]<97) {ok=0; break;}//偶
		if(i&1 && 97<=s[i]){ok=0; break;}
	}
	if(ok) cout<<"Yes\n";
	else cout<<"No\n";
}

Submission Info

Submission Time
Task B - uNrEaDaBlE sTrInG
User ck1080012
Language C++ (GCC 9.2.1)
Score 200
Code Size 490 Byte
Status AC
Exec Time 6 ms
Memory 3636 KiB

Compile Error

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

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 26
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, no2_01.txt, no2_02.txt, no_01.txt, no_02.txt, no_03.txt, no_04.txt, no_05.txt, no_06.txt, no_07.txt, no_08.txt, no_09.txt, no_10.txt, sample_01.txt, sample_02.txt, sample_03.txt, yes_01.txt, yes_02.txt, yes_03.txt, yes_04.txt, yes_05.txt, yes_06.txt, yes_07.txt, yes_08.txt, yes_09.txt, yes_10.txt
Case Name Status Exec Time Memory
hand_01.txt AC 6 ms 3520 KiB
no2_01.txt AC 3 ms 3572 KiB
no2_02.txt AC 2 ms 3524 KiB
no_01.txt AC 2 ms 3528 KiB
no_02.txt AC 3 ms 3572 KiB
no_03.txt AC 2 ms 3576 KiB
no_04.txt AC 2 ms 3596 KiB
no_05.txt AC 2 ms 3572 KiB
no_06.txt AC 2 ms 3528 KiB
no_07.txt AC 2 ms 3600 KiB
no_08.txt AC 2 ms 3636 KiB
no_09.txt AC 2 ms 3636 KiB
no_10.txt AC 3 ms 3592 KiB
sample_01.txt AC 3 ms 3404 KiB
sample_02.txt AC 2 ms 3508 KiB
sample_03.txt AC 2 ms 3588 KiB
yes_01.txt AC 3 ms 3532 KiB
yes_02.txt AC 3 ms 3524 KiB
yes_03.txt AC 2 ms 3576 KiB
yes_04.txt AC 2 ms 3532 KiB
yes_05.txt AC 2 ms 3460 KiB
yes_06.txt AC 2 ms 3516 KiB
yes_07.txt AC 2 ms 3464 KiB
yes_08.txt AC 2 ms 3588 KiB
yes_09.txt AC 2 ms 3604 KiB
yes_10.txt AC 2 ms 3620 KiB