Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
117095 wwww 买卖股票的最佳时机II C++ 编译错误 0 0 MS 0 KB 2286 2023-12-22 10:34:08

Tests(0/0):


#include<iostream> #include<windows.h> using namespace std; void Color(int a) { if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); if(a==1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE); if(a==2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN); if(a==3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE); if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED); if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN); if(a==6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE); if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN); if(a==8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); if(a==9) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|BACKGROUND_INTENSITY|BACKGROUND_RED); if(a==10) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE|BACKGROUND_INTENSITY|BACKGROUND_BLUE); } void Print(int b) { if(b==1)cout<<" --- _ "<<endl<<"/| >| | "<<endl<<" -== "<<endl<<" | "<<endl<<" === "<<endl; if(b==2)cout<<" +++++ "<<endl<<"+|> <|+ "<<endl<<" +===+ "<<endl<<" <|> "<<endl<<" |/ "<<endl; if(b==3)cout<<" ===== "<<endl<<" = o o= "<<endl<<"== ="<<endl<<" === = "<<endl<<" ===== "<<endl; if(b==5)cout<<" ||| "<<endl<<"= === = "<<endl<<"=== - -= "<<endl<<" = o= "<<endl<<" ===== "<<endl; if(b==6)cout<<" _=/=--_ "<<endl<<"| |- >| |"<<endl<<" -==- "<<endl<<" | "<<endl<<" ==== "<<endl; if(b==7)cout<<" /===\_ "<<endl<<" | | -|+|"<<endl<<" - == "<<endl<<" | "<<endl<<" ==== "<<endl; } int main() { int a,b; while(a!=-1) { cin>>a>>b; Color(a); Print(b); Color(0); } return 0; }


测评信息: