全站最全面功能最强大的伪Ai系统!!!
2026-07-29 15:58:56
发布于:浙江
点个赞吧,想上榜,自己联合ai编写的,1.0因为熊孩子的捣乱直接消失了,无奈重新编写2.0只求一个赞!!!!
目前已修复2个bug
得加上-std=c++11
#include<bits/stdc++.h>
#include<windows.h>
#include <sstream>
#include <fstream>
using namespace std;
const string AI_FULL_NAME="TAN白歪";
const string AI_SHORT_NAME="小白";
const int PRINT_DELAY_MS=50;
void slowPrint(const string& text)
{
for(char ch:text)
{
cout<<ch;
cout.flush();
Sleep(PRINT_DELAY_MS);
}
cout<<endl;
}
void RE()
{
cout<<">";
string s;
getline(cin, s);
int x=rand()%7+1;
if(s=="别搞了爸爸") return ;
if(s=="我好难受")
{
slowPrint("难受受着");
return;
}
switch(x)
{
case 1: slowPrint("自己上网查去"); break;
case 2: slowPrint("自己问Ai"); break;
case 3: slowPrint("管我屁事"); break;
case 4: slowPrint("小学白读了"); break;
case 5: slowPrint("回炉重造吧"); break;
case 6: slowPrint("不会受着"); break;
case 7: slowPrint("没绷住,自己查Ai去吧"); break;
}
RE();
}
void wz(int y)
{
cout<<">";
string p;
getline(cin, p);
if(p=="结束") return ;
if(p=="结束") return ;
else if(p=="PCL") slowPrint("https://pcl2.xiangdao.pro/");
else if(p=="mcjs") slowPrint("https://mcjs.cc/");
else if(p=="你画我猜") slowPrint("https://enazo.cn/");
else if(p=="马里奥") slowPrint("https://supermarioplay.com/cn");
else if(p=="打字") slowPrint("https://www.acgo.cn/discuss/rest/www.daziba.cn/zflx/zflx1.aspx ");
else if(p=="b站") slowPrint("https://www.bilibili.com");
else if(p=="百度") slowPrint("https://www.baidu.com");
else if(p=="抖音") slowPrint("https://www.douyin.com");
else if(p=="洛谷") slowPrint("https://www.luogu.com.cn/");
else if(p=="共创世界") slowPrint("https://www.ccw.site/");
else if(p=="poki"||p=="Poki"||p=="POKI") slowPrint("https://poki.com/");
else if(p=="千问") slowPrint("https://qianwen.com/");
else if(p=="豆包") slowPrint("https://doubao.com/");
else if(p=="元宝") slowPrint("https://yuanbao.com/");
else if(p=="florr") slowPrint("https://florr.io/");
else if(p=="小恐龙") slowPrint("https://chromedino.com/");
else if(p=="cps") slowPrint("https://www.arealme.com/click-speed-test/cn/#google_vignette");
else if(p=="mc") slowPrint("https://ws.imc.re");
else slowPrint("抱歉,未查找到关于此网站任何内容。\n请检查是否打错,也可能是小白Ai未收录。如果可以,请帮忙更新!!感谢!!");
}
bool tryCalc(const string& input,string& outResult)
{
string expr;
bool hasNum=false;
for(char c:input)
{
if((c>='0'&&c<='9')||c=='.'||c=='+'||c=='-')
{
expr.push_back(c);
if((c>='0'&&c<='9'))hasNum=true;
}
}
if(!hasNum||expr.empty())return false;
vector<double> num;
vector<char> op;
string temp;
for(int i=0;i<expr.size();i++)
{
char c=expr[i];
if((c>='0'&&c<='9')||c=='.')temp+=c;
else if(c=='+')
{
if(!temp.empty())num.push_back(stod(temp));
op.push_back('+');
temp.clear();
}
else if(c=='-')
{
if(i==0||expr[i-1]=='+'||expr[i-1]=='-')temp+=c;
else
{
if(!temp.empty())num.push_back(stod(temp));
op.push_back('-');
temp.clear();
}
}
}
if(!temp.empty())num.push_back(stod(temp));
if(num.empty())return false;
double res=num[0];
for(int i=0;i<op.size();i++)
{
if(i+1>=num.size())break;
if(op[i]=='+')res+=num[i+1];
else res-=num[i+1];
}
stringstream ss;
ss.precision(8);
ss<<expr<<" = "<<res;
outResult="计算结果:"+ss.str();
return true;
}
string getRandom(vector<string>& list)
{
int pos=rand()%list.size();
return list[pos];
}
string chatReply(const string& msg)
{
vector<string> whoami={"我是"+AI_FULL_NAME+",你可以叫我"+AI_SHORT_NAME,"全称TAN白歪,简称小白,支持聊天、加减运算、编译C++代码","小白报到!算术、闲聊、运行C++代码都可以找我"};
vector<string> hello={"你好!今天打算做点什么?","哈喽,很高兴与你交流!","嗨,有什么问题尽管说!"};
vector<string> morning={"早安!新的一天祝你一切顺利","早上好,准备好开启一天了吗?","早!我们可以随便聊聊"};
vector<string> night={"晚安,放下烦恼好好休息","早点休息,祝你一夜好梦","晚安,我们下次再聊"};
vector<string> happy={"太棒啦,真心为你高兴!","听起来真不错,继续保持好心情!","可喜可贺,太开心了!"};
vector<string> sad={"不要难受,我愿意听你倾诉","心情不好就慢慢说出来,我陪着你","烦恼堆积很难受,试着和我说说吧"};
vector<string> thanks={"不用客气,能帮到你就很好","小事一桩,有需求随时提问!","很高兴能够为你提供帮助"};
vector<string> bored={"无聊的话我们随便聊聊天吧","你可以出题考考我算术,也可以让我运行C++代码!","要不要聊聊兴趣爱好?"};
vector<string> bye={"拜拜,期待下次再会!","再见,有空记得再来找我聊天","告辞,祝你万事顺心!"};
vector<string> askfunc={"我支持连续加减运算、日常闲聊、编译运行C++代码。输入runcpp进入代码模式","功能:小数负数加减、对话、在线编译C++。输入runcpp即可编写代码","指令说明:直接输入算式运算;runcpp运行C++;exit退出程序"};
vector<string> unknown={"我没能理解这句话,换种方式描述试试?","抱歉,暂时无法回应这个话题","我还在持续学习,暂时不懂这个问题"};
vector<string> nb={"哥的冷酷零下八度","就是这么牛逼,包的","谢谢夸奖!!"};
if(msg.find("你是谁")!=string::npos||msg.find("名字")!=string::npos)return getRandom(whoami);
if(msg.find("你好")!=string::npos||msg.find("哈喽")!=string::npos||msg.find("hi")!=string::npos||msg.find("hello")!=string::npos)return getRandom(hello);
if(msg.find("早安")!=string::npos||msg.find("早上好")!=string::npos)return getRandom(morning);
if(msg.find("难过")!=string::npos||msg.find("伤心")!=string::npos||msg.find("不开心")!=string::npos)return getRandom(sad);
if(msg.find("晚安")!=string::npos)return getRandom(night);
if(msg.find("开心")!=string::npos||msg.find("高兴")!=string::npos||msg.find("快乐")!=string::npos)return getRandom(happy);
if(msg.find("谢谢")!=string::npos||msg.find("多谢")!=string::npos)return getRandom(thanks);
if(msg.find("无聊")!=string::npos)return getRandom(bored);
if(msg.find("再见")!=string::npos||msg.find("拜拜")!=string::npos)return getRandom(bye);
if(msg.find("能干什么")!=string::npos||msg.find("功能")!=string::npos)return getRandom(askfunc);
if(msg.find("牛逼")!=string::npos||msg.find("厉害")!=string::npos||msg.find("不愧是")!=string::npos)return getRandom(nb);
return getRandom(unknown);
}
void compileAndRunCpp()
{
slowPrint("=== C++代码输入模式启动 ===");
slowPrint("逐行输入代码,输入 end 结束录入");
vector<string> codeLines;
string line;
while(true)
{
cout<<"code>";
getline(cin,line);
if(line=="end")break;
codeLines.push_back(line);
}
ofstream out("temp_code.cpp");
for(auto& s:codeLines)out<<s<<endl;
out.close();
slowPrint("正在调用g++编译代码...");
int compileRet=system("g++ temp_code.cpp -o temp_program.exe");
if(compileRet!=0)
{
slowPrint("编译失败!检查代码语法,确认已配置MinGW环境");
return;
}
slowPrint("编译成功!即将运行程序:");
slowPrint("--------------------------");
system("temp_program.exe");
slowPrint("--------------------------");
slowPrint("程序运行完毕");
system("del temp_code.cpp temp_program.exe");
}
int main()
{
srand((unsigned)time(NULL));
slowPrint("================================================");
slowPrint(AI_SHORT_NAME+"已启动!输入exit退出,输入runcpp运行C++代码");
slowPrint(" 原作者:TanorWhileBai(TB)");
slowPrint(" 如有bug,多多指出");
slowPrint("================================================");
slowPrint("给孩子点个赞吧!!想冲榜十!!!");
string input;
while(true)
{
cout<<">";
getline(cin,input);
if(input=="78916713")
{
slowPrint("恶搞模式开启");
slowPrint("此模式仅折磨朋友用,被骂TB概不负责!");
RE();
continue;
}
if(input=="网站查询")
{
slowPrint("网站模式开启");
slowPrint("此模式鸣谢プログラミングの神(编程之神)、百大游戏解说官、id5100255");
wz(1);
continue;
}
if(input=="exit"||input=="quit")
{
slowPrint("再见!如有不足,多多见谅。\n点个赞吧,如果可以帮助更新的话非常感谢!!");
break;
}
if(input=="runcpp")
{
compileAndRunCpp();
continue;
}
string reply = chatReply(input);
if (reply.find("我没能理解") == string::npos &&reply.find("暂时无法回应") == string::npos && reply.find("还在持续学习") == string::npos)
{
slowPrint(reply);
continue;
}
string calcRes;
if(tryCalc(input,calcRes))
{
slowPrint(calcRes);
continue;
}
slowPrint(reply);
}
return 0;
}
全部评论 24
- 置顶
PRINT_DELAY_MS此变量为等待时间变量,可自行修改,单位毫秒
2026-07-29 来自 浙江
0 轻松绷住
2026-07-29 来自 上海
2


