Submission #63046391


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define debug() cout<<"come on"<<'\n'
#define mkp make_pair
#define pb push_back
#define ft first
#define sd second
typedef pair<int,int> pii;
typedef pair<int,pii> piii;
string s;
signed main(){
cin>>s;
for(int i=1;i<s.length();i++){
if(s[i-1]=='W'&&s[i]=='A')s[i-1]='A',s[i]='C',i-=2;
}
cout<<s;
return 0;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define debug() cout<<"come on"<<'\n'
#define mkp make_pair
#define pb push_back
#define ft first
#define sd second
typedef pair<int,int> pii;
typedef pair<int,pii> piii;
string s;
signed main(){
	cin>>s;
	for(int i=1;i<s.length();i++){
		if(s[i-1]=='W'&&s[i]=='A')s[i-1]='A',s[i]='C',i-=2;
	}
	cout<<s;
	return 0;
}

Submission Info

Submission Time
Task C - Debug
User dulf2024
Language C++ 20 (gcc 12.2)
Score 300
Code Size 403 Byte
Status AC
Exec Time 6 ms
Memory 3976 KB

Compile Error

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

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 30
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, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt
Case Name Status Exec Time Memory
example_00.txt AC 1 ms 3452 KB
example_01.txt AC 1 ms 3536 KB
example_02.txt AC 1 ms 3496 KB
hand_00.txt AC 5 ms 3808 KB
hand_01.txt AC 5 ms 3816 KB
hand_02.txt AC 5 ms 3792 KB
hand_03.txt AC 5 ms 3764 KB
hand_04.txt AC 1 ms 3488 KB
hand_05.txt AC 1 ms 3636 KB
hand_06.txt AC 5 ms 3820 KB
random_00.txt AC 5 ms 3772 KB
random_01.txt AC 5 ms 3804 KB
random_02.txt AC 5 ms 3776 KB
random_03.txt AC 5 ms 3884 KB
random_04.txt AC 5 ms 3780 KB
random_05.txt AC 5 ms 3828 KB
random_06.txt AC 5 ms 3816 KB
random_07.txt AC 5 ms 3732 KB
random_08.txt AC 5 ms 3808 KB
random_09.txt AC 5 ms 3768 KB
random_10.txt AC 5 ms 3976 KB
random_11.txt AC 5 ms 3820 KB
random_12.txt AC 6 ms 3792 KB
random_13.txt AC 5 ms 3760 KB
random_14.txt AC 5 ms 3884 KB
random_15.txt AC 5 ms 3776 KB
random_16.txt AC 5 ms 3812 KB
random_17.txt AC 5 ms 3860 KB
random_18.txt AC 5 ms 3880 KB
random_19.txt AC 5 ms 3792 KB


2025-03-30 (Sun)
03:21:30 +00:00