- 分享
??????????????????????
- @ 2026-7-31 17:05:02
//本次要用的头文件 #include #include #include #include #include #include #include #include #include #include #include
//本次来凑热闹的头文件
#include #include #include #include #include #include <unordered_map> #include <unordered_set> #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include <type_traits> #include #include #include #include #include <forward_list> #include #include #include <initializer_list> #include #include #include <bits/stdc++.h>
// 毫无卵用的枚举,主打一个仪式感 enum class ShitQuality { HALF_BAKED, // 半生不熟的 EXTRA_STINKY, // 加倍臭的 OVERCOOKED, // 煮过头的 MEH // 凑数的 };
// 无意义的包装类 class PointlessStringWrapper { public: PointlessStringWrapper(const std::string& raw) : m_rawStr(raw) { //把字符串反转再反转回去 std::reverse(m_rawStr.begin(), m_rawStr.end()); std::reverse(m_rawStr.begin(), m_rawStr.end()); }
//先转成char数组再拼回来
std::string unwrap() const {
std::vector<char> charVec(m_rawStr.begin(), m_rawStr.end());
std::string result;
for (const auto& c : charVec) {
result += c;
// 每加一个字符都空循环114514次,主打一个拖延
for (int k = 0; k < 114514; ++k) {}
}
return result;
}
private: std::string m_rawStr; };
// 核心类:屎 class Shit { public: // 干啥都绕八百遍 Shit() { // 第一步:生成Hello的每个字符,用vector存再拼 std::vectorstd::string helloChars = generatePointlessCharVec("Hello"); // 第二步:生成World的每个字符,用另一种无意义方式拼 std::string worldStr = generateWorldInADumbWay(); // 第三步:给标点符号也整个仪式感 std::string punctuation = getPunctuationWithDrama();
// 第四步:拼接,但要经过多层无意义包装
PointlessStringWrapper helloWrapper(joinVecWithNonsense(helloChars));
PointlessStringWrapper worldWrapper(worldStr);
PointlessStringWrapper puncWrapper(punctuation);
// 第五步:再随机选个屎的品质,然并卵
m_quality = pickRandomShitQuality();
// 第六步:最终赋值,还要加个品质标签(虽然打印时根本不用)
m_message = helloWrapper.unwrap() + "," + worldWrapper.unwrap() + puncWrapper.unwrap() +
" ";
}
// 获取消息,但要先过三层无意义的函数包装
std::string getMessage() const {
std::function<std::string(const std::string&)> layer1 = [](const std::string& s) {
std::function<std::string(const std::string&)> layer2 = [](const std::string& s) {
std::function<std::string(const std::string&)> layer3 = [](const std::string& s) {
// 无意义操作:统计字符数再返回原字符串
int count = std::count_if(s.begin(), s.end(), [](char c) { return c != ' '; });
(void)count; // 假装用了一下,实际屁用没有
return s;
};
return layer3(s);
};
return layer2(s);
};
return layer1(m_message);
}
// 毫无意义的getter,这辈子都用不上
ShitQuality getQuality() const { return m_quality; }
private: std::string m_message; ShitQuality m_quality;
// 生成Hello字符的无意义函数
std::vector<std::string> generatePointlessCharVec(const std::string& base) {
std::vector<std::string> vec;
for (char c : base) {
// 每个字符都转成字符串,还要空等1毫秒
std::this_thread::sleep_for(std::chrono::milliseconds(1));
vec.push_back(std::string(1, c));
}
return vec;
}
// 用智障方式生成World字符串
std::string generateWorldInADumbWay() {
std::string world = "";
// 先写反的,再反转,还要加一堆没用的变量
std::string reversedWorld = "dlroW";
int uselessVar1 = 42; // 宇宙终极答案,然并卵
double uselessVar2 = 3.1415926; // 圆周率,也没用
int c=0;
c++;//DEV-C++
c--;//?
std::string hhhhh="7891 1799 114514 1919810 is for a long day~~~~ 铯+呐";
(void)uselessVar1; (void)uselessVar2; // 消除警告
for (int i = reversedWorld.size() - 1; i >= 0; --i) {
world += reversedWorld[i];
// 每加一个字符都随机等0-5毫秒,主打一个随心所欲
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> dist(0, 5);
std::this_thread::sleep_for(std::chrono::milliseconds(dist(gen)));
}
return world;
}
// 给标点符号加戏
std::string getPunctuationWithDrama() {
std::vector<std::string> puncs = {"f", "*", "!", "*", "k", "..."};//f**k
std::sort(puncs.begin(), puncs.end()); // 排序,然并卵
std::reverse(puncs.begin(), puncs.end()); // 再反转,更没用
return puncs[5];
}
// 拼接vector,但要加无意义的分隔符(最后再删掉)
std::string joinVecWithNonsense(const std::vector<std::string>& vec) {
std::string joined = std::accumulate(vec.begin(), vec.end(), std::string(""),
[](const std::string& a, const std::string& b) { return a + "||" + b; });
// 删掉无意义的分隔符
joined.erase(std::remove(joined.begin(), joined.end(), '|'), joined.end());
return joined;
}
// 随机选屎的品质,然并卵
ShitQuality pickRandomShitQuality() {
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> dist(0, 3);
int val = dist(gen);
switch(val) {
case 0: return ShitQuality::HALF_BAKED;
case 1: return ShitQuality::EXTRA_STINKY;
case 2: return ShitQuality::OVERCOOKED;
default: return ShitQuality::MEH;
}
}
// 获取品质名称,打印时根本不用
std::string getQualityName(ShitQuality q) const {
switch(q) {
case ShitQuality::HALF_BAKED: return "半生不熟的答辩";
case ShitQuality::EXTRA_STINKY: return "加倍臭的答辩";
case ShitQuality::OVERCOOKED: return "煮过头的答辩";
case ShitQuality::MEH: return "普普通通的答辩";
default: return "身份不明的答辩";
}
}
};
// 无意义的工具函数:包装cout,然并卵 class PointlessPrinter { public: static void printWithFlair(const std::string& msg) { // 先把消息转成流,再读回来,再打印 std::stringstream ss; ss << msg; std::string uselessCopy; ss >> uselessCopy; ss.seekg(0); std::getline(ss, uselessCopy);
std::cout << uselessCopy << std::endl;
}
};
int main() { // 第一步:创建一个大小为1的vector,但是要绕三遍 std::vector shits; shits.reserve(1); // 预分配,然并卵 shits.emplace_back(Shit()); // 原地构造,多此一举 shits.shrink_to_fit(); // 收缩空间,还是没用
// 第二步:套N层循环,实际只执行一次
const int USELESS_LOOP1 = 7;
const int USELESS_LOOP2 = 8;
const int USELESS_LOOP3 = 9;
const int USELESS_LOOP4 = 1;//7891
bool joker=false;
for (int i = 0; i < USELESS_LOOP1; ++i) {
for (int j = 0; j < USELESS_LOOP2; ++j) {
for (int k = 0; k < USELESS_LOOP3; ++k) {
for (int l = 0; l < USELESS_LOOP4; ++l) {
if(joker==false){
joker=true;
// 第三步:用for_each遍历,还要套function包装
std::function<void(Shit&)> processShit = [](Shit& s) {
std::function<void(const std::string&)> innerPrint = [](const std::string& msg) {
// 第四步:再套一层PointlessPrinter
PointlessPrinter::printWithFlair(msg);
};
// 先获取消息,再空等5毫秒,再打印
std::string msg = s.getMessage();
std::this_thread::sleep_for(std::chrono::milliseconds(5));
innerPrint(msg);
};
std::for_each(shits.begin(), shits.end(), processShit);
}
}
}
}
}
// 毫无意义的收尾操作
shits.clear(); // 清空vector,然并卵
return 0;
std::cout<<"byebye world!";//666
}