mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-07-07 09:16:58 +08:00
Add FZOI Codes
This commit is contained in:
18
FZOI/NOIP-CSP.cpp
Normal file
18
FZOI/NOIP-CSP.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
int main(){
|
||||
string s;
|
||||
cin >> s;
|
||||
int len = s.length();
|
||||
for(int i = 0; i < len; i ++ ){
|
||||
if((s[i] == 'n' || s[i] == 'N') && (s[i+1] == 'o' || s[i + 1] == 'O') && (s[i + 2] == 'i' || s[i + 2] == 'I') && (s[i + 3] == 'P' || s[i + 3] == 'p'))
|
||||
{
|
||||
cout << "CSP";
|
||||
i += 3;
|
||||
|
||||
}
|
||||
else
|
||||
cout << s[i];
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user