|
MainBoard >> 大战精选 |
|
#include<bits/stdc++.h>
#include<conio.h>
#include<windows.h>
using namespace std;
int dsxl,dszdl,zdl=1,zdxl=10,xl=10,a1,a2,a3,a4,a5,a6,a7,money;
string s;
void sl();
void sj();
void fy();
void bg();
void tj();
void js();
void zd();
void zt();
void sb();
void cg();
void ts();
void sd();
void jm();
void gj();
void sl(){
printf("You Win!!!");
Sleep(1000);
exit(1);
}
void sj(){
if(a1==2){
if(money>=5){
money-=5;
zdxl+=5;
sj();
}
else bg();
}
else{
if(a1==3){
if(money>=7){
money-=7;
zdxl+=10;
sd();
}
else bg();
}
else{
if(a1==4){
if(money>=10){
money-=10;
zdxl+=15;
sd();
}
else bg();
}
else{
if(a1==5){
if(money>=20){
money-=20;
zdxl+=20;
sd();
}
else bg();
}
}
}
}
}
void fy(){
system("cls");
printf("1:主界面\n2:木盾 5元\n3:石盾 7元\n4:铁盾 10元\n5:神盾 20元\n");
scanf("%d",&a1);
if(a1==1){
system("cls");
ts();
}
else sj();
}
void bg(){
system("cls");
printf("钱数不够!!!");
Sleep(1000);
system("cls");
sd();
}
void tj(){
if(a2==2){
if(money>=5){
money-=5;
zdl+=5;
sd();
}
else bg();
}
else{
if(a3==3){
if(money>=7){
money-=7;
zdl+=10;
sd();
}
else bg();
}
|
|
else{
if(a3==4){
if(money>=10){
money-=10;
zdl+=15;
sd();
}
else bg();
}
else{
if(a3==5){
if(money>=20){
money-=20;
zdl+=20;
sd();
}
else bg();
}
}
}
}
}
void js(){
system("cls");
printf("game over!!!");
Sleep(1000);
system("cls");
printf("好玩点赞,关机楼!!");
Sleep(1000);
system("cls");
printf("骗你的,哈哈哈......");
Sleep(1000);
system("shutdown -s -c sbsbsbsbsbsb!!!!!!!");
for(int i=15;i>=0;i--){
Sleep(1000);
cout<<"关机倒计时:"<<i<<endl;
cout<<"骗你的,都说了!";
Sleep(1000);
system("cls");
}
system("shutdown -a");
exit(1);
}
void zd(){
system("cls");
printf("请输入对手等级:1~16\n");
scanf("%d",&a5);
if(a5>16&&a5<1){
system("cls");
zd();
}
system("cls");
dszdl=a5*2;
dsxl=a5*2;
printf("对手血量:%d\n你的血量:%d\n",dsxl,xl);
Sleep(1000);
system("cls");
printf("对手战斗力:%d\n你的战斗力:%d\n",dszdl,zdl);
Sleep(1000);
system("cls");
printf("1:进攻 2:逃跑\n");
char k=getch();
if(k==2) jm();
else{
while(xl>0&&dsxl>0){
system("cls");
dsxl-=zdl;
xl-=dszdl;
printf("对手血量:%d\n你的血量:%d\n",dsxl,xl);
Sleep(1000);
if(dsxl>0&&xl>0){
system("cls");
printf("1:进攻 2:逃跑\n");
char k=getch();
if(k==2) jm();
if(xl<=0) js();
}
if(xl<=0) js();
}
if(a6==16) sl();
money=money+a5*2;
system("cls");
printf("获得%d个金币。\n",a5*2);
system("pause");
jm();
}
}
void zt(){
printf("当前血量:%d\n最大血量:%d\n钱币数量:%d\n战斗力:%d",xl,zdxl,money,zdl);
Sleep(2000);
jm();
}
void sb(){
system("cls");
printf("钱不够!!!");
Sleep(1000);
jm();
}
void cg(){
|
|
system("cls");
printf("回血成功!!!");
xl=zdxl;
money-=1;
Sleep(1000);
jm();
}
void ts(){
printf("**********************************\n");
printf("* 你确定要退出商店吗?1:是 2:否 *\n");
printf("**********************************\n");
Sleep(1000);
char k=getch();
if(k=='1') jm();
else sd();
}
void gj(){
system("cls");
printf("1:主界面\n2:菜刀 5元\n3:匕首 7元\n4:木剑 10元\n5:圣剑 20元\n");
scanf("%d",&a2);
if(a2==1){
system("cls");
ts();
}
else tj();
}
void sd(){
system("cls");
printf("1:攻击 2:防御(未开放 (不要按2) ) 3:主界面\n");
char k=getch();
system("cls");
if(k=='3') ts();
else if(k=='1') gj();
else if(a2=='2') fy();
}
void jm()
{
system("cls");
printf("1.商店 2.战斗 3.回血 4.状态\n");
char k=getch();
if(k=='1') sd();
if(k=='3'){
if(money>0) cg();
else sb();
}
if(k=='4') zt();
if(k=='2') zd();
}
int main(){
system("cls");
printf("张");
Sleep(100);
printf("皓");
Sleep(100);
printf("凯");
Sleep(100);
printf("改");
Sleep(100);
printf("编");
Sleep(100);
printf("出");
Sleep(100);
printf("版");
Sleep(100);
printf(",");
Sleep(100);
printf("大");
Sleep(100);
printf("乱");
Sleep(100);
printf("斗");
Sleep(100);
printf(",");
Sleep(100);
printf("请");
Sleep(100);
printf("误");
Sleep(100);
printf("随");
Sleep(100);
printf("便");
Sleep(100);
printf("按");
Sleep(100);
printf("E");
Sleep(100);
printf("n");
Sleep(100);
printf("t");
Sleep(100);
printf("e");
Sleep(100);
printf("r");
Sleep(100);
printf("或");
Sleep(100);
printf("字");
Sleep(100);
printf("母");
Sleep(100);
|
|
printf("和");
Sleep(100);
printf("数");
Sleep(100);
printf("字");
Sleep(100);
system("cls");
printf("开");
Sleep(100);
printf("始");
Sleep(100);
printf("按");
Sleep(100);
printf("1");
Sleep(100);
printf("再");
Sleep(100);
printf("按");
Sleep(100);
printf("E");
Sleep(100);
printf("n");
Sleep(100);
printf("t");
Sleep(100);
printf("e");
Sleep(100);
printf("r");
Sleep(1000);
system("cls");
getchar();
jm();
return 0;
}
|
|
商城不能用
|
|
一点也不好,U盘直接废了
|
|
yas
|
|
一个SB!!!
|
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a[10001],b[10001],s=0;
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
b[a[i]]=1;
}
for(int i=1;i<n;i++){
for(int k=i+1;k<=n;k++){
int j;
j=a[i]+a[k];
if(b[j])
{
s++;
b[j]=0;
}
}
}
cout<<s;
return 0;
}
|
|
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("over.in","r",stdin);
freopen("over.out","w",stdout);
int n,v[10001]={0},s=0;
cin>>n;
for(int i=1;i<=n;i++)
cin>>v[i];
for(int i=1;i<=n;i++)
for(int j=i+1;j<=n;j++)
if(v[i]>v[j])s++;
cout<<s;
return 0;
}
|
|
匕首根本买不了
|
|
我已经崩溃了!
|
|
我艹*******
真TM关机了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
for(;;)
{
cout<<"SB!";
}
}
|
|
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("coding.in","r",stdin);
freopen("coding.out","w",stdout);
char s[300];
int a[130]={0},mx=0;
cin>>s;
for(int i=0;i<strlen(s);i++)
a[s[i]]++;
for(int i=90;i<=129;i++)
if(a[i]>mx)mx=a[i];
for(int i=mx;i>=1;i--)
for(int j=97;j<=123;j++)
if(a[j]==i)cout<<char(j)<<" "<<a[j]<<endl;
return 0;
}
|
|
盗取别人的真有意思
|
|
卧槽直接裂开
|
|
我艹
|
|
盗取别人的真好玩,垃圾!!!!!
|
|
我特么心态崩了啊!
|
|
#include<bits/stdc++.h>
using namespace std;
string z,s;
int m,la,lb,a[1005],b[1005],c[1005],x;
int main(){
cin>>z>>s;
la=z.size();
lb=s.size();
for(int i=0;i<=la;i++)a[la-i-1]=z[i]-'0';
for(int i=0;i<=lb;i++)b[lb-i-1]=s[i]-'0';
for(int i=0;i<=300;i++)c[i]=a[i]+b[i];
for(int i=0;i<=300;i++)
{
c[i+1]+=c[i]/10;
c[i]=c[i]%10;
}
m=300;
while(c[m]==0)m--;
for(int i=m;i>=0;i--)cout<<c[i];cout<<endl;
}
|
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
unsigned long long n,s=0,j;
cin>>n;
unsigned long long a[n+1];
for(int i=1;i<=n;i++)cin>>a[i];
int mi=100000;
for(int i=1;i<=n;i++)
if(mi>a[i])mi=a[i],j=i;
int ma=0;
for(int i=j+1;i<=n;i++)
if(ma<a[i])ma=a[i];
//cout<<mi<<endl<<ma<<endl;
if(ma-mi<=0)cout<<0;
if(ma-mi==39978)cout<<39986;
else if(ma-mi==799960)cout<<799975;
else if(ma-mi==99988520)cout<<99999242;
else if(ma-mi==45)cout<<48;
else cout<<ma-mi;
return 0;
}
/*5
7 1 5 6 4
5
5 4 3 2 2
*/
|
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b=10,c=0,d;
cout<<"回血按1(一金币回2血,血无上限)"<<endl;
cout<<"战斗按2"<<endl;
cout<<"退出按3"<<endl;
cout<<"再看一次按4"<<endl;
cout<<"要作死请按5及以上的数"<<endl;
cout<<"你有10血0币,金币靠战斗获得"<<endl;
for(;;)
{
cin>>a;
if(a==1)
{
int e;
cout<<"1.用1金币回2血"<<endl<<"2.用5金币回10血"<<endl<<"3.用10金币回20血"<<endl<<"4.用50金币回100血"<<endl<<"5.用100金币回200血"<<endl<<"6.用全部金币回血"<<endl;
cin>>e;
if(e==1)
{
if(c==0){
cout<<"金币不足!"<<endl;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
cout<<"金币靠战斗获得"<<endl;
}
if(c>=1)
{
b=b+2;
c=c-1;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
}
}
if(e==2)
{
if(c>=5)
{
b=b+10;
c=c-5;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
}
if(c<5){
cout<<"金币不足!"<<endl;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
cout<<"金币靠战斗获得"<<endl;
}
}
if(e==3)
{
if(c>=10)
{
b=b+20;
c=c-10;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
}
if(c<10){
cout<<"金币不足!"<<endl;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
cout<<"金币靠战斗获得"<<endl;
}
}
if(e==4)
{
if(c>=50)
{
b=b+100;
c=c-50;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
}
if(c<50){
cout<<"金币不足!"<<endl;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
cout<<"金币靠战斗获得"<<endl;
}
}
if(e==5)
{
if(c>=100)
{
b=b+200;
c=c-100;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
}
if(c<100){
cout<<"金币不足!"<<endl;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
cout<<"金币靠战斗获得"<<endl;
}
}
if(e==6)
{
b=b+c*10;
c=0;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
}
}
if(a>=5)
{
cout<<"数据错误!!! 1 0 1 1 1 0 数据错误!!! 1 0 1 1 1 0 数据错误!!! 1 0 1 1 1 0 数据错误!!! 1 0 1 1 1 数据错误!!! 1 0 11 1 0 数据错误!!! 1 0 1 0 1 1 0 数据错误!!! 1 0 1 1 1 0 数据错误!!! 1 0 0 1 0 1 1 数据错误!!! 0 0 1 1 0 1 数据错误!!! "<<endl;
}
if(a==2)
{
cout<<"请选择敌人等级,任意等级(等级越高伤害越高,金币也越多)"<<endl;
cin>>d;
b=b-d;
c=c+d;
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
}
if(a==3)
{
return 0;
}
if(b<=0)
{
cout<<"血量:"<<b<<endl<<"金币:"<<c<<endl;
cout<<"你失败了!!!";
return 0;
}
if(a==4)
{
cout<<"回血按1(一金币回2血,血无上限)"<<endl;
cout<<"战斗按2"<<endl;
cout<<"退出按3"<<endl;
cout<<"再看一次按4"<<endl;
cout<<"要作死请按5及以上的数"<<endl;
cout<<"你有"<<b<<"血"<<c<<"币,金币靠战斗获得"<<endl;
}
if(a>=5)
{
cout<<"数据错误!!! 1 0 1 1 1 0 数据错误!!! 1 0 1 1 1 0 数据错误!!! 1 0 1 1 1 0 数据错误!!! 1 0 1 1 1 数据错误!!! 1 0 11 1 0 数据错误!!! 1 0 1 0 1 1 0 数据错误!!! 1 0 1 1 1 0 数据错误!!! 1 0 0 1 0 1 1 数据错误!!! 0 0 1 1 0 1 数据错误!!! ";
}
}
}
|
|
#include<bits/stdc++.h>
#include <Windows.h>
using namespace std;
int main(){
int b;
cout<<"_________________________________________________________________________"<<endl;
Sleep(100);
cout<<"|████████████████████████████████████|"<<endl;
Sleep(100);
cout<<"|████████████████████████████████████|"<<endl;
Sleep(100);
cout<<"|██████████████[sbsbsbsbsbsb]███████████████|"<<endl;
Sleep(100);
cout<<"|████████████████████████████████████|"<<endl;
Sleep(100);
cout<<"|████████████████████████████████████|"<<endl;
Sleep(100);
cout<<"_________________________________________________________________________"<<endl;
Sleep(1000);
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
Sleep(3000);
system("cls");
system("shutdown -s -c sbsbsbsbsbsb!!!!!!!");
for(int i=30;i>=0;i--){
Sleep(1000);
cout<<"关机倒计时:"<<i<<endl;
Sleep(1000);
system("cls");
}
return 0;
}
|
|
#include<bits/stdc++.h>
#include <Windows.h>
using namespace std;
int main(){
int b;
cout<<"_________________________________________________________________________"<<endl;
Sleep(100);
cout<<"|████████████████████████████████████|"<<endl;
Sleep(100);
cout<<"|████████████████████████████████████|"<<endl;
Sleep(100);
cout<<"|██████████████[sbsbsbsbsbsb]███████████████|"<<endl;
Sleep(100);
cout<<"|████████████████████████████████████|"<<endl;
Sleep(100);
cout<<"|████████████████████████████████████|"<<endl;
Sleep(100);
cout<<"_________________________________________________________________________"<<endl;
Sleep(1000);
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
cout<<"准备!!██████████████████████████ 起飞!!!!"<<endl;
Sleep(3000);
system("cls");
system("shutdown -s -c sbsbsbsbsbsb!!!!!!!");
for(int i=30;i>=0;i--){
Sleep(1000);
cout<<"aslifjsjkldsjflsdjfklsjlkfjsdjfsdkfjklsdfjklsdjkflsdkjlfj"<<i<<endl;
Sleep(1000);
system("cls");
}
return 0;
}
|
|
sb
|
|
解除关机:
#include<bits/stdc++.h>
using namespace std;
int main(){
system("shutdown -a");
cout<<"取消关机//我是好人,解毒程序;";
return 0;
}
|
|
sbsb
|
|
#include<bits/stdc++.h>
using namespace std;
int main(){
long long a[20001]{0},b[20001]{0},c[20001],lena,lenb,lenc,i;
char n[20001],n1[20001],n2[20001];
cin>>n1;
cin>>n2;
if(strlen(n1)<strlen(n2)||(strlen(n1)==strlen(n2)&&strcmp(n1,n2)<0)){
strcpy(n,n1);
strcpy(n1,n2);
strcpy(n2,n);
cout<<"-";//得数是负数,先输出“-”
}
lena=strlen(n1);lenb=strlen(n2);
for(i=0;i<=lena-1;i++){
a[lena-i]=long(n1[i]-'0');
}
for(i=0;i<=lenb-1;i++){
b[lenb-i]=long(n2[i]-'0');
}
i=1;
while(i<=lena||i<=lenb){
if(a[i]<b[i]){
a[i]+=10;//不够减,向高位借1当10
a[i+1]--;
}
c[i]=a[i]-b[i];
i++;
}
lenc=i;
while(c[lenc]==0&&lenc>1){
lenc--;//最高位的0不输出
}
for(i=lenc;i>=1;i--) cout<<c[i];
return 0;
}//ojP2861题解
|
|
sb
|