Language: C++


#include<iostream>
#include<algorithm>
#include<string>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)

using namespace std;

int main(){
	int a,ii,d,u,n,y;
	char ind[1010];
	getline(cin,ind);
//	rep(i,ind.size())cout<<i<<" "<<ind[i];
	if(7<ind.size()){
	rep(i,ind.size()-7){	
		
	a=ii=d=u=n=y=0;
		rep(j,8){
			if(ind[i+j]=='A')a++;
			else if(ind[i+j]=='I')ii++;
			else if(ind[i+j]=='D')d++;
			else if(ind[i+j]=='U')u++;
			else if(ind[i+j]=='N')n++;
			else if(ind[i+j]=='Y')y++;
			else {break;}
//			cout<<ind[i+j]<<i+j<<" ";
		}
//		cout<<endl;
		if(a==2&&n==2&&ii==1&&d==1&&u==1&&y==1){
			ind[i+0]='A';
			ind[i+1]='I';
			ind[i+2]='Z';
			ind[i+3]='U';
			ind[i+4]='N';
			ind[i+5]='Y';
			ind[i+6]='A';
			ind[i+7]='N';
			i+=8;
		}
	}
	}
	cout<<ind<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: no matching function for call to 'getline(std::istream&, char [1010])'
   13 |         getline(cin,ind);
      |         ~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:55,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
  907 |     getline(basic_istream<_CharT, _Traits>& __in,
      |     ^~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:907:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 4117 |     getline(basic_istream<_CharT, _Traits>& __is,
      |     ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4117:5: note:   template argument deduction/substitution failed:
a.cc:13:16: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char [1010]'
   13 |         getline(cin,ind);
      |         ~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
 4125 |     getline(basic_istream<_CharT, _Traits>&& __is,
      |     ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4125:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 4132 |     getline(basic_istream<_CharT, _Traits>&& __is,
      |     ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4132:5: note:   template argument deduction/substitution failed:
a.cc:13:16: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char [1010]'
   13 |         getline(cin,ind);
      |         ~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154:
/usr/include/stdio.h:697:18: note: candidate: '__ssize_t getline(char**, size_t*, FILE*)'
  697 | extern __ssize_t getline (char **__restrict __lineptr,
      |                  ^~~~~~~
/usr/include/stdio.h:697:18: note:   candidate expects 3 arguments, 2 provided
a.cc:15:18: error: request for member 'size' in 'ind', which is of non-class type 'char [1010]'
   15 |         if(7<ind.size()){
      |                  ^~~~
a.cc:16:19: error: request for member 'size' in 'ind', which is of non-class type 'char [1010]'
   16 |         rep(i,ind.size()-7){
      |                   ^~~~
a.cc:5:35: note: in definition of macro 'loop'
    5 | #define loop(i,a,b) for(int i=a;i<b;i++)
      |                                   ^
a.cc:16:9: note: in expansion of macro 'rep'
   16 |         rep(i,ind.size()-7){
      |         ^~~