Language: C++

Last login: Tue Dec  6 23:57:37 on ttys003
wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ pwd
/Users/wakabayashirika
wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ ls
Applications	Downloads	Music		class
Desktop		Library		Pictures	play
Documents	Movies		Public		rippro
wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ cd Deskto@
-bash: cd: Deskto@: No such file or directory
wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ cd Desktop
wakabayashirika-no-MacBook-Pro:Desktop wakabayashirika$ ls
class		library		rippro		??°????§£???
wakabayashirika-no-MacBook-Pro:Desktop wakabayashirika$ cd rippro
wakabayashirika-no-MacBook-Pro:rippro wakabayashirika$ ls
rippro			rippro.xcodeproj
wakabayashirika-no-MacBook-Pro:rippro wakabayashirika$ cd rippro
wakabayashirika-no-MacBook-Pro:rippro wakabayashirika$ ls
1121			1205			aoj
1123			Empty.dat.xib		aoj_icpc
1125			a ????????????.cpp		atcoder
1128			a.cpp			b.cpp
1130			aaaa.dat		b.hpp
wakabayashirika-no-MacBook-Pro:rippro wakabayashirika$ cd aoj
wakabayashirika-no-MacBook-Pro:aoj wakabayashirika$ ls
stuff
wakabayashirika-no-MacBook-Pro:aoj wakabayashirika$ cd
wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ cd Desktop
wakabayashirika-no-MacBook-Pro:Desktop wakabayashirika$ ls
class		library		rippro		??°????§£???
wakabayashirika-no-MacBook-Pro:Desktop wakabayashirika$ cd rippro
wakabayashirika-no-MacBook-Pro:rippro wakabayashirika$ ls
rippro			rippro.xcodeproj
wakabayashirika-no-MacBook-Pro:rippro wakabayashirika$ cd rippro
wakabayashirika-no-MacBook-Pro:rippro wakabayashirika$ ls
1121			1205			aoj
1123			Empty.dat.xib		aoj_icpc
1125			a ????????????.cpp		atcoder
1128			a.cpp			b.cpp
1130			aaaa.dat		b.hpp
wakabayashirika-no-MacBook-Pro:rippro wakabayashirika$ mkdir 1207
wakabayashirika-no-MacBook-Pro:rippro wakabayashirika$ cd 1207
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ ls
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ emacs 2575.cpp









wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ g++ -o 2575 2575.cpp
2575.cpp:33:12: error: no matching function for call to 'sort'
  string a=sort("AIDUNYAN");    
           ^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4033:1: note: 
      candidate function template not viable: requires 3 arguments, but 1 was
      provided
sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compa...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4048:1: note: 
      candidate function template not viable: requires 2 arguments, but 1 was
      provided
sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4056:1: note: 
      candidate function template not viable: requires 2 arguments, but 1 was
      provided
sort(_Tp** __first, _Tp** __last)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4064:1: note: 
      candidate function template not viable: requires 2 arguments, but 1 was
      provided
sort(__wrap_iter<_Tp*> __first, __wrap_iter<_Tp*> __last)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4072:1: note: 
      candidate function template not viable: requires 3 arguments, but 1 was
      provided
sort(__wrap_iter<_Tp*> __first, __wrap_iter<_Tp*> __last, _Compare __comp)
^
2575.cpp:37:5: error: no matching function for call to 'sort'
    sort(temp);
    ^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4033:1: note: 
      candidate function template not viable: requires 3 arguments, but 1 was
      provided
sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compa...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4048:1: note: 
      candidate function template not viable: requires 2 arguments, but 1 was
      provided
sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4056:1: note: 
      candidate function template not viable: requires 2 arguments, but 1 was
      provided
sort(_Tp** __first, _Tp** __last)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4064:1: note: 
      candidate function template not viable: requires 2 arguments, but 1 was
      provided
sort(__wrap_iter<_Tp*> __first, __wrap_iter<_Tp*> __last)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4072:1: note: 
      candidate function template not viable: requires 3 arguments, but 1 was
      provided
sort(__wrap_iter<_Tp*> __first, __wrap_iter<_Tp*> __last, _Compare __comp)
^
2 errors generated.
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ emacs 2575.cpp
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ g++ -o 2575 2575.cpp
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ ./2575
AIDUNYAN

wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ emacs 2575.cpp
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ g++ -o 2575 2575.cpp
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ ./2575
AIDUNYAN
AIZUNYAN
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ ./2575
ZDD
libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: basic_string
ZDDAbort trap: 6
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ emacs 2575.cpp
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ g++ -o 2575 2575.cpp
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ ./2575
AIDUNYAN
AIZUNYAN
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ ./2575
ZDD 
ZDD
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ ./2575
AADINNUYHAMAJIDETENSHIDAKARANYANAIDUPEROPEROSHITAI
AIZUNYANHAMAJIDETENSHIDAKARAAIZUNYANPEROPER
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ emacs 2575.cpp
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ g++ -o 2575 2575.cpp
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ ./2575
AADINNUYHAMAJIDETENSHIDAKARANYANAIDUPEROPEROSHITAI
AIZUNYANHAMAJIDETENSHIDAKARAAIZUNYANPEROPEROSHITAI
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ ./2575
NYANAIDUAIDU
AIZUNYANAIDU
wakabayashirika-no-MacBook-Pro:1207 wakabayashirika$ emacs 2575.cpp


#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <math.h>
#include <string>
#include <string.h>
#include <stack>
#include <queue>
#include <vector>
#include <utility>
#include <set>
#include <map>
#include <stdlib.h>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 10000000000LL
#define rep(i,n) for(i=0;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
//cout<<shosu(10)<<3.14159265353238<<endl;                                      

typedef pair<int,int> pii;
int i,j;
int main(void) {
  string s;
  string a="AIDUNYAN";
  sort(all(a));
  cin>>s;
  if(s.size()<8)
    cout<<s<<endl;
  else{
    rep(i,s.size()){
      if(i<s.size()-7){
        string temp=s.substr(i,8);
        sort(all(temp));
        if(temp==a){
          cout<<"AIZUNYAN";
          i+=7;
        }else
          cout<<s[i];
      }else
        cout<<s[i];
    }
    cout<<endl;
  }
  return 0;
}

Compiler output:
a.cc:8:60: error: stray '@' in program
    8 | wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ cd Deskto@
      |                                                            ^
a.cc:9:18: error: stray '@' in program
    9 | -bash: cd: Deskto@: No such file or directory
      |                  ^
a.cc:12:51: error: extended character ° is not valid in an identifier
   12 | class           library         rippro          ??°????§£???
      |                                                   ^
a.cc:12:56: error: extended character § is not valid in an identifier
   12 | class           library         rippro          ??°????§£???
      |                                                        ^
a.cc:12:56: error: extended character £ is not valid in an identifier
a.cc:29:51: error: extended character ° is not valid in an identifier
   29 | class           library         rippro          ??°????§£???
      |                                                   ^
a.cc:29:56: error: extended character § is not valid in an identifier
   29 | class           library         rippro          ??°????§£???
      |                                                        ^
a.cc:29:56: error: extended character £ is not valid in an identifier
a.cc:54:57: warning: multi-character character constant [-Wmultichar]
   54 | 2575.cpp:33:12: error: no matching function for call to 'sort'
      |                                                         ^~~~~~
a.cc:82:56: warning: multi-character character constant [-Wmultichar]
   82 | 2575.cpp:37:5: error: no matching function for call to 'sort'
      |                                                        ^~~~~~
a.cc:1:1: error: 'Last' does not name a type
    1 | Last login: Tue Dec  6 23:57:37 on ttys003
      | ^~~~
a.cc:56:12: error: expected unqualified-id before '^' token
   56 |            ^~~~
      |            ^
a.cc:84:5: error: expected unqualified-id before '^' token
   84 |     ^~~~
      |     ^
In file included from /usr/include/c++/14/iosfwd:42,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:147:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
   68 |   typedef ptrdiff_t     streamsize; // Signed integral type
      |           ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
   40 | #include <cwchar> // For mbstate_t
  +++ |+#include <cstddef>
   41 | 
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
  131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                            ^~~~~~
In file included from /usr/include/wchar.h:35,
                 from /usr/include/c++/14/cwchar:44,
                 from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
  132 |   __attribute__((__externally_visible__));
      |                                         ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
  133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                              ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
  134 |   __attribute__((__externally_visible__));
      |                                         ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
  140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
      |                             ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
  142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
      |                               ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
  145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                          ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                            ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
  145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                                    ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
  147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                          ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                              ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
  147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                                      ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
  154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
      |                          ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
      |                                            ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
  154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
      |                                                                    ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
  155 |   __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
      |                                                                         ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
  156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
      |                          ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
      |                                            ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
  156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
      |                                                                    ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
  156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
      |                                                                      ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
  162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
      |                          ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
      |                                              ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
  162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
      |                                                                      ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
  163 |   __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
      |                                                                         ^
/us