2026-07-29 来自 浙江
0
2026-07-29 来自 上海
0所以绷点在哪
2026-07-29 来自 浙江
0
可以加一点提示词
2026-07-29 来自 浙江
1注意到没骂人,可以听取
2026-07-29 来自 浙江
1cout<<"输入"<<" "<<"78916713"<<" "<<"开启恶搞模式"<<endl; cout<<"输入"<<" "<<"网站查询"<<" "<<"开启网站模式"<<endl; cout<<"输入"<<" "<<"runcpp"<<" "<<"开启代码模式"<<endl;2026-07-29 来自 浙江
1
if(p=="结束") return ; else if(p=="PCL") slowPrint("https://pcl2.xiangdao.pro/"); else if(p=="mcjs") slowPrint("https://mcjs.cc/"); else if(p=="你画我猜") slowPrint("https://enazo.cn/"); else if(p=="马里奥") slowPrint("https://supermarioplay.com/cn"); else if(p=="打字") slowPrint("https://www.acgo.cn/discuss/rest/www.daziba.cn/zflx/zflx1.aspx "); else if(p=="b站") slowPrint("https://www.bilibili.com"); else if(p=="百度") slowPrint("https://www.baidu.com"); else if(p=="抖音") slowPrint("https://www.douyin.com"); else if(p=="洛谷") slowPrint("https://www.luogu.com.cn/"); else if(p=="共创世界") slowPrint("https://www.ccw.site/"); else if(p=="poki"||p=="Poki"||p=="POKI") slowPrint("https://poki.com/"); else if(p=="千问") slowPrint("https://qianwen.com/"); else if(p=="豆包") slowPrint("https://doubao.com/"); else if(p=="元宝") slowPrint("https://yuanbao.com/"); else if(p=="florr") slowPrint("https://florr.io/"); else if(p=="小恐龙") slowPrint("https://chromedino.com/"); else if(p=="cps") slowPrint("https://www.arealme.com/click-speed-test/cn/#google_vignette"); else if(p=="mc") slowPrint("https://ws.imc.re"); else slowPrint("抱歉,未查找到关于此网站任何内容。\n请检查是否打错,也可能是小白Ai未收录。如果可以,请帮忙更新!!感谢!!");2026-07-29 来自 浙江
1顶顶顶,不要沉下去啊
2026-07-30 来自 浙江
0保持灌水贴第一位
2026-07-30 来自 浙江
0dd
2026-07-30 来自 浙江
0d
2026-07-30 来自 浙江
0dd
2026-07-29 来自 浙江
0d
2026-07-29 来自 浙江
0d
2026-07-29 来自 浙江
0d
2026-07-29 来自 浙江
0dd
2026-07-29 来自 浙江
0d'd'dddd
2026-07-29 来自 浙江
0d
2026-07-29 来自 浙江
0d
2026-07-29 来自 浙江
0优化了开始时得等一个个输出=号
cout<<"================================================\n"; slowPrint(AI_SHORT_NAME+"已启动!输入exit退出,输入runcpp运行C++代码"); cout<<" "; slowPrint("原作者:TanorWhileBai(TB)"); cout<<" "; slowPrint("如有bug,多多指出"); cout<<"================================================\n"; slowPrint("给孩子点个赞吧!!想冲榜三!!!"); 原代码在int main 开头,替换即可2026-07-29 来自 浙江
0能输入这个代码吗
#include <bits/stdc++.h> using namespace std; const int N=2e5+5; vector<int>adj[N]; bool vis[N]; int n,m,cnt,ans=0; void dfs(int u){ vis[u]=true; cnt++; for(int v:adj[u]){ if(!vis[v]){ dfs(v); } } } int main(){ ios_base::sync_with_stdio(0); cin.tie(0); if(!(cin>>n>>m)) return 0; for(int i=0;i<m;i++){ int u,v;cin>>u>>v; adj[u].push_back(v); adj[v].push_back(u); } for(int i=1;i<=n;i++){ if(!vis[i]){ cnt=0; dfs(i); ans=max(ans,cnt); } } cout<<ans<<endl; return 0; }2026-07-29 来自 浙江
0我试了但他报错
2026-07-29 来自 浙江
0没有stdc++11功能,编译代码的运行器版本太老了
2026-07-30 来自 浙江
0
牛
2026-07-29 来自 浙江
0初始界面可以再优化
2026-07-29 来自 浙江
0































有帮助,赞一个