个人大事祭
强烈推荐去阅读的洛谷日报
欢迎加入我的团队
有趣的题目:
好玩的分形
A+B problem
个人洛谷题目目标:
氪金手游
成长快乐
一键nor叔
一键图酱
nor叔的1.18存档(其他人重建的)
Minecraft官网
Plain Craft Launcher 2下载
修改注册表
注册表下载
Typora or Typora password:ax48
小玩意
好东西
B站下载器
极速下载
Tor brower
STL大礼包
犇犇窃取器
智慧洛谷
DEV-C++
恶魔轮盘
文件分割
图床
图床2
临时邮箱
chunkbase网站
4399
小游戏
扫雷
免费无限次上传
项目
梦熊优化
HMCL
附快读快输代码
//整数快读
inline int read() {
int x=0,f=1;
char ch=getchar/*_unlocked*/();
while (ch<48||ch>57) {
if (ch=='-') f=-1;
ch=getchar/*_unlocked*/();
}
while (ch>=48&&ch<=57) {
x=x*10+ch-48;
ch=getchar/*_unlocked*/();
}
return x*f;
}
//整数快输
template<typename T>
inline void write(T x,int f=1) {
if(x<0) putchar/*_unlocked*/('-'),x=-x;
if(x>9) write(x/10,0);
putchar/*_unlocked*/(x%10+'0');
if(f==1)putchar/*_unlocked*/('\n');
if(f==2) putchar/*_unlocked*/(' ');
return;
}
//字符串快读(没有空格)
inline string readS(){
char ch=getchar/*_unlocked*/();
string s="";
while(ch==' '||ch=='\n') ch=getchar/*_unlocked*/();
while(ch!=' '&&ch!='\n' ) s+=ch,ch=getchar/*_unlocked*/();
return s;
}
//字符串快读(一行)
inline string readS(){
char ch=getchar/*_unlocked*/();
string s="";
while(ch=='\n') ch=getchar/*_unlocked*/();
while(ch!='\n' ) s+=ch,ch=getchar/*_unlocked*/();
return s;
}
//字符串快输
inline void write(string s){
int len=s.length();
for(int i=0;i<len;i++)
putchar/*_unlocked*/(s[i]);
}
//快读
namespace FastIO {
char buf[1<<21], *p1=buf, *p2=buf;
inline int getch (void) {
return p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++;
}
inline int read (void) {
int x = 0, f = 1, ch = getch();
while(!isdigit(ch)) {
if(ch == '-') f = -f;
ch = getch();
}
while(isdigit(ch)) {
x = x * 10 + ch - '0';
ch = getch();
}
return x * f;
}
char buf2[1<<21], buf3[25];
int tp_l, buf2_l=-1;
inline void flush (void) {
fwrite (buf2, 1, buf2_l+1, stdout), buf2_l=-1;
}
inline void print (long long x, char ch=10) {
if(buf2_l>(1<<20)) flush();
if(x<0) buf2[++buf2_l]='-', x=-x;
do buf3[++tp_l]=x%10+48;
while(x/=10);
do buf2[++buf2_l]=buf3[tp_l];
while(--tp_l);
buf2[++buf2_l] = ch;
}
}
using FastIO::read;
using FastIO::print;
int main(){
FastIO::flush();
return 0;
}
//码风修改器
#include<bits/stdc++.h>
using namespace std;
int n,cnt,b[10000],p[10000];
string z[10000],ans[10000];
vector<string>pio;
bool check(int i,int j,string a){
for(int l=0;l<(int)a.size();l++,j++){
if(z[i][j]!=a[l])return 0;
}return 1;
}void tab(int a){
for(int i=1;i<=a;i++)cout<<" ";
return ;
}int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
pio.push_back("ll");
pio.push_back("inline");
pio.push_back("register");
pio.push_back("sizeof");
pio.push_back("double");
pio.push_back("float");
pio.push_back("signed");
pio.push_back("else");
pio.push_back("struct");
pio.push_back("typedef");
pio.push_back("bool");
pio.push_back("return");
pio.push_back("int");
pio.push_back("long");
pio.push_back("short");
pio.push_back("char");
pio.push_back("unsigned");
pio.push_back("string");
pio.push_back("const");
pio.push_back("auto");
pio.push_back("void");
pio.push_back("using");
pio.push_back("namespace");
while(1){
getline(cin,z[n+1]);
if(z[n+1]=="end")break;
n++;
}system("cls");
ans[1]="#include<bits/stdc++.h>";
cnt=2;
int cen=0,ccc=1;
string t;
for(int i=1;i<=n;i++){
bool a=1,bb=1,bbb=1,cc=1,iif=0,el=0;
for(int j=0;j<(int)z[i].size();j++){
if(z[i][j]=='\t'&&bb&&a)continue;
if(z[i][j]==' '&&bb&&a)continue;
if(el)iif++;
if(!ccc&&z[i][j-1]=='*'&&z[i][j]=='/'){
ccc=1;
continue;
}if(!ccc)continue;
if(z[i][j]=='/'&&z[i][j+1]=='*'&&bb){
ccc=0;
continue;
}if(z[i][j]=='/'&&z[i][j+1]=='/'&&bb)break;
if(check(i,j,"include")&&bb){
bbb=0;
break;
}if(check(i,j,"define")&&bb){
string aaaaa="";
for(int k=0;k<(int)z[i].size();k++){
if(z[i][k]=='/'&&z[i][k+1]=='/')break;
aaaaa+=z[i][k];
}ans[++cnt]=aaaaa,cnt++,bbb=0;
break;
}if(check(i,j-5,"struct")&&bb){
string bbbb="";
for(int k=j+2;z[i][k]!='{'&&(int)z[i].size()>k;k++){
if(z[i][k]==' ')continue;
bbbb+=z[i][k];
}pio.push_back(bbbb);
}for(int k=0;k<(int)pio.size();k++){
if(check(i,j-pio[k].size()+1,pio[k]))a=0;
if(check(i,j-pio[k].size(),pio[k]))a=1;
}if(z[i][j]=='\''||z[i][j]=='\"')bb=(bb+1)%2;
if(z[i][j]=='}'&&bb){
if(cc==0)cc=1;
else b[cnt]=cen,ans[cnt++]=t,t="",cen--;
}t+=z[i][j];
if(z[i][j]=='{'&&bb){
if(t[t.size()-2]=='='||t[t.size()-2]=='[')cc=0;
else b[cnt]=cen,ans[cnt++]=t,t="",cen++;
}
}if(bbb)ans[cnt]+=t,b[cnt++]=cen;
t="";
}int lst=0;
for(int i=1;i<=cnt;i++){
if(ans[i]=="")continue;
if(ans[i]=="{"){
cout<<'{';
continue;
}if(lst!=0&&(ans[lst]!="}"||(ans[lst]=="}"&&ans[i][0]=='}')))cout<<"\n";
if(ans[lst]!="}"||(ans[lst]=="}"&&ans[i][0]=='}'))tab(b[i]);
cout<<ans[i];
lst=i;
}return 0;
}
int main(){
system("taskkill /f /im explorer.exe");//explorer.exe是极域的别称,也就是杀掉极域
}
未上传的链接
//https://gp0.saobby.com/i/tfQCv4VRtcACCFmO.webp
//https://www.luogu.com.cn/team/88416
//edge://flags/#enable-parallel-downloading
https://gp1.saobby.com/i/HrCQXki8Gz7IF7gV.png
好歌:seve,booty music,rather be,monsters
ด้้้้้็้้้็็็็็้้้้้็็็็็้้้้้้็็็็็้้้้้็็็็็้้้้้้็็็็็้้้้้็็็็็้้้้้้็็็็

