Submission #20308669


Source Code Expand

#include <bits/stdc++.h>
using namespace std;

int main(){
	int ans = 0;
	string s;
	cin >> s;
	for(int i = 0;i<s.length();i++){
		if(i%2==0){
			if(97<=(int)s[i] and (int)s[i]<=122){
				ans += 0;

			}
			else{
				ans += 1;
			}
		}
		else{
			if(65<=(int)s[i] and (int)s[i]<=90){
				ans += 0;

			}
			else{
				ans += 1;
			}
		}
	}
	if(ans == 0){
		cout << "Yes";
	} 
	else{
		cout << "No";
	}
	return 0;
}

Submission Info

Submission Time
Task B - uNrEaDaBlE sTrInG
User hocashi
Language C++ (GCC 9.2.1)
Score 200
Code Size 447 Byte
Status AC
Exec Time 7 ms
Memory 3632 KiB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:8:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
    8 |  for(int i = 0;i<s.length();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 7 ms 3520 KiB
no2_01.txt AC 3 ms 3492 KiB
no2_02.txt AC 2 ms 3500 KiB
no_01.txt AC 1 ms 3484 KiB
no_02.txt AC 2 ms 3484 KiB
no_03.txt AC 2 ms 3496 KiB
no_04.txt AC 2 ms 3492 KiB
no_05.txt AC 2 ms 3632 KiB
no_06.txt AC 2 ms 3612 KiB
no_07.txt AC 5 ms 3440 KiB
no_08.txt AC 2 ms 3600 KiB
no_09.txt AC 2 ms 3604 KiB
no_10.txt AC 2 ms 3592 KiB
sample_01.txt AC 2 ms 3496 KiB
sample_02.txt AC 2 ms 3420 KiB
sample_03.txt AC 2 ms 3600 KiB
yes_01.txt AC 2 ms 3632 KiB
yes_02.txt AC 2 ms 3532 KiB
yes_03.txt AC 2 ms 3532 KiB
yes_04.txt AC 2 ms 3492 KiB
yes_05.txt AC 2 ms 3592 KiB
yes_06.txt AC 2 ms 3496 KiB
yes_07.txt AC 4 ms 3596 KiB
yes_08.txt AC 3 ms 3484 KiB
yes_09.txt AC 2 ms 3632 KiB
yes_10.txt AC 3 ms 3556 KiB