想问一下大佬们,为什么只有40分...

P1089 [NOIP2004 提高组] 津津的储蓄计划

@[aleidejiafane](/user/596295) 发下提交记录
by fengziyi @ 2022-08-27 13:46:46


我好像不会发欸(我等会研究一下),我是2 3 5 7 9 10没过,应该是存款>0的样例都没过吧。
by aleidejiafane @ 2022-08-27 13:52:54


您这题样例二都没过...
by tbdsh @ 2022-08-27 14:06:11


献出一个半完成的游戏 ``` #include<iostream> #include<cstdio> #include<cstdlib> #include<bits/stdc++.h> #include<windows.h> using namespace std; int main(){ int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0; int tsz=1,wj,qian=9999999,jilu; srand(time(0)); while(tsz=1){ cout<<" 我的金币"<<qian<<endl; cout<<"1.普通商店"<<endl<<"2.高级商店"<<endl<<"3.狗头查看"<<endl<<"4.我的狗头"<<endl; cin>>wj; system("cls"); printf("请稍后"); printf("."); Sleep(750); printf("."); Sleep(750); printf("."); Sleep(1250); system("cls"); printf("请稍后"); printf("."); Sleep(750); printf("."); Sleep(750); printf("."); Sleep(1500); system("cls"); if(wj==1){ cout<<"1.普通卡包(10元)"<<endl<<"2.白银卡包(50元)"<<endl<<"3.黄金卡包(150元)"<<endl<<"4.钻石卡包(250元)"<<endl<<"输入0退出"; cin>>wj; system("cls"); if(wj==1){ if(qian>=10){ jilu=rand()%2; if(jilu==0){ if(a==0){ qian-=10; cout<<"获得无耳狗头"; a=1; } else{ cout<<"你抽到过了"; } } else if(jilu==1){ if(b==0){ qian-=10; cout<<"获得普通狗头"; b=1; } else{ cout<<"你抽到过了"; } } Sleep(5000); system("cls"); } else{ cout<<"你钱不够"; } } else if(wj==2){ if(qian>=50){ jilu=rand()%5; if(jilu==0){ if(c==0){ qian-=50; cout<<"获得磁铁狗头"; c=1; } else{ cout<<"你抽到过了"; } } else if(jilu==1){ if(d==0){ qian-=50; cout<<"获得汤圆狗头"; d=1; } else{ cout<<"你抽到过了"; } } else if(jilu==2){ if(e==0){ qian-=50; cout<<"获得大树狗头"; e=1; } else{ cout<<"你抽到过了"; } } else if(jilu==3){ if(f==0){ qian-=50; cout<<"获得石头狗头"; f=1; } else{ cout<<"你抽到过了"; } } else if(jilu==4){ if(g==0){ qian-=50; cout<<"获得铁狗头"; g=1; } else{ cout<<"你抽到过了"; } } } else{ cout<<"你钱不够"; } Sleep(5000); system("cls"); } else if(wj==3){ if(qian>=150){ jilu=rand()%5; if(jilu==0){ if(h==0){ qian-=150; cout<<"获得射手狗头"; h=1; } else{ cout<<"你抽到过了"; } } else if(jilu==3){ if(i==0){ qian-=150; cout<<"获得树林狗头"; i=1; } else{ cout<<"你抽到过了"; } } else if(jilu==2){ if(j==0){ qian-=150; cout<<"获得老八狗头"; j=1; } else{ cout<<"你抽到过了"; } } else if(jilu==3){ if(k==0){ qian-=150; cout<<"获得科技狗头"; k=1; } else{ cout<<"你抽到过了"; } } else if(jilu==4){ if(l==0){ qian-=150; cout<<"获得小科技狗头"; l=1; } else{ cout<<"你抽到过了"; } } } Sleep(5000); system("cls"); } else if(wj==4){ if(qian>=250){ jilu=rand()%6; if(jilu==0){ if(m==0){ qian-=250; cout<<"获得森林狗头"; m=1; } else{ cout<<"你抽到过了"; } } else if(jilu==1){ if(n==0){ qian-=250; cout<<"获得射手(2级)狗头"; n=1; } else{ cout<<"你抽到过了"; } } else if(jilu==2){ if(o==0){ qian-=250; cout<<"获得法师(1级)狗头"; o=1; } else{ cout<<"你抽到过了"; } } else if(jilu==3){ if(p==0){ qian-=250; cout<<"获得机枪狗头"; p=1; } else{ cout<<"你抽到过了"; } } else if(jilu==4){ if(q==0){ qian-=250; cout<<"获得指令狗头"; q=1; } else{ cout<<"你抽到过了"; } } else if(jilu==5){ if(r==0){ qian-=250; cout<<"获得神农狗头"; r=1; } else{ cout<<"你抽到过了"; } } } else{ cout<<"你钱不够"; } Sleep(5000); system("cls"); } } else if(wj==2){ cout<<"1.普钻卡包(500元)"<<endl<<"2.银钻卡包(1000元)"<<endl<<"3.金钻卡包(1500元)"<<endl<<"4.绝版卡包(3000元)"<<endl<<"5.X卡包(5000元)"<<endl<<"输入0退出"; cin>>wj; system("cls"); if(wj==1){ if(qian>=250){ jilu=rand()%9; if(jilu==0){ //普钻卡包中狗头1代码 } } else{ cout<<"滚开!你个穷鬼!"; } } else if(wj==2){ //银钻卡包代码 } else if(wj==3){ //金钻卡包代码 } else if(wj==4){ //绝版卡包代码 } else if(wj==5){ //X卡包代码 } } else if(wj==3){ cout<<"1.无耳狗头"<<endl; cout<<"2.普通狗头"<<endl; cout<<"3.磁铁狗头"<<endl; cout<<"4.汤圆狗头"<<endl; cout<<"5.大树(1级)狗头"<<endl; cout<<"6.石头狗头"<<endl; cout<<"7.铁狗头"<<endl; cout<<"8.射手(1级)狗头"<<endl; cout<<"9.树林(2级)狗头"<<endl; cout<<"10.老八狗头"<<endl; cout<<"11.科技狗头"<<endl; cout<<"12.小科技狗头"<<endl; cout<<"13.森林(3级)狗头"<<endl; cout<<"14.射手(2级)狗头"<<endl; cout<<"15.法师(1级)狗头"<<endl; cout<<"16.机枪狗头"<<endl; cout<<"17.指令狗头"<<endl; cout<<"18.神农狗头"<<endl; cout<<"19.曹操狗头"<<endl; cout<<"20.法师(2级)狗头"<<endl; cout<<"21.光剑狗头"<<endl; cout<<"22.BF狗头"<<endl; cout<<"23.豌豆狗头"<<endl; cout<<"24.幽灵狗头"<<endl; cout<<"25.火(1级)狗头"<<endl; cout<<"26.水(1级)狗头"<<endl; cout<<"27.sans狗头"<<endl; cout<<"28.船员狗头"<<endl; cout<<"29.RPU狗头"<<endl; cout<<"30.法师(3级)狗头"<<endl; cout<<"31.火(2级)狗头"<<endl; cout<<"32.汽油狗头"<<endl; cout<<"33.水(2级)狗头"<<endl; cout<<"34.内鬼狗头"<<endl; cout<<"35.VID狗头"<<endl; cout<<"36.辐射狗头"<<endl; cout<<"37.水火狗头"<<endl; cout<<"38.SANS狗头"<<endl; cout<<"39.ko狗头"<<endl; cout<<"40.ink sans狗头"<<endl; cout<<"41.洪焰狗头"<<endl; cout<<"42.worry狗头"<<endl; cin>>wj; system("cls"); printf("请稍后"); printf("."); Sleep(750); printf("."); Sleep(750); printf("."); Sleep(1250); system("cls"); printf("请稍后"); printf("."); Sleep(750); printf("."); Sleep(750); printf("."); Sleep(1500); system("cls"); if(wj==1){ cout<<"无耳狗头(N)"<<endl; cout<<"-----------------"<<endl; cout<<"生命100 攻击50"<<endl<<"无技能"<<endl; } if(wj==2){ cout<<"普通狗头(N)"<<endl; cout<<"-----------------"<<endl; cout<<"生命100 攻击50"<<endl<<"无技能"<<endl; } if(wj==3){ cout<<"磁铁狗头(R)"<<endl; cout<<"-----------------"<<endl; cout<<"生命200 攻击100"<<endl<<"引力:对方任意一狗头-50HP"<<endl; } if(wj==4){ cout<<"汤圆狗头(R)"<<endl; cout<<"-----------------"<<endl; cout<<"生命500 攻击200"<<endl<<"汤圆:使对方任意一狗头停止一回合"<<endl; } if(wj==5){ cout<<"大树(1级)狗头(R)"<<endl; cout<<"-----------------"<<endl; cout<<"生命300 攻击200"<<endl<<"大树:停止对方一回合"<<endl; } if(wj==6){ cout<<"石头狗头(R)"<<endl; cout<<"-----------------"<<endl; cout<<"生命200 攻击150"<<endl<<"石墙:造出一个生命500的石墙"<<endl; } if(wj==7){ cout<<"铁狗头(R)"<<endl; cout<<"-----------------"<<endl; cout<<"生命500 攻击400"<<endl<<"铁傀儡:造出生命500攻击200的铁傀儡"<<endl; } if(wj==8){ cout<<"射手(1级)狗头(SR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命700 攻击500"<<endl<<"目标:绝杀对方一位狗头"<<endl; } if(wj==9){ cout<<"树林(2级)狗头(SR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命800 攻击600"<<endl<<"迷雾:停止对方三回合"<<endl; } if(wj==10){ cout<<"老八狗头(SR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命1000 攻击800"<<endl<<"老八:让对方任意一狗头停止一回合"<<endl; } if(wj==11){ cout<<"科技狗头(SR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命1000 攻击1000"<<endl<<"同化:让对方一位狗头变成我方的小科技狗头"<<endl; } if(wj==12){ cout<<"小科技狗头(SR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命750 攻击500"<<endl<<"进化:将自己变成科技狗头"<<endl; } if(wj==13){ cout<<"森林(3级)狗头(SSR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命2500 攻击1250"<<endl<<"迷宫:让对方停止五回合"<<endl; } if(wj==14){ cout<<"射手(2级)狗头(SSR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命1000 攻击1500"<<endl<<"神箭:随机攻击一位狗头-2000HP"<<endl; } if(wj==15){ cout<<"法师(1级)狗头(SSR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命1200 攻击2500"<<endl<<"极限换血:将自己四分之三的血量换成攻击,并将攻击一位狗头(自己的攻击>对手的血量)"<<endl; } if(wj==16){ cout<<"机枪狗头(SSR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命1500 攻击2000"<<endl<<"连击:攻击出上一次的攻击(十次)"<<endl; } if(wj==17){ cout<<"指令狗头(SSR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命100 攻击3000"<<endl<<"指令:自定义"<<endl; } if(wj==18){ cout<<"神农狗头(SSR)"<<endl; cout<<"-----------------"<<endl; cout<<"生命1900 攻击4500"<<endl<<"回家种地:免伤害一次"<<endl; } } else if(wj==4){ if(a==1){ cout<<"无耳狗头"<<endl; } if(b==1){ cout<<"普通狗头"<<endl; } if(c==1){ cout<<"磁铁狗头"<<endl; } if(d==1){ cout<<"汤圆狗头"<<endl; } if(e==1){ cout<<"大树(1级)狗头"<<endl; } if(f==1){ cout<<"石头狗头"<<endl; } if(g==1){ cout<<"铁狗头"<<endl; } if(h==1){ cout<<"射手(1级)狗头"<<endl; } if(i==1){ cout<<"树林(2级)狗头"<<endl; } if(j==1){ cout<<"老八狗头"<<endl; } if(k==1){ cout<<"科技狗头"<<endl; } if(l==1){ cout<<"小科技狗头"<<endl; } if(m==1){ cout<<"森林(3级)狗头"<<endl; } if(n==1){ cout<<"射手(2级)狗头"<<endl; } if(o==1){ cout<<"法师(1级)狗头"<<endl; } if(p==1){ cout<<"机枪狗头"<<endl; } if(q==1){ cout<<"指令狗头"<<endl; } if(r==1){ cout<<"神农狗头"<<endl; } if(s==1){ cout<<"曹操狗头"<<endl; } if(t==1){ cout<<"法师(2级)狗头"<<endl; } if(u==1){ cout<<"光剑狗头"<<endl; } if(v==1){ cout<<"BF狗头"<<endl; } if(w==1){ cout<<"豌豆狗头"<<endl; } if(x==1){ cout<<"幽灵狗头"<<endl; } if(y==1){ cout<<"火(1级)狗头"<<endl; } if(z==1){ cout<<"水(1级)狗头"<<endl; } if(aa==1){ cout<<"sans狗头"<<endl; } if(ab==1){ cout<<"船员狗头"<<endl; } if(ac==1){ cout<<"RPU狗头"<<endl; } if(ad==1){ cout<<"法师(3级)狗头"<<endl; } if(ae==1){ cout<<"火(2级)狗头"<<endl; } if(af==1){ cout<<"汽油狗头"<<endl; } if(ag==1){ cout<<"水(2级)狗头"<<endl; } if(ah==1){ cout<<"内鬼狗头"<<endl; } if(ai==1){ cout<<"VID狗头"<<endl; } if(aj==1){ cout<<"辐射狗头"<<endl; } if(ak==1){ cout<<"水火狗头"<<endl; } if(al==1){ cout<<"SANS狗头"<<endl; } if(am==1){ cout<<"ko狗头"<<endl; } if(an==1){ cout<<"ink sans狗头"<<endl; } if(ao==1){ cout<<"洪焰狗头"<<endl; } if(ap==1){ cout<<"worry狗头"<<endl; } cin>>wj; system("cls"); } } }
by 124578whr @ 2022-09-04 09:46:00


|