蓝桥杯真题练习

Exported from /
# 用户 学校 名称 学号 总分数 #1 【蓝桥杯stema测试】切割蛋糕 #2 【蓝桥杯stema测试】拼写单词 #3 【蓝桥杯stema测试】促销活动 #4 【蓝桥杯stema测试】相邻身高差 #5 【蓝桥杯stema测试】业务办理时间 #6 算天数 #7 标记门牌号 #8 数位递增数 #9 水下探测器 #10 求阴影面积 #11 【蓝桥杯stema测试】九进制回文数 #12 小猫吃鱼 #13 组合 #14 【蓝桥杯stema测试】找路线 #15 【蓝桥杯stema测试】与3有关的数 #16 蓝桥杯赛迷宫 #17 【蓝桥杯stema测试】收集宝石 #18 【蓝桥杯stema测试】简易炸弹超人 #19 【蓝桥杯stema测试】最大乘积
1 黄立信 375085769@qq.com 吕同学是傻逼 1800 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 0 100
1 吕同学 1944023708@qq.com 鲁能巴蜀中学 不跟XXS(黄立信)一般见识 1020260924 1800 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 0 100
3 akm siyuanx123@qq.com 北京师范大学江津附属学校 没有此人 2018081901 1550 100 100 100 100 100 100 100 100 100 100 100 - 100 100 100 - 50 - 100
4 张博涵 89275937592364@qq.com 新壹街-张博涵 1350 100 100 100 100 100 100 100 100 100 100 - - 50 100 100 - 100 - -
5 张祖名 187234956@qq.com 张祖名 1300 100 100 100 100 100 100 100 100 100 100 - - 0 100 100 - - - 100
6 zhengyao 13331028112@qq.com 郑尧 1200 100 100 100 100 100 100 100 100 100 100 100 100 - - - - - - -
7 liaohaiyu22031 23423423423@qq.com **** 廖海宇在追杀马牌痞 **** 1120 100 100 100 100 - 100 - 100 100 100 100 - - 100 100 - - - 20
8 章愉霖 54655ghf44@qq.com 你猜 章愉霖 你猜 1084 100 100 100 100 100 100 0 100 50 100 100 - - - 100 34 - - -
9 媚狐不吃道旁李 xxx12344yyy@qq.com 1020 100 100 100 100 100 100 100 - 100 100 100 - - - - - - - 20
10 wangyouliang 12412125@qq.com 时代一校-王宥量 wyl 1000 100 100 100 100 100 100 100 100 100 100 - - - - - - - - -
11 任子轩 zvt_132@qq.com zvt_132 967 100 100 100 100 100 37 100 0 - 100 100 100 20 - - - - 0 10
12 王新睿 sbsbsbsb@qq.com 源著+王新睿 950 100 100 100 100 100 100 - 100 50 100 - - - - 100 - - - -
13 付柏乐 13368027954@qq.com 付柏乐 812 100 100 100 100 100 12 - 100 100 100 - - - - 0 - - - -
14 徐袅音 54455465@qq.com xuniaoyin 800 100 100 - - - - - 100 100 100 100 - - - 100 - - - 100
15 曹雅萱 cao333@qq.com 曹雅萱 740 100 100 100 100 100 0 30 - 100 100 - - - - 0 - - - 10
16 张佑泽 116516516510@qq.com zhangyouze 710 100 100 100 100 - - - - - - 100 - - 100 - - 100 0 10
17 jky jky@111.com 美国家里蹲大学 江科毅 114514 700 100 100 100 100 100 0 - - - 100 - - - - 100 - - - -
17 王淳恺 ehfjksdhjk@qq.com 嘉宝 700 100 100 100 100 - - - 100 100 100 - - - - - - - - -
17 jcx001 345231543@qq.com 纪承熙 700 100 100 100 100 100 - - - 100 100 - - - - - - - - -
20 谭杨睿 18581469553@qq.com 谭杨睿 610 100 100 100 - 100 - - - - 100 - - - - 100 - - - 10
21 konglinghao 7777777@qq.com konglinghao(算法战神) 600 100 100 100 - - - - - 100 100 - - - - 100 - - - -
21 小萝卜 Ricky@qq.com Krunker.io 经常消失 114514 600 100 100 100 100 - - - - - - 100 - - 100 - - - - -
21 牟淳雅 mouchunya@qq.com 牟淳雅 600 100 100 100 100 - - 0 - - 100 - - - - 100 - - - -
21 孔妘蘂 75675@qq.com 孔妘蘂 600 100 100 100 100 100 - - - - - - - - - 100 - - - -
25 何煜琦 656456454@qq.com 何煜琦 567 100 100 100 100 - 37 100 30 - - - - - - - - - - -
26 九转大肠 1392839746@qq.com 金沙校区-先珂熠 535 100 100 100 100 - - - - 25 100 - - - - - - - - 10
26 陈家熠 4545456@qq.com 陈家熠 114514 535 100 100 100 100 0 0 100 - 25 0 - - - - - - - - 10
28 renqingsen 201830108@qq.com renqingsen 512 100 100 100 100 100 12 - - - - - - - - - - - - -
29 max 13708350188@qq.com max 510 100 100 100 0 100 - - - - 100 - - - - - - - - 10
30 wangjunling23010 wangjunling23010@qq.com zyp 500 100 100 100 - - - - - - - - - - 100 100 - - - -
30 wangzihang wangzihang@163.com wangzihang 500 100 100 100 100 - 0 100 0 - - - - - - - - - - -
30 罗元邑2 5896654789@qq.com 罗元邑2 500 100 100 100 100 100 - 0 - - - - - - - 0 - - - -
30 李浩然 20130528@qq.com 李浩然 500 100 100 100 100 100 0 - - - - - - - - - - - - -
30 李昕宇 re@qq.com 新壹街-李昕宇 21 500 100 100 100 - - - - - 100 - - - - - 100 - - - -
30 wby 15823474681@qq.com 月光的银边把广袤的夜空烫出个洞,里头塞满了少年的梦想。 王彬羽 你猜是多少? 500 100 100 100 100 - - - - - 100 - - - - - - - - -
30 陈品烨 chenpinye@qq.com 新壹街校区-陈品烨 500 - - 100 - - 100 - 100 - - 100 - 100 - - - - - -
30 范子煜 546128764893678947189674389@163.com 重庆市江北区鸿恩实验学校 范子煜 2019级 (3)班 02号 500 100 100 100 100 100 0 - - - - - - - - - - - - -
30 刘蕤箎 88888888@qq.com 刘蕤箎 500 100 100 100 100 100 0 - - - - - - - - - - - - -
30 空空大师 e4t4f54@qq.com 树人小学 新壹街校区-陈琬舒 39 500 100 100 100 100 - - - - - - - - - - 100 - - - -
30 K517 ngughrhgtrhi9drty@qq.con K517 500 100 100 100 100 - - - - - 100 - - - - - - - - -
30 yzy 98687587697@qq.com 12121212121212121 叶哲宇 1212121212121212 500 100 100 100 100 100 - - - - - - - - - - - - - -
30 钟卓劭 15489123132@qq.com 南开中学 你个*你怎么跟个*一样 52 500 100 100 100 100 - - - - - 100 - - - - - - - - -
43 mengxike 123165465446541564@qq.com 金沙校区-孟熙轲 475 100 100 100 100 - - - - - 75 - - - - - - - - -
44 yanhanyu 54645353@qq.com 3 - CQ01C23011七下2 (CQ06_22006) 470 100 100 100 70 - - - - - 100 - - - - - - - - -
45 sfy 1328903542@qq.com 孙烽轶 440 100 100 100 100 40 - - - - - - - - - - - - - -
46 陈雨泽1 a1232@qq.com 陈雨泽1 425 - 100 100 100 - 25 - - - - - - - - 100 - - - -
47 刁钲洋 diaozhengyang@111.com 重庆市两江新区金山小学栖霞路校区 爱琴海校区-刁钲洋 6号 410 100 100 - - 100 - - - - - - - - 100 - - - - 10
47 高敏睿 gaominrui@qq.com 高敏睿 410 100 100 100 - 100 - - - - - - - - 10 - - - - -
47 游智棋 970101618@qq.com 游智棋 410 100 100 100 100 0 - 10 - - - - - - - - - - - -
50 chenyuxuan 2e3123sad@qq.com 我是2b+傻逼 400 100 100 - - 100 - - - - - - - - - - - - - 100
50 刘侑昊 555@qq.com 123 400 100 100 100 - 100 - - - - - - - - - - - - - -
50 徐绅博 jugjhjigg@qq.com 星光学校 徐绅博 40 400 100 100 100 - 100 - - - - - - - - - - - - - -
50 jianxinming aaaaaadhh@qq.com jianxinming 400 100 0 100 100 - - - - - 100 - - - - - - - - -
50 marz ffghfghgvmg@163.com marz 400 100 100 100 - - - - - 100 - - - - - - - - - -
50 殷梓琦 123456789123456789@qq.com 殷梓琦 400 100 100 100 - - - - - 100 - - - - - - - - - -
50 康哲朗 sdf@qq.com 新村实验小学 新壹街-康哲朗 50号 400 - 100 100 - - - - - 100 100 - - - - - - - - -
50 曾浩坤 jsahdjyuy2@qq.com 新壹街-曾浩坤 400 100 100 100 100 - - - - - - - - - - - - - - -
50 叶梓珺 564548878@qq.com 叶梓珺 400 100 100 100 100 - - - - - - - - - - - - - - -
50 刘梦泉 7889542121@qq.com 刘梦泉 400 100 100 100 100 - - - - - - - - - - - - - - -
50 zsj 15423@qq.com 新壹街校区-周士杰 400 100 100 100 100 0 - - - - - - - - - - - - - -
50 鸭缩毛巾 56987425@qq.com 时代二校-陈天成 400 100 100 100 100 - - - - - - - - - - - - - - -
50 chengjunran 22222321321@QQ.com 时代2校-程俊燃 400 100 100 100 - - - 0 - - - - - 100 - - - - - -
50 鲍钰森 1782986109@qq.com 金沙校区-鲍钰森 400 100 100 100 100 - - - - - - - - - - - - - - -
50 徐君豪 4554156651@qq.com 巴南小学 徐君豪 2 400 100 100 100 100 - - - - - - - - - - - - - - -
50 张宸睿 2857246856@qq.com 张宸睿 400 100 100 100 100 - - - - - - - - - - - - - - -
50 Jasson 234241341@qq.com 执剑人罗辑 400 100 100 100 100 - - - - - - - - - - - - - - -
67 崔金鹏 5490805896@qq.com 双湖小学 雷诺伊尔 375 100 100 - - - - - - 0 75 - - - - 100 - - - 0
68 邵译漫 543215768@qq.com 邵译漫 370 100 0 100 70 - - - - 100 - - - - - - - - - -
69 杨淇瑞29 48954156@qq.com 杨淇瑞 350 100 - 100 50 - - - - 100 - - - - - - - - - -
70 杨聆暄 23fsfs@qq.com 重庆加洲实验小学 重庆龙湖源著校区+杨聆暄 29 320 100 100 - - - - - - - - - - - 100 - - - - 20
71 Hoshino Hikari HoshinoHikari418@gmail.com 星野 光 310 100 100 - - - - - - - - - - - 100 - - - - 10
71 李弘毅 3243242@qq.com Chongqing NO.1 Experiment primary school of Gaoxin district CK 17 310 100 100 100 - - - - - - - - - - - - - - - 10
71 老六在此 112499410@pp.com 老六在此 310 100 100 100 - - - - - - - - - - - - - - - 10
74 mkh 18696593202@qq.com 彩虚村一小 美术猫映画 114514 300 100 100 - - 100 - - - - - - - - - - - - - -
74 zyp 850273779@qq.com 朱老师 300 100 100 - - - - - - - - - - - 100 - - - - -
74 22029-mjh 546345@qq.com 牢嗒 11451254188 11451254188 300 100 100 - - - - - - - - - - - 100 - - - - 0
74 heantong23010 heantong23010@qq.com 南坪校区-贺侒童 300 100 100 - - - - - - - - - - - 100 - - - - -
74 yezhongyang23010 yezhongyang23010@qq.com 南坪协信校区-叶钟阳 300 100 100 - - 0 - - - - - - - - 100 - - - - -
74 wangqilun23010 wangqilun23010@qq.com ss 王启仑 300 100 100 - - - - - - - - - - - 100 - - - - -
74 曾子墨 987663367@qq.com 曾子墨 300 100 100 - - 100 - - - - - - - - - - - - - -
74 666hlz666 Hla7892@qq.com 胡澜之 300 100 100 100 - - - - - - - - - - - - - - 0 -
74 王俊博 efs@qq.com 新壹街-王俊博 300 100 0 100 - - - - - 100 - - - - - - - - - -
74 wangpanxi 564565656@qq.com 嘜鉀襃啸穴 时代二校-王盼兮 21352.74 300 100 100 100 - - - - - - - - - - - - - - - -
74 冉睦阳 ranmuyang@qq.com 新壹街校区-冉睦阳(想要无敌天下吗,葵花宝典有售,不要18880,只要9999) 300 100 100 100 - - - - - - - - - - - - - - - -
74 Mr_D 763698671@qq.com Mr_D 300 100 - 100 100 - - - - - - - - - - - - - - -
74 陈致远Lynn 151523535328282@qq.com 陈致远Lynn 300 100 100 100 - - - - - - - - - - - - - - - -
74 acc rtrgd@qq.com acc 300 100 - 100 100 - - - - - - - - - - - - - - -
74 yangsongen 0423@QQ.COM 新华小学 杨颂恩 300 100 100 100 - - - - - - - - - - - - - - - -
74 刘煜轩 2201609@qq.com 刘煜轩 300 100 100 - - - - - - - 100 - - - - - - - - -
74 谢李玉 578645645@qq.com 谢李玉 300 100 - 100 100 - - - - - - - - - - - - - - -
74 cky 612535@qq.com 鲁能·巴蜀 新壹街陈科言 300 100 100 100 - - - - - - - - - - - - - - - -
92 zsb 9872166773@qq.com 周米骐 mickey 220 100 100 - - 0 - - - - - - - - 10 - - - - 10
92 56HXuZiHang 45834758345623785jhbbahjfbWBF@QQ.COM 云锦 56HXuZiHang 3.3.7 220 100 100 - - - - - - - - - - - - - - - - 20
92 马冬梅 madongmei@qq.com 源著校区-宋昊成 220 100 100 - - - - - - - - - - - - - - - - 20
95 曹元明 3049893373@qq.com 曹元明 210 100 100 - - 0 - - - - - - - - - - - - - 10
95 巫映秋1a 586476@qq.com 原著校区 巫映秋 210 100 100 - - - - - - - - - - - - - - - - 10
97 chenfengyi 986597164@qq.com 重庆两江新区金渝学校 陈风亦 17 200 100 100 - - - - - - - - - - - - - - - - -
97 liyunbo 134534@qq.com 李昀铂 200 100 100 - - - - - - - - - - - - - - - - -
97 13883322087 13883322087@qq.com 秦子越 200 100 100 - - - - - - - - - - - - - - - - -
97 lao_ba 2120206638@qq.com lao_ba 200 100 100 - - - - - - - - - - - - - - - - -
97 zhengxingya 15223197361@163.com 哈佛大学 希蒙 200 100 100 - - - - - - - - - - - - - - - - -
97 税崇峻 1231231231231234@qq.com 新壹街校区--税崇峻 200 100 100 - - - - - - - - - - - - - - - - -
97 武夷岩 12345678910@qq.com /*https://alpha1022.img.ihcr.top/cxk.jpg*/ soha 26 200 100 100 - - - - - - - - - - - - - - - - -
97 陈玺宇 65675467@qq.com 你觉得呢? 陈玺宇 0~10000之间 200 100 100 - - - - - - - - - - - - - - - - -
97 zzl 2107128037@qq.com 小码王编程学校 zzl 200 100 100 - - - - - - - - - - - - - - - - -
97 lvyanshan 2399903438@qq.com lvyanshan 200 100 100 - - - - - - - - - - - - - - - - -
97 huanglu 375085796@qq.com huanglu 200 - - - - - - - - 100 - - - - 100 - - - - -
97 陈梓宇 297350261@qq.com 陈梓宇 200 100 - - - - - - - 100 - - - - - - - - - -
97 xiongxuanhang 251231531@qq.com 新壹街—熊轩杭 200 - - 100 - - - - - 100 - - - - - - - - - -
97 车涌樯 ABF@QQ.COM 除了我全部人都是SB 200 - - 100 - - - - - 100 - - - - - - - - - -
97 正常的雪糕 16623332518@qq.com 正常的雪糕 200 100 100 - - - - - - - - - - - - - - - - -
97 李彦臻 43242342@qq.com 新村正大国际小学 李彦臻 2512 200 - - 100 - - - - - - - - - - - 100 - - - -
97 Viserion zhuogeng@qq.com 重庆两江新区金州小学 Viserion 36 200 - 100 100 0 - - - - - - - - - - - - - - -
97 mayuhang 1502131190@qq.com 马渝杭 200 - - - - - 100 100 - - - - - - - - - - - -
97 WSY hgyghghg@qq.com WSY 200 100 0 100 0 - - - - - - - - - - - - - - -
97 liujingxing 548927924@qq.com liujingxing(我要李毛川!) 200 - - - - - - - - - 100 - - - - 100 - - - -
97 icefall 65550352@163.com 天天(聂振洺) 200 100 - 100 - - - - - - - - - - - - - - - -
97 王俊元 13883661378@qq.com 金沙校区-王俊元 200 100 100 - - - - - - - 0 - - - - - - - - -
119 徐瑀阳 366643174@pp.com 风油精终结者 110 10 - - - - - - - 100 - - - - - - - - - -
119 欧俊阳 1234566@qq.com 川外科中 欧俊阳 19112022734 110 10 0 100 0 - - - - - - - - - - - - - - -
121 22029-xys 354335@qq.com 手搓STL stack 双向无环链表 _ 向量 2种实现方式: template class Stack_l /* Stack _ List */ { private: struct Node { Map_Type Node_Data; Node *nextp, *lastp; Node(void) { nextp = 0; lastp = 0; } }; struct List_Data { unsigned int List_Size; Node *headp, *endp; List_Data(void) { List_Size = 0; headp = 0; endp = 0; } }Data; struct Vector_Data { Map_Type *headp, *lastp, *endp; void resize(unsigned int data_size) { Map_Type *newp = new Map_Type[data_size](); endp = newp + data_size - 1; lastp = newp + (data_size > lastp - headp ? lastp - headp : data_size); if (headp) delete[] headp; headp = newp; } Vector_Data(void) { headp = 0; lastp = 0; endp = 0; } }; public: unsigned int size(void) { return Data.List_Size; } Map_Type& top(void) { return Data.endp -> Node_Data; } void* data(void) { return &Data; } bool empty(void) { return !((bool)Data.headp); } Stack_l& push(Map_Type push_data) { Node *nodep = new Node(); nodep -> lastp = Data.endp; if (!Data.headp) { Data.headp = nodep; Data.endp = nodep; } else Data.endp -> nextp = nodep; Data.endp = nodep; nodep -> Node_Data = push_data; ++Data.List_Size; return *this; } Stack_l& push(Map_Type& push_data) { Node *nodep = new Node(); nodep -> lastp = Data.endp; if (!Data.headp) { Data.headp = nodep; Data.endp = nodep; } else Data.endp -> nextp = nodep; Data.endp = nodep; nodep -> Node_Data = push_data; ++Data.List_Size; return *this; } Stack_l& push(Map_Type* push_data) { Node *nodep = new Node(); nodep -> lastp = Data.endp; if (!Data.headp) { Data.headp = nodep; Data.endp = nodep; } else Data.endp -> nextp = nodep; Data.endp = nodep; nodep -> Node_Data = *push_data; ++Data.List_Size; return *this; } Stack_l& push(const Map_Type* push_data) { Node *nodep = new Node(); nodep -> lastp = Data.endp; if (!Data.headp) { Data.headp = nodep; Data.endp = nodep; } else Data.endp -> nextp = nodep; Data.endp = nodep; nodep -> Node_Data = *(Map_Type*)push_data; ++Data.List_Size; return *this; } Stack_l& pop(void) { if (Data.headp) { if (Data.List_Size == 1u) { delete Data.headp; Data.List_Size = 0; Data.headp = 0; Data.endp = 0; } else { Data.endp = Data.endp -> lastp; delete Data.endp -> nextp; Data.endp -> nextp = 0; --Data.List_Size; } } return *this; } Stack_l& clear(void) { while (Data.List_Size) { pop(); } return *this; } Stack_l(void) { /* NULL */ } Stack_l(unsigned int data_size, Map_Type map_data) { Data.List_Size = data_size; while (data_size--) { Node *nodep = new Node(); nodep -> Node_Data = map_data; if (Data.headp) { nodep -> lastp = Data.endp; Data.endp -> nextp = nodep; Data.endp = nodep; } else { Data.headp = nodep; Data.endp = nodep; } } } Stack_l(Stack_l& map_data) { if (!map_data.empty()) { List_Data *listp = (List_Data*)map_data.data(); Node *nodep = listp -> headp, *newp; for (unsigned int i = 0; i != listp -> List_Size; ++i, nodep = nodep -> nextp) { newp = new Node(); newp -> Node_Data = nodep -> Node_Data; if (Data.headp) { newp -> lastp = Data.endp; Data.endp -> nextp = newp; Data.endp = newp; } else { Data.headp = newp; Data.endp = newp; } } Data.List_Size = listp -> List_Size; } } Stack_l& operator=(Stack_l& copy_data) { if (copy_data.empty()) return *this; List_Data *listp = (List_Data*)copy_data.data(); Node *nodep = listp -> headp, *newp; for (unsigned int i = 0; i != listp -> List_Size; ++i, nodep = nodep -> nextp) { newp = new Node(); newp -> Node_Data = nodep -> Node_Data; if (Data.headp) { newp -> lastp = Data.endp; Data.endp -> nextp = newp; Data.endp = newp; } else { Data.headp = newp; Data.endp = newp; } } Data.List_Size = listp -> List_Size; return *this; } bool operator==(Stack_l& cmp_data) { if (cmp_data.size() != Data.List_Size) return false; else if (cmp_data.empty() && (!Data.List_Size)) return true; Node *nodep1 = Data.headp, *nodep2 = ((List_Data*)cmp_data.data()) ->headp; for (unsigned int i = 0; i != Data.List_Size; ++i, nodep1 = nodep1 -> nextp, nodep2 = nodep2 ->nextp) { if (nodep1 -> Node_Data != nodep2 -> Node_Data) return false; } return true; } bool operator!=(Stack_l& cmp_data) { if (cmp_data.size() == Data.List_Size) return false; else if (cmp_data.empty() && (!Data.List_Size)) return false; Node *nodep1 = Data.headp, *nodep2 = ((List_Data*)cmp_data.data()) ->headp; for (unsigned int i = 0; i != Data.List_Size; ++i, nodep1 = nodep1 -> nextp, nodep2 = nodep2 ->nextp) { if (nodep1 -> Node_Data != nodep2 -> Node_Data) return true; } return true; } ~Stack_l(void) { clear(); } }; /* Stack _ List */ template class Stack_v /* Stack _ Vector */ { private: struct Node { Map_Type Node_Data; Node *nextp, *lastp; Node(void) { nextp = 0; lastp = 0; } }; struct List_Data { unsigned int List_Size; Node *headp, *endp; List_Data(void) { List_Size = 0; headp = 0; endp = 0; } }; struct Vector_Data { Map_Type *headp, *lastp, *endp; void resize(unsigned int data_size) { Map_Type *newp = new Map_Type[data_size](); endp = newp + data_size - 1; lastp = newp + (data_size > lastp - headp ? lastp - headp : data_size); if (headp) delete[] headp; headp = newp; } Vector_Data(void) { headp = 0; lastp = 0; endp = 0; } }Data; public: unsigned int size(void) { return Data.lastp - Data.headp; } Map_Type& top(void) { return *(Data.lastp - 1); } void* data(void) { return &Data; } bool full(void) { if (!Data.headp) return true; return Data.endp + 1 == Data.lastp; } bool empty(void) { if (!Data.headp) return true; return Data.headp == Data.lastp; } Stack_v& push(Map_Type push_data) { if (full()) Data.resize((unsigned int)((Data.lastp - Data.headp) * 1.5) + 1); *Data.lastp = push_data; ++Data.lastp; return *this; } Stack_v& push(Map_Type& push_data) { if (full()) Data.resize((unsigned int)((Data.lastp - Data.headp) * 1.5) + 1); *Data.lastp = push_data; ++Data.lastp; return *this; } Stack_v& push(Map_Type* push_data) { if (full()) Data.resize((unsigned int)((Data.lastp - Data.headp) * 1.5) + 1); *Data.lastp = *push_data; ++Data.lastp; return *this; } Stack_v& push(const Map_Type* push_data) { if (full()) Data.resize((unsigned int)((Data.lastp - Data.headp) * 1.5) + 1); *Data.lastp = *(Map_Type*)push_data; ++Data.lastp; return *this; } Stack_v& pop(void) { if (empty()) { if (Data.lastp - Data.headp > 1) Data.resize((Data.lastp - Data.headp) >> 1); else return *this; } else --Data.lastp; return *this; } Stack_v(void) { /* NULL */ } Stack_v(unsigned int data_size, Map_Type map_data) { while (data_size) { push(&map_data); --data_size; } } Stack_v(Stack_v& map_data) { Vector_Data *datap = (Vector_Data*)map_data.data(); for (unsigned int i = 0, k = map_data.size(); i != k; ++i) push(datap -> headp + i); } Stack_v& operator=(Stack_v& copy_data) { if (copy_data.empty()) clear(); else { Vector_Data *datap = (Vector_Data*)copy_data.data(); for (unsigned int i = 0, k = copy_data.size(); i != k; ++i) push(datap -> headp + i); } return *this; } bool operator==(Stack_v& cmp_data) { if (size() != cmp_data.size()) return false; else if (empty() && cmp_data.empty()) return true; Vector_Data *datap = (Vector_Data*)cmp_data.data(); for (unsigned int i = 0, k = size(); i != k; ++i) { if (*(Data.headp + i) != *(datap ->headp + i)) return false; } return true; } bool operator!=(Stack_v& cmp_data) { if (size() != cmp_data.size()) return true; else if (empty() && cmp_data.empty()) return false; Vector_Data *datap = (Vector_Data*)cmp_data.data(); for (unsigned int i = 0, k = size(); i != k; ++i) { if (*(Data.headp + i) != *(datap -> headp + i)) return true; } return false; } Stack_v& clear(void) { delete[] Data.headp; Data.headp = 0; Data.lastp = 0; Data.endp = 0; return *this; } ~Stack_v(void) { delete[] Data.headp; } }; /* Stack _ Vector */ int main(void) { return 0; } 100 100 0 - - - - - - - - - - - - - - - - -
121 johnDeng HELLOSB@qq.com acoi团主 100 100 - - - - - - - - - - - - - - - - - -
121 zzzzzzzzz 2344234234@qq.com zzzzzzzzz 100 100 - - - - - - - - - - - - - - - - - -
121 22029-lyh 2345324@qq.com 18中砺新班 leisixian 100 - 100 - - - - - - - - - - - - - - - - -
121 Fan 234353345@163.com BJ6180C8CTD 100 100 - - - - - - - - - - - - - - - - - -
121 童语铄 asdasqw23@qq.com 鲁能巴蜀小学 童语铄 15 100 - - - - - - - - 100 - - - - - - - - - -
121 王智琦 rgrgrg@qq.com 新壹街-王智琦 100 - - - - - - - - 100 - - - - - - - - - -
121 李梓铭 rtdra@qq.com 新壹街-李梓铭 100 - - - - - - - - 100 - - - - - - - - - -
121 反恐傻蛋 yjthtyjyi76ri7@qq.com 新壹街-陈*轩 100 - - - - - - - - 100 - - - - - - - - - -
121 黄皓源 5845684548454886484@qq.com 黄皓源 100 - - - - - - - - 100 - - - - - - - - - -
121 唐季铭 20130706@qq.com 唐季铭 100 - - - - - - - - 100 - - - - - - - - - -
121 雷承翰lch 686688116885@QQ.COM 雷承翰 100 - - - - - - - - 100 - - - - - - - - - -
121 cainuoyan 84661245@qq.com cainuoyan 100 100 - - - - - - - - - - - - - - - - - -
121 hhy xmwzhhy1@qq.com dyp 100 100 - - - - - - - - - - - - - - - - - -
121 junjun 34563435346344@qq.com 金沙校区-鲜腾俊 3350 100 - - - 100 - - - - - - - - - - - - - - -
121 13911518511 746213428@qq.com 13911518511 100 100 - 0 - - - - - - - - - - - - - - - -
121 wenhao wenhao@qq.com 重庆大学城第一小学校 金沙-文豪 49 100 100 - - - - - - - - - - - - - - - - - -
121 何镇西1 4335@wf.com sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我sb是我 sb s 100 - 100 - - - - - - - - - - - - - - - - -
139 litingxu 18716335693@qq.com 李廷旭 10 - - - - - - - - - - - - - - - - - - 10
139 wrz 13983197523@qq.com 星光小学 wrz 19 10 10 - - - - - - - - - - - - - - - - - -
141 RanHao 2395704325@qq.com RanHao 0 0 - - - - - - - - - - - - - - - - - -
141 赵秋泽 13220212040@qq.com 114514 赵秋泽 114514 0 0 - - - - - - - - - - - - - - - - - -
141 丁载珅 78s@qq.com 新壹街-丁载珅 0 - - - - - - - - 0 - - - - - - - - - -
141 cbh 327645276@qq.com cbh 0 0 0 - - - - - - - - - - - - - - - - -
145 wjr 6512378762@qq.com 王锦锐 0 - - - - - - - - - - - - - - - - - - -
145 张濯弋 3969769878@qq.com 张濯弋 0 - - - - - - - - - - - - - - - - - - -
145 chengbao 1326022125@qq.com chengbao 0 - - - - - - - - - - - - - - - - - - -
145 gongjiajun 18983782822@qq.com asdfghjkl 龚嘉俊 114514 0 - - - - - - - - - - - - - - - - - - -
145 13983392730 1364165465@qq.com 51303019801010002X 时代一校 蒋帛希 13983392730 0 - - - - - - - - - - - - - - - - - - -
145 xuweiming 15730434299@qq.com 许炜铭 0 - - - - - - - - - - - - - - - - - - -
145 蒋晟睿 jhbhujbuhbu@qq.com 青山 蒋晟睿 41 0 - - - - - - - - - - - - - - - - - - -
145 zzzrrrxxx 18868953715@qq.com zzzrrrxxx 0 - - - - - - - - - - - - - - - - - - -
145 贾博涵 13911518511@qq.com 贾博涵 6 0 - - - - - - - - - - - - - - - - - - -
145 李睿瞳 19922365420@163.com ??? ¿¿¿??? ??? 0 - - - - - - - - - - - - - - - - - - -
145 墙凌可 2925801112@qq.com 星光学校 colin1112 21 0 - - - - - - - - - - - - - - - - - - -
145 zhonghaotian22006 666888@qq.com 坤坤荔枝小黑子 0 - - - - - - - - - - - - - - - - - - -
145 图书管理员 123131@qq.com 刘老师 0 - - - - - - - - - - - - - - - - - - -
145 Nico 2345678ew@163.c0m Nico 0 - - - - - - - - - - - - - - - - - - -
145 zhm123 2642956520@qq.com zhm123 0 - - - - - - - - - - - - - - - - - - -
145 可爱的小花狗 20120402@qq.com 重庆谢家湾学校dddd 可爱的小花狗 11 0 - - - - - - - - - - - - - - - - - - -
145 ylc fskdjh@qq.com ylc 反恐鹅蛋 0 - - - - - - - - - - - - - - - - - - -
145 张峻瑞89673 zjr@qq.com 张峻瑞89673 0 - - - - - - - - - - - - - - - - - - -
145 zjj22031 243243424324121@qq.com 我很6 0 - - - - - - - - - - - - - - - - - - -
145 胡程禹 6543747@qq.com 胡程禹 0 - - - - - - - - - - - - - - - - - - -
145 CTS1 123852456@qq.com 你猜我是谁 0 - - - - - - - - - - - - - - - - - - -
145 ycy 3133237@qq.com ycy 0 - - - - - - - - - - - - - - - - - - -
145 xbz 14141651@qq.com 谢秉真 0 - - - - - - - - - - - - - - - - - - -
145 黄麒瑞 huanqir@qq.com 渝北区八中龙兴中学 中岛敦 07 0 - - - - - - - - - - - - - - - - - - -
145 陈峻熙 159159@qq.com 巴蜀 新壹街校区-陈峻熙 chenjunxi 0 - - - - - - - - - - - - - - - - - - -
145 13983097018 13983097018@qq.com 重庆德普外国语学校 邹曜丞 0 - - - - - - - - - - - - - - - - - - -
145 郑岐蔚 y20110906@qq.com 郑岐蔚 0 - - - - - - - - - - - - - - - - - - -
145 Alduin 602648361@qq.com Alduin 0 - - - - - - - - - - - - - - - - - - -
145 曹烜豪 78899790@qq.com 曹烜豪 0 - - - - - - - - - - - - - - - - - - -
145 05c05-zhou 522146879@qq.com Tender. little black 0 - - - - - - - - - - - - - - - - - - -
145 胡津豪11 qwre@qq.com 胡津豪11 0 - - - - - - - - - - - - - - - - - - -
145 微笑王子 20120606@xiaomawang.com 时代校区-刘臣原 0 - - - - - - - - - - - - - - - - - - -
145 kql1 llllllll@163.com 你猜 kql1 你猜 0 - - - - - - - - - - - - - - - - - - -
145 scallway 1376479828@qq.com 家里蹲 scallway 0 - - - - - - - - - - - - - - - - - - -
145 姚宏逸 156948677@qq.com 姚宏逸 0 - - - - - - - - - - - - - - - - - - -
145 邵冠铖 2296636896@qq.com 南坪校区-邵冠铖 0 - - - - - - - - - - - - - - - - - - -
145 zyl sdlfjsdl@163.com zyl 0 - - - - - - - - - - - - - - - - - - -
145 黄鹏翰 huang125@qq.com 黄鹏翰 0 - - - - - - - - - - - - - - - - - - -
145 hu_moren 114514w@qq.com hty Microsoft 6 0 - - - - - - - - - - - - - - - - - - -
145 彭子彦 pengziyan@qq.com 彭子彦 0 - - - - - - - - - - - - - - - - - - -
145 wangranyimo 224yueg@qq.com 王冉燚默(重庆龙湖U城天街A馆) 0 - - - - - - - - - - - - - - - - - - -
145 许律天 2919253125@qq.com 许律天 0 - - - - - - - - - - - - - - - - - - -
145 ssr 123421g@qq.com ssr 0 - - - - - - - - - - - - - - - - - - -
145 胡云杰 13637744273@qq.cm *****学校 胡云杰 383843809438 0 - - - - - - - - - - - - - - - - - - -
145 谭奕辰 17318296259@qq.com 谭奕辰 0 - - - - - - - - - - - - - - - - - - -
145 唐崇人 18983880818@qq.com 唐崇人 0 - - - - - - - - - - - - - - - - - - -
145 叶令子 seuud@qq.com 叶令子 0 - - - - - - - - - - - - - - - - - - -
145 wangruibo20xh wwl@vip.163.com wangruibo20xh 0 - - - - - - - - - - - - - - - - - - -
145 13883454928 ujhfduo2@qq.com c 56 杨宇轩 0 - - - - - - - - - - - - - - - - - - -
145 夏子一 18680701335@qq.com double夏 0 - - - - - - - - - - - - - - - - - - -
145 wulj wulinjun@qq.com wulj 0 - - - - - - - - - - - - - - - - - - -
145 张梓宸 1584125@qq.com 张梓宸 222222222222222222222222222222222222222222222 0 - - - - - - - - - - - - - - - - - - -
145 秦子栋 vcghku@qq.com 1 0 - - - - - - - - - - - - - - - - - - -
145 wuyou 12434546@qq.com #include #include #include #include #include using namespace std; struct IDname { int geshu; string NAME; }; IDname jue_se[100]; struct ID { int num; bool life; string name; int know; int how; }; ID player[21]; int n, MY, kill1, kill2; char a; bool jieyao = 1, duyao = 1; int lieren, shouwei = 0; void init1() { jue_se[1].NAME = "村民 "; jue_se[2].NAME = "狼人 "; jue_se[3].NAME = "女巫 "; jue_se[4].NAME = "预言家 "; jue_se[5].NAME = "猎人 "; jue_se[6].NAME = "守卫 "; } void init2(int nn) { switch (nn) { case 6: jue_se[1].geshu = 3; jue_se[2].geshu = 2; jue_se[3].geshu = 1; jue_se[4].geshu = 0; jue_se[5].geshu = 0; jue_se[6].geshu = 0; break; case 7: jue_se[1].geshu = 3; jue_se[2].geshu = 2; jue_se[3].geshu = 1; jue_se[4].geshu = 1; jue_se[5].geshu = 0; jue_se[6].geshu = 0; break; case 8: jue_se[1].geshu = 3; jue_se[2].geshu = 3; jue_se[3].geshu = 1; jue_se[4].geshu = 1; jue_se[5].geshu = 0; jue_se[6].geshu = 0; break; case 9: jue_se[1].geshu = 3; jue_se[2].geshu = 3; jue_se[3].geshu = 1; jue_se[4].geshu = 1; jue_se[5].geshu = 1; jue_se[6].geshu = 0; break; case 10: jue_se[1].geshu = 4; jue_se[2].geshu = 3; jue_se[3].geshu = 1; jue_se[4].geshu = 1; jue_se[5].geshu = 1; jue_se[6].geshu = 0; break; case 11: jue_se[1].geshu = 4; jue_se[2].geshu = 4; jue_se[3].geshu = 1; jue_se[4].geshu = 1; jue_se[5].geshu = 1; jue_se[6].geshu = 0; break; case 12: jue_se[1].geshu = 4; jue_se[2].geshu = 4; jue_se[3].geshu = 1; jue_se[4].geshu = 1; jue_se[5].geshu = 1; jue_se[6].geshu = 1; break; default: cout << "输入错误,再见" << endl; exit(0); break; } } int van[10] = { 7,4,6,43,35,1,2,8,20,19 }; void init3(int nn) { srand(time(0)); Sleep(rand() % 44); int x = 10000; int t = rand(); srand(time(NULL)); int y = van[(rand() % 100 * van[rand() % 10] + t) % 10]; if (nn <= 6) x = abs(x * 6 / y) % 3 + 1; else if (nn <= 8) x = abs(x * 7 / y) % 4 + 1; else if (nn <= 11) x = abs(x * 8 / y) % 5 + 1; else if (nn <= 14) x = abs(x * 9 / y) % 6 + 1; do { if (nn <= 6) x = x % 3 + 1; else if (nn <= 8) x = x % 4 + 1; else if (nn <= 11) x = x % 5 + 1; else if (nn <= 14) x = x % 6 + 1; if (jue_se[x].geshu > 0) { player[nn].name = jue_se[x].NAME; if (player[nn].name == "猎人 ") lieren = nn; if (player[nn].name == "守卫 ") shouwei = nn; player[nn].life = 1; player[nn].num = nn; player[nn].know = 0; jue_se[x].geshu--; player[nn].how = 0; break; } } while (jue_se[x].geshu == 0); } void printhhh() { int cm = 0; int sz = 0; for (int i = 1; i <= n; i++) { if (player[i].life == 0) continue; else if (player[i].name == "村民 ") cm++; else if (player[i].name == "女巫 " || player[i].name == "预言家 " || player[i].name == "猎人 " || player[i].name == "守卫 ") sz++; } if (sz == 0 || cm == 0) cout << "狼人阵营胜利" << endl; else cout << "好人阵营胜利" << endl; for (int i = 1; i <= n; i++) { cout << left << setw(3) << player[i].num << ": " << player[i].name << " "; if (player[i].life == 0) cout << "死亡" << "\t"; else cout << "存活" << "\t"; if (player[i].how == 0) cout << "最终存活 " << endl; else if (player[i].how == 1) cout << "最终被狼人杀死" << endl; else if (player[i].how == 2) cout << "最终被投票投死" << endl; else if (player[i].how == 3) cout << "最终被女巫毒死" << endl; else if (player[i].how == 4) cout << "最终被猎人射杀" << endl; } system("pause"); system("pause"); system("pause"); } void print(int day, int ti) { HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); if (ti == 0) SetConsoleTextAttribute(handle, BACKGROUND_INTENSITY | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY); else SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); cout << "\t\t\t\t第" << day << "天 "; if (ti == 0) cout << "白天" << endl; else cout << "夜晚" << endl; cout << "我的位置:" << MY << "号" << endl; for (int i = 1; i <= 6; i++) { cout << player[i].num << "号位 "; } cout << endl; for (int i = 1; i <= 6; i++) { if (player[i].life == 1) { if (ti == 0) SetConsoleTextAttribute(handle, BACKGROUND_INTENSITY | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY | FOREGROUND_GREEN); else SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_GREEN); cout << "存活 "; } else { if (ti == 0) SetConsoleTextAttribute(handle, BACKGROUND_INTENSITY | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY | FOREGROUND_RED); else SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_RED); cout << "已死亡 "; } } if (ti == 0) SetConsoleTextAttribute(handle, BACKGROUND_INTENSITY | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY); else SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); cout << endl; for (int i = 1; i <= 6; i++) { if (player[i].know == 0) cout << "未知 "; else if (player[i].know == 1) { if (player[i].name == "狼人 ") cout << "狼人 "; else cout << "好人 "; } else if (player[i].know == 2) cout << player[i].name << " "; } cout << endl << endl; for (int i = 7; i <= n; i++) { if (i < 10) cout << player[i].num << "号位 "; else cout << player[i].num << "号位 "; } cout << endl; for (int i = 7; i <= n; i++) { if (player[i].life == 1) { if (ti == 0) SetConsoleTextAttribute(handle, BACKGROUND_INTENSITY | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY | FOREGROUND_GREEN); else SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_GREEN); cout << "存活 "; } else { if (ti == 0) SetConsoleTextAttribute(handle, BACKGROUND_INTENSITY | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY | FOREGROUND_RED); else SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_RED); cout << "已死亡 "; } } if (ti == 0) SetConsoleTextAttribute(handle, BACKGROUND_INTENSITY | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY); else SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); cout << endl; for (int i = 7; i <= n; i++) { if (player[i].know == 0) cout << "未知 "; else if (player[i].know == 1) { if (player[i].name == "狼人 ") cout << "狼人 "; else cout << "好人 "; } else if (player[i].know == 2) cout << player[i].name << " "; } cout << endl << endl; } int shou = 0; void shoushui(int hhh, int hhhh) { int x; Sleep(3000); system("cls"); print(hhh, hhhh); cout << "守~卫~请~睁~眼~~~" << endl; Sleep(3000); system("cls"); print(hhh, hhhh); if (MY == shouwei && player[MY].life == 1) { cout << "请问你要守护谁?" << endl << "输入:"; cin >> x; while (x == shou || x<1 || x>n || player[x].life == 0) { cout << "输入错误,请重新输入" << endl << "输入:"; cin >> x; } shou = x; } else if (player[shouwei].life == 1) { cout << "请问你要守护谁?" << endl; Sleep(rand() % 98); srand(time(0)); x = rand() % n + 1; while (x == shou || player[x].life == 0) { Sleep(rand() % 98); srand(time(0)); x = rand() % n + 1; } shou = x; } else { cout << "请问你要守护谁?" << endl; Sleep(3000); shou = -1; } Sleep(3000); system("cls"); print(hhh, hhhh); cout << "守~卫~请~闭~眼~~~" << endl; } struct tou { int xxx; int num; int toupiaoquan; }; tou TOU[13]; bool cmp(tou x, tou y) { if (x.xxx == y.xxx) return x.num < y.num; return x.xxx > y.xxx; } bool cmp1(tou x, tou y) { return x.num < y.num; } void toupiao(int ddd, int nnn) { //--------1-------- int x; Sleep(2000); system("cls"); print(ddd, nnn); cout << "现在大家请投票"; for (int i = 1; i <= 3; i++) { cout << "."; Sleep(500); } cout << endl; for (int i = 1; i <= n; i++) { TOU[i].num = i; TOU[i].toupiaoquan = 1; TOU[i].xxx = 0; } for (int i = 1; i <= n; i++) { if (player[i].life == 1) { Sleep(3000); if (i == MY) { cout << "请投票...(0弃权)" << endl; cin >> x; while (player[x].life == 0 && x != 0) { cin >> x; } if (x == 0) cout << MY << "号玩家弃权" << endl; else cout << MY << "号玩家投给了" << x << "号玩家" << endl; } else { srand(time(0)); if (player[i].name == "狼人 ") { x = rand() % (n + 1); while (x != 0 && (player[x].life == 0 || player[x].name == "狼人 " || x == i)) { Sleep(rand() % 98); srand(time(0)); x = rand() % (n + 1); } if (x == 0) cout << i << "号玩家弃权" << endl; else cout << i << "号玩家投给了" << x << "号玩家" << endl; } else if (player[i].name == "预言家 ") { x = rand() % (n + 1); while (x != 0 && (player[x].life == 0 || player[x].name != "狼人 " || x == i)) { Sleep(rand() % 98); srand(time(0)); x = rand() % (n + 1); } if (x == 0) cout << i << "号玩家弃权" << endl; else cout << i << "号玩家投给了" << x << "号玩家" << endl; } else { x = rand() % (n + 1); while (x != 0 && (player[x].life == 0 || x == i)) { Sleep(rand() % 98); srand(time(0)); x = rand() % (n + 1); } if (x == 0) cout << i << "号玩家弃权" << endl; else cout << i << "号玩家投给了" << x << "号玩家" << endl; } } if (x != 0) TOU[x].xxx++; } } Sleep(3000); sort(TOU + 1, TOU + n + 1, cmp); if (TOU[2].xxx != TOU[1].xxx) { cout << "投票结束," << TOU[1].num << "号投票出局" << endl; player[TOU[1].num].life = 0; player[TOU[1].num].how = 2; Sleep(3000); return; } else { TOU[1].toupiaoquan = 0; TOU[2].toupiaoquan = 0; system("cls"); print(ddd, nnn); cout << TOU[1].num << "号," << TOU[2].num << "号"; int i; for (i = 3; i <= n; i++) { if (TOU[i].xxx == TOU[1].xxx) { TOU[i].toupiaoquan = 0; cout << "," << TOU[i].num << "号"; } else break; } if (i == n + 1) { for (int i = 1; i <= n; i++) TOU[i].toupiaoquan = 1; } cout << "平票" << endl; } //--------2-------- sort(TOU + 1, TOU + n + 1, cmp1); cout << "请再次投票"; for (int i = 1; i <= 3; i++) { cout << "."; Sleep(500); } cout << endl; for (int i = 1; i <= n; i++) { if (player[i].life == 1 && TOU[i].toupiaoquan == 1) { Sleep(3000); if (i == MY) { cout << "请投票...(0弃权)" << endl; cin >> x; while ((player[x].life == 0 || TOU[x].toupiaoquan == 1) && x != 0) { cin >> x; } if (x == 0) cout << MY << "号玩家弃权" << endl; else cout << MY << "号玩家投给了" << x << "号玩家" << endl; } else { srand(time(0)); if (player[i].name == "狼人 ") { x = rand() % (n + 1); while (x != 0 && (player[x].life == 0 || player[x].name == "狼人 " || x == i || TOU[x].toupiaoquan == 1)) { srand(time(0)); x = rand() % (n + 1); } if (x == 0) cout << i << "号玩家弃权" << endl; else cout << i << "号玩家投给了" << x << "号玩家" << endl; } else if (player[i].name == "预言家 ") { x = rand() % (n + 1); while (x != 0 && (player[x].life == 0 || player[x].name != "狼人 " || x == i || TOU[x].toupiaoquan == 1)) { srand(time(0)); x = rand() % (n + 1); } if (x == 0) cout << i << "号玩家弃权" << endl; else cout << i << "号玩家投给了" << x << "号玩家" << endl; } else { x = rand() % (n + 1); while (x != 0 && (player[x].life == 0 || x == i || TOU[x].toupiaoquan == 1)) { srand(time(0)); x = rand() % (n + 1); } if (x == 0) cout << i << "号玩家弃权" << endl; else cout << i << "号玩家投给了" << x << "号玩家" << endl; } } if (x != 0 && TOU[i].toupiaoquan == 1) TOU[x].xxx++; } } Sleep(3000); sort(TOU + 1, TOU + n + 1, cmp); if (TOU[2].xxx != TOU[1].xxx) { cout << "投票结束," << TOU[1].num << "号投票出局" << endl; player[TOU[1].num].life = 0; player[TOU[1].num].how = 2; Sleep(3000); return; } else { TOU[1].toupiaoquan = 0; TOU[2].toupiaoquan = 0; system("cls"); print(ddd, nnn); cout << TOU[1].num << "号," << TOU[2].num << "号"; int i; for (i = 3; i <= n; i++) { if (TOU[i].xxx == TOU[1].xxx) { TOU[i].toupiaoquan = 0; cout << "," << TOU[i].num << "号"; } else break; } if (i == n + 1) { for (int i = 1; i <= n; i++) TOU[i].toupiaoquan = 1; } cout << "平票" << endl; } //--------3-------- sort(TOU + 1, TOU + n + 1, cmp1); cout << "请再次投票"; for (int i = 1; i <= 3; i++) { cout << "."; Sleep(500); } cout << endl; for (int i = 1; i <= n; i++) { if (player[i].life == 1 && TOU[i].toupiaoquan == 1) { Sleep(3000); if (i == MY) { cout << "请投票...(0弃权)" << endl; cin >> x; while ((player[x].life == 0 || TOU[x].toupiaoquan == 1) && x != 0) { cin >> x; } if (x == 0) cout << MY << "号玩家弃权" << endl; else cout << MY << "号玩家投给了" << x << "号玩家" << endl; } else { srand(time(0)); if (player[i].name == "狼人 ") { x = rand() % (n + 1); while (x != 0 && (player[x].life == 0 || player[x].name == "狼人 " || x == i || TOU[x].toupiaoquan == 1)) { srand(time(0)); x = rand() % (n + 1); } if (x == 0) cout << i << "号玩家弃权" << endl; else cout << i << "号玩家投给了" << x << "号玩家" << endl; } else if (player[i].name == "预言家 " || player[i].name == "猎人 ") { x = rand() % (n + 1); while (x != 0 && (player[x].life == 0 || player[x].name != "狼人 " || x == i || TOU[x].toupiaoquan == 1)) { srand(time(0)); x = rand() % (n + 1); } if (x == 0) cout << i << "号玩家弃权" << endl; else cout << i << "号玩家投给了" << x << "号玩家" << endl; } else { x = rand() % (n + 1); while (x != 0 && (player[x].life == 0 || x == i || TOU[x].toupiaoquan == 1)) { srand(time(0)); x = rand() % (n + 1); } if (x == 0) cout << i << "号玩家弃权" << endl; else cout << i << "号玩家投给了" << x << "号玩家" << endl; } } if (x != 0 && TOU[i].toupiaoquan == 1) TOU[x].xxx++; } } Sleep(3000); sort(TOU + 1, TOU + n + 1, cmp); if (TOU[2].xxx != TOU[1].xxx) { cout << "投票结束," << TOU[1].num << "号投票出局" << endl; player[TOU[1].num].life = 0; player[TOU[1].num].how = 2; } else { cout << "投票结束,无人出局" << endl; } Sleep(5000); } bool game_over() { int pingmin = 0; int langren = 0; int shenzhi = 0; for (int i = 1; i <= n; i++) { if (player[i].life == 0) continue; if (player[i].name == "狼人 ") langren++; else if (player[i].name == "村民 ") pingmin++; else if (player[i].name == "女巫 " || player[i].name == "预言家 " || player[i].name == "猎人 ") shenzhi++; } if (shenzhi == 0 || langren == 0 || pingmin == 0) return 1; return 0; } void night() { system("cls"); system("color 0f"); print(1, 1); cout << "天~黑~请~闭~眼~~~" << endl; if (n >= 12) shoushui(1, 1); Sleep(3000); system("cls"); print(1, 1); cout << "狼~人~请~睁~眼~~~" << endl; if (player[MY].name == "狼人 ") { Sleep(1000); cout << "你的同伴有:"; for (int i = 1; i <= n; i++) { if (i == MY) continue; if (player[i].name == "狼人 ") { cout << player[i].num << "号 "; player[i].know = 2; } } Sleep(3000); cout << endl << "请问你们要杀谁:" << endl << "输入:"; cin >> kill1; Sleep(1500); system("cls"); print(1, 1); cout << "今晚你们要杀的是" << kill1 << "号玩家" << endl; } else { Sleep(4000); system("cls"); print(1, 1); cout << "请问你们要杀谁?" << endl; do { Sleep(rand() % 18); srand(time(0)); int x = rand() % n + 1; if (player[x].name != "狼人 " && player[x].life == 1) { kill1 = x; break; } } while (1); Sleep(5000); } Sleep(3000); system("cls"); print(1, 1); cout << "狼~人~请~闭~眼~~~" << endl; Sleep(2000); system("cls"); print(1, 1); cout << "女~巫~请~睁~眼~~~" << endl; Sleep(2000); system("cls"); print(1, 1); if (player[MY].name == "女巫 " && player[MY].life == 1) { Sleep(1000); if (jieyao == 1) { cout << "今晚" << kill1 << "号玩家被杀" << endl; Sleep(500); cout << "请问你要救吗???" << endl << "A. 救 B.不救" << endl << "输入:"; cin >> a; if (a == 'A') { system("cls"); print(1, 1); cout << "请问你要毒吗???" << endl; Sleep(2000); system("cls"); print(1, 1); cout << "今晚" << kill1 << "号玩家被你解救" << endl; jieyao = 0; if (shou != kill1) kill1 = 0; } else { if (shou == kill1) kill1 = 0; Sleep(2000); system("cls"); print(1, 1); cout << "请问你要毒吗???" << endl << "A. 毒 B.不毒" << endl << "输入:"; cin >> a; if (a == 'A') { cout << "请问你要毒谁???" << endl << "输入:"; cin >> kill2; while (player[kill2].life != 1) { cout << "输入错误,请重新输入:" << endl; cin >> kill2; } duyao = 0; } } } else { if (shou == kill1) kill1 = 0; Sleep(2000); system("cls"); print(1, 1); cout << "请问你要毒吗???" << endl << "A. 毒 B.不毒" << endl << "输入:"; cin >> a; if (a == 'A') { cout << "请问你要毒谁???" << endl << "输入:"; cin >> kill2; while (player[kill2].life != 1) { cout << "输入错误,请重新输入:" << endl; cin >> kill2; } duyao = 0; } } } else { bool b = 0; cout << "请问你是否要用解药???" << endl; int FFF = 0, kkkk; for (int i = 1; i <= n; i++) { if (player[i].life == 1 && player[i].name == "村民 ") FFF++; if (player[i].name == "女巫 ") kkkk = i; } if (jieyao == 1 && player[kkkk].life == 1) { if (FFF == 1) { if (shou == kill1) jieyao = 1; else jieyao = 0; kill1 = 0; b = 1; } else for (int i = 1; i <= n; i++) { if (player[i].name == "女巫 " && kill1 == i) { kill1 = 0; if (shou == kill1) jieyao = 1; else jieyao = 0; b = 1; break; } else if (player[i].name == "预言家 " && kill1 == i) { kill1 = 0; if (shou == kill1) jieyao = 1; else jieyao = 0; b = 1; break; } } } Sleep(3000); if (b == 0 && duyao == 1 && player[kkkk].life == 1) { system("cls"); print(1, 1); cout << "请问你是否要用毒药???" << endl; srand(time(0)); int x = rand() % 2; Sleep(1500); cout << "请问你要毒谁???" << endl; if (x == 1) { duyao = 0; int y = rand() % n + 1; while ((player[y].name == "女巫 " || player[y].name == "预言家 " || y == kill1) || player[y].life == 0) y = rand() % n + 1; kill2 = y; } } else { Sleep(3000); system("cls"); print(1, 1); cout << "请问你是否要用毒药???" << endl; Sleep(3000); cout << "请问你要毒谁???" << endl; Sleep(3000); } } Sleep(3000); system("cls"); print(1, 1); cout << "女~巫~请~闭~眼~~~" << endl; if (n > 6) { Sleep(3000); system("cls"); print(1, 1); cout << "预~言~家~请~睁~眼~~~" << endl; if (player[MY].name == "预言家 ") { Sleep(3000); cout << "请问你想查验谁???" << endl << "输入:"; int x; cin >> x; player[x].know = 1; Sleep(2000); system("cls"); print(1, 1); cout << "他的身份是:"; if (player[x].name == "狼人 ") cout << "狼人" << endl; else cout << "好人" << endl; Sleep(3000); } else { Sleep(3000); cout << "请问你想查验谁???" << endl; Sleep(3000); system("cls"); print(1, 1); cout << "他的身份是:......"; Sleep(3000); } Sleep(3000); system("cls"); print(1, 1); cout << "预~言~家~请~闭~眼~~~" << endl; } Sleep(3000); if (kill1 != 0) player[kill1].life = 0; if (kill2 != 0) player[kill2].life = 0; player[kill1].how = 1; player[kill2].how = 3; system("cls"); system("color F0"); print(2, 0); } void night2(int hhh, int hhhh) { system("cls"); system("color 0f"); print(hhh, hhhh); cout << "天~黑~请~闭~眼~~~" << endl; if (n >= 12) shoushui(hhh, hhhh); Sleep(3000); system("cls"); print(hhh, hhhh); cout << "狼~人~请~睁~眼~~~" << endl; if (player[MY].name == "狼人 " && player[MY].life == 1) { Sleep(3000); cout << endl << "请问你们要杀谁:" << endl << "输入:"; cin >> kill1; Sleep(1500); system("cls"); print(hhh, hhhh); cout << "今晚你们要杀的是" << kill1 << "号玩家" << endl; } else { Sleep(4000); system("cls"); print(hhh, hhhh); cout << "请问你们要杀谁?" << endl; do { srand(time(0)); int x = rand() % n + 1; if (player[x].name != "狼人 " && player[x].life == 1) { kill1 = x; break; } } while (1); Sleep(5000); } Sleep(3000); system("cls"); print(hhh, hhhh); cout << "狼~人~请~闭~眼~~~" << endl; Sleep(2000); system("cls"); print(hhh, hhhh); cout << "女~巫~请~睁~眼~~~" << endl; Sleep(2000); system("cls"); print(hhh, hhhh); if (player[MY].name == "女巫 " && player[MY].life == 1) { Sleep(1000); if (jieyao == 1) { cout << "今晚" << kill1 << "号玩家被杀" << endl; Sleep(500); cout << "请问你要救吗???" << endl << "A. 救 B.不救" << endl << "输入:"; cin >> a; if (a == 'A') { system("cls"); print(hhh, hhhh); cout << "请问你要毒吗???" << endl; Sleep(2000); system("cls"); print(hhh, hhhh); cout << "今晚" << kill1 << "号玩家被你解救" << endl; jieyao = 0; if (shou != kill1) kill1 = 0; } else { if (shou == kill1) kill1 = 0; Sleep(2000); system("cls"); print(hhh, hhhh); cout << "请问你要毒吗???" << endl << "A. 毒 B.不毒" << endl << "输入:"; cin >> a; if (a == 'A') { cout << "请问你要毒谁???" << endl << "输入:"; cin >> kill2; while (player[kill2].life != 1) { cout << "输入错误,请重新输入:" << endl; cin >> kill2; } duyao = 0; } } } else if (duyao == 1) { if (shou == kill1) kill1 = 0; Sleep(2000); system("cls"); print(hhh, hhhh); cout << "请问你要毒吗???" << endl << "A. 毒 B.不毒" << endl << "输入:"; cin >> a; if (a == 'A') { cout << "请问你要毒谁???" << endl << "输入:"; cin >> kill2; while (player[kill2].life != 1) { cout << "输入错误,请重新输入:" << endl; cin >> kill2; } duyao = 0; } } else { Sleep(2000); system("cls"); print(hhh, hhhh); cout << "请问你要毒吗???" << endl; } } else { bool b = 0; cout << "请问你是否要用解药???" << endl; int FFF = 0, kkkk; for (int i = 1; i <= n; i++) { if (player[i].life == 1 && player[i].name == "村民 ") FFF++; if (player[i].name == "女巫 ") kkkk = i; } if (jieyao == 1 && player[kkkk].life == 1) { if (FFF == 1) { if (shou == kill1) jieyao = 1; else jieyao = 0; kill1 = 0; b = 1; } else for (int i = 1; i <= n; i++) { if (player[i].name == "女巫 " && kill1 == i) { kill1 = 0; if (shou == kill1) jieyao = 1; else jieyao = 0; b = 1; break; } else if (player[i].name == "预言家 " && kill1 == i) { kill1 = 0; if (shou == kill1) jieyao = 1; else jieyao = 0; b = 1; break; } } } Sleep(3000); if (b == 0 && duyao == 1 && player[kkkk].life == 1) { system("cls"); print(hhh, hhhh); cout << "请问你是否要用毒药???" << endl; srand(time(0)); int x = rand() % 2; Sleep(1500); cout << "请问你要毒谁???" << endl; if (x == 1) { duyao = 0; int y = rand() % n + 1; while ((player[y].name == "女巫 " || player[y].name == "预言家 " || y == kill1) || player[y].life == 0) y = rand() % n + 1; kill2 = y; } } else { Sleep(3000); system("cls"); print(hhh, hhhh); cout << "请问你是否要用毒药???" << endl; Sleep(3000); cout << "请问你要毒谁???" << endl; Sleep(3000); } } Sleep(3000); system("cls"); print(hhh, hhhh); cout << "女~巫~请~闭~眼~~~" << endl; if (n > 6) { Sleep(3000); system("cls"); print(hhh, hhhh); cout << "预~言~家~请~睁~眼~~~" << endl; if (player[MY].name == "预言家 " && player[MY].life == 1) { Sleep(3000); cout << "请问你想查验谁???" << endl << "输入:"; int x; cin >> x; player[x].know = 1; Sleep(2000); system("cls"); print(hhh, hhhh); cout << "他的身份是:"; if (player[x].name == "狼人 ") cout << "狼人" << endl; else cout << "好人" << endl; Sleep(3000); } else { Sleep(3000); cout << "请问你想查验谁???" << endl; Sleep(3000); system("cls"); print(hhh, hhhh); cout << "他的身份是:......"; Sleep(3000); } Sleep(3000); system("cls"); print(hhh, hhhh); cout << "预~言~家~请~闭~眼~~~" << endl; } Sleep(3000); if (kill1 != 0) player[kill1].life = 0; if (kill2 != 0) player[kill2].life = 0; player[kill1].how = 1; player[kill2].how = 3; system("cls"); system("color F0"); print(hhh + 1, 0); } bool lr = 0; void panduanlieren() { if (lr == 1) return; if (MY == lieren) { cout << "请射杀一名玩家" << endl; int x; cin >> x; while (player[x].life != 1) { cout << "输入错误,请重新输入" << endl; cin >> x; } Sleep(1000); cout << lieren << "号猎人发动技能,开枪带走了" << x << "号" << endl; player[x].life = 0; player[x].how = 4; } else if (n >= 9) { srand(time(0)); int x = rand() % n + 1; while (player[x].life != 1) { x = rand() % n + 1; } Sleep(1000); cout << lieren << "号猎人发动技能,开枪带走了" << x << "号" << endl; player[x].life = 0; player[x].how = 4; } lr = 1; } void print1() { cout << "天亮了,昨晚"; if (kill1 != 0 || kill2 != 0) { cout << kill1 << "号"; if (kill2 != 0) { cout << "," << kill2 << "号"; kill2 = 0; } cout << "被杀" << endl; } else cout << "是平安夜" << endl; } int main() { system("cls"); cout << " " << "狼人杀online" << endl; cout << "请输入人数个数:" << endl; scanf("%d", &n); cout << "加载时间长,请耐心等待"; init1(); init2(n); int k = 1; do { srand(time(0)); init3(k); cout << "."; Sleep(17); k++; } while (k <= n); system("cls"); system("color F0"); cout << "游戏即将开始"; for (int i = 1; i <= 6; i++) { cout << "."; Sleep(500); } Sleep(1500); cout << endl << endl << "请大家查看身份牌......" << endl; Sleep(45); srand(time(0)); MY = rand() % n + 1; cout << "您的身份是:" << player[MY].name << endl; Sleep(500); cout << "在" << player[MY].num << "号位上" << endl; system("pause"); system("cls"); player[MY].know = 2; print(1, 0); cout << "即将进入夜晚"; for (int i = 1; i <= 6; i++) { cout << "."; Sleep(500); } night(); print1(); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } if (player[lieren].life == 0 && lr == 0) { panduanlieren(); } if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } toupiao(2, 0); system("cls"); print(2, 0); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } else if (player[lieren].life == 0 && lr == 0) { panduanlieren(); } cout << "即将进入夜晚"; for (int i = 1; i <= 6; i++) { cout << "."; Sleep(500); } night2(2, 1); print1(); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } if (player[lieren].life == 0 && lr == 0) { panduanlieren(); } if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } toupiao(3, 0); system("cls"); print(3, 0); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } else if (player[lieren].life == 0 && lr == 0) { panduanlieren(); } cout << "即将进入夜晚"; for (int i = 1; i <= 6; i++) { cout << "."; Sleep(500); } night2(3, 1); print1(); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } if (player[lieren].life == 0) { panduanlieren(); } if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } toupiao(4, 0); system("cls"); print(4, 0); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } else if (player[lieren].life == 0 && lr == 0) { panduanlieren(); } if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } cout << "即将进入夜晚"; for (int i = 1; i <= 6; i++) { cout << "."; Sleep(500); } night2(4, 1); print1(); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } if (player[lieren].life == 0) { panduanlieren(); } if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } toupiao(5, 0); system("cls"); print(5, 0); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } else if (player[lieren].life == 0 && lr == 0) { panduanlieren(); } if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } cout << "即将进入夜晚"; for (int i = 1; i <= 6; i++) { cout << "."; Sleep(500); } night2(5, 1); print1(); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } if (player[lieren].life == 0) { panduanlieren(); } if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } toupiao(6, 0); system("cls"); print(6, 0); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } else if (player[lieren].life == 0 && lr == 0) { panduanlieren(); } if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } cout << "即将进入夜晚"; for (int i = 1; i <= 6; i++) { cout << "."; Sleep(500); } night2(6, 1); print1(); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } if (player[lieren].life == 0) { panduanlieren(); } if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } toupiao(7, 0); system("cls"); print(7, 0); if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } else if (player[lieren].life == 0 && lr == 0) { panduanlieren(); } if (game_over()) { Sleep(1000); system("cls"); cout << "游戏结束" << endl; printhhh(); return 0; } while (1) system("pause"); return 0; } 吴攸 0 - - - - - - - - - - - - - - - - - - -
145 黄靖益1 18580149013@qq.com 益布响完辣 0 - - - - - - - - - - - - - - - - - - -
145 10255 1016884202@qq.com 10255 0 - - - - - - - - - - - - - - - - - - -
145 蔡蕊池 9655@163.com 蔡蕊池 0 - - - - - - - - - - - - - - - - - - -
145 zhuqihang 134234143231@qq.com 鸿恩实验学校 新壹街 朱启航 6216 0 - - - - - - - - - - - - - - - - - - -
145 段淏泷 daun123@163.com 段淏泷 0 - - - - - - - - - - - - - - - - - - -
145 孙浩森 13512670226@qq.com sb 0 - - - - - - - - - - - - - - - - - - -
145 徐伟宸1 xu123@xiao.com 重庆江北新村国兴小学 徐伟宸 12号 0 - - - - - - - - - - - - - - - - - - -
145 一位老六 287436289463574369857463756473865743679584@qq.com 沈煜恒 0 - - - - - - - - - - - - - - - - - - -
145 赵奕铭 15340514169@qq.com 赵奕铭 0 - - - - - - - - - - - - - - - - - - -
145 勾晨禹 21317653485@qq.ocm cxk小学 勾晨禹 cxk 0 - - - - - - - - - - - - - - - - - - -
145 zcx 456852145@qq.com zcx 0 - - - - - - - - - - - - - - - - - - -
145 zyb 1376479100@qq.com 6 时代一校-赵彦博 777 0 - - - - - - - - - - - - - - - - - - -
145 周芷乐 25869147@qq.com 就不告诉你小学 Accepted 38 0 - - - - - - - - - - - - - - - - - - -
145 shihaocheng 623589658@QQ.com 时代2校+施皓宬 0 - - - - - - - - - - - - - - - - - - -
145 hechenxuan23005 hechenxuan23005@qq.com hechenxuan7891 77889911 曼波(*^-^*) Chyc 13696419997 0 - - - - - - - - - - - - - - - - - - -
145 Angel 03240517@qq.com 时代二校-焦雨齐 0 - - - - - - - - - - - - - - - - - - -
145 wxy wangxiyi@qq.com 王玺懿 0 - - - - - - - - - - - - - - - - - - -
145 15823239925 safdfdasfa@qq.com 15823239925 0 - - - - - - - - - - - - - - - - - - -
145 1234567A 250250SB@qq.com 邓皓天 0 - - - - - - - - - - - - - - - - - - -
145 chentaiyu 2420952579@qq.com 陈泰羽 0 - - - - - - - - - - - - - - - - - - -
145 liqc liqc@xiaoma.cn 0 - - - - - - - - - - - - - - - - - - -
145 张瑞博 835075947@qq.com 张瑞博 15340370530 0 - - - - - - - - - - - - - - - - - - -
145 何中蓉 he123@xiao.com 何中蓉 0 - - - - - - - - - - - - - - - - - - -
145 胡靖欢1 567768789@qq.com 爱琴海校区-胡靖欢 0 - - - - - - - - - - - - - - - - - - -
145 鸡鸡爆 114514114514@qq.com 猪猪侠小学 鸡鸡爆 114514 0 - - - - - - - - - - - - - - - - - - -
145 xuweiming1 18696760996@qq.com xuweiming1 0 - - - - - - - - - - - - - - - - - - -
145 反恐皮蛋 guozh@xiaoma.cn 小码王 Jose 23 0 - - - - - - - - - - - - - - - - - - -
145 zhangshuhan 910296338@qq.com 我是大傻逼,也是猪🐖。 0 - - - - - - - - - - - - - - - - - - -
145 陈家齐1 357765456@qq.com 陈家齐 0 - - - - - - - - - - - - - - - - - - -
145 千千万万 250250250@qq.com 千千万万 0 - - - - - - - - - - - - - - - - - - -
145 李嘉齐 7777777719@qq.cm 金沙校区-李嘉齐 0 - - - - - - - - - - - - - - - - - - -
145 胡老师 21781270@qq.com 胡老师 0 - - - - - - - - - - - - - - - - - - -
145 LittleHair 13368436234@163.com LittleHair 0 - - - - - - - - - - - - - - - - - - -
145 唐翰 4153455846@qq.com 唐翰 0 - - - - - - - - - - - - - - - - - - -
145 彭杨博 14593277@qq.com 彭杨博 0 - - - - - - - - - - - - - - - - - - -
145 焦阳浩云 2201608@qq.com 高滩岩小学 Error404sans 32 0 - - - - - - - - - - - - - - - - - - -
145 付靖恩 24368584958@qq.com 付靖恩 0 - - - - - - - - - - - - - - - - - - -
145 徐博研 sdfadfgfdsg432@qq.com 徐博研 0 - - - - - - - - - - - - - - - - - - -
145 Erin erin_yang921@163.com Erin 0 - - - - - - - - - - - - - - - - - - -
145 唐培轩 18323010183@qq.com 唐培轩 0 - - - - - - - - - - - - - - - - - - -
145 江子墨 afsfsfs@qq.com 江子墨 666666666666 0 - - - - - - - - - - - - - - - - - - -
145 kxy 20141214@qq.com kxy 0 - - - - - - - - - - - - - - - - - - -
145 huangyvbo fdxdf@qq.com 沙坪坝小学 黄宇博 17 0 - - - - - - - - - - - - - - - - - - -
145 郝婉彤 ewraSD@qq.com 郝婉彤 0 - - - - - - - - - - - - - - - - - - -
145 覃博恩 1452201521@qq.com 鲁能巴蜀小学 覃博恩 1452201521 0 - - - - - - - - - - - - - - - - - - -
145 liuyuchen002 1016884201@qq.com 金沙校区 - 刘昱辰 0 - - - - - - - - - - - - - - - - - - -
145 chenyu 1234565432efrw@qq.com 陈于硕(我™的) 1000000000000000000000000000000000000000000000000000000000000000000 0 - - - - - - - - - - - - - - - - - - -
145 吴宗骏 dcdfvh@qq.com 吴宗骏 0 - - - - - - - - - - - - - - - - - - -
145 Zongzi1 1411599077@qq.com Zongzi1 0 - - - - - - - - - - - - - - - - - - -
145 苏承泽 CDXC166@qq.com 苏承泽 0 - - - - - - - - - - - - - - - - - - -
145 李晨逸 lcy12345@123.com 和你在一起,需要下地狱吗?那么,我去。 最新题目 0 - - - - - - - - - - - - - - - - - - -
145 shibowen 1342@163.com 时代一校石博文 0 - - - - - - - - - - - - - - - - - - -
145 mark 455584468@qq.com mark 0 - - - - - - - - - - - - - - - - - - -
145 mzr131113 ma13es@qq.com https://alpha1022.img.ihcr.top/cxk.jpg 高达 https://alpha1022.img.ihcr.top/cxk.jpg 0 - - - - - - - - - - - - - - - - - - -
145 陶欣垚 15320365169@qq.com 我就让你猜 盗号者该死 你的学号 0 - - - - - - - - - - - - - - - - - - -
145 PYMcn 511211322@qq.com PYMcn 0 - - - - - - - - - - - - - - - - - - -
145 whj 121123513543@qq.com whj 0 - - - - - - - - - - - - - - - - - - -
145 曹星羽 35768544@qq.con 曹星羽 0 - - - - - - - - - - - - - - - - - - -
145 爱搞笑的张浩宇 18002367250@qq.com 甘雨 0 - - - - - - - - - - - - - - - - - - -
145 sqmyb grgdf@qq.com sqmyb 0 - - - - - - - - - - - - - - - - - - -
145 heyi wererewr@qq.com heyi 0 - - - - - - - - - - - - - - - - - - -
145 liujuncheng 2560380557@qq.com 刘峻诚 0 - - - - - - - - - - - - - - - - - - -
145 郭睿 14785296@qq.com 郭睿 0 - - - - - - - - - - - - - - - - - - -
145 xzf 132123@qq.com xzf 0 - - - - - - - - - - - - - - - - - - -
145 刘鸿瑞 liuhongrui123@123.com 我是傻逼 0 - - - - - - - - - - - - - - - - - - -
145 dengbowen23017 dengbowen23017@qq.com dengbowen23017 0 - - - - - - - - - - - - - - - - - - -
145 蔺卓辰 awerksfhrlJdrfghjfdsdfgh@qq.com 苏大皮蛋 0 - - - - - - - - - - - - - - - - - - -
145 张斯瑒 13983136608@qq.com 金沙校区-张斯瑒 0 - - - - - - - - - - - - - - - - - - -
145 陈子欧 594610891@qq.com 陈子欧 NM 0 - - - - - - - - - - - - - - - - - - -
145 王昱杰 544643581@qq.com 小忙果 0 - - - - - - - - - - - - - - - - - - -
145 13883236511 tyhty@qq.com 鲁能巴蜀小学 取个名字真难 5号 0 - - - - - - - - - - - - - - - - - - -
145 冯隆浩 flh123@qq.com 时代一校 - 冯隆浩 0 - - - - - - - - - - - - - - - - - - -