当前位置: 首页 > news >正文

英文网站的外部链接 建设公司名字变了网站备案

英文网站的外部链接 建设,公司名字变了网站备案,接收新网站如何做诊断,和老妇做爰视频网站任务 学校演讲比赛#xff0c;12人#xff0c;两轮#xff0c;第一轮淘汰赛#xff0c;第二轮决赛 选手编号 [ 10001 - 10012 ] 分组比赛 每组6人 10个评委 去除最高分 最低分#xff0c;求平均分 为该轮成绩 每组淘汰后三名#xff0c;前三名晋级决赛 决赛 前三名胜出 … 任务 学校演讲比赛12人两轮第一轮淘汰赛第二轮决赛 选手编号 [ 10001 - 10012 ] 分组比赛 每组6人 10个评委 去除最高分 最低分求平均分 为该轮成绩 每组淘汰后三名前三名晋级决赛 决赛 前三名胜出 每轮 比赛过后 要显示晋级选手信息 点击此处-下载源代码 功能 开始演讲比赛完成 一整届比赛流程每阶段给用户提示任意键进入下一阶段查看往届记录查看比赛前三名结果每次比赛都记录到文件中用*.csv存储清空记录将文件中数据清空退出程序将文件中数据清空 效果图 speechManager.h #pragma once #include iostream #include vector #include map #include algorithm #include deque #include functional #include numeric #include fstream #includespeaker.h using namespace std; /*1.提供惨淡界面与用户交互2.对演讲比赛流程进行控制3.与文件读写交互 */ class SpeechManager { public:vectorint v1; //比赛选手 12人 第一轮vectorint v2; //第一轮晋级 6人vectorint vVectory; //晋级 3人mapint, Speaker m_Speaker;//编号具体选手 map容器int m_Index; //比赛轮数mapint, vectorstring m_Record; //存放往届记录bool fileIsEmpty; //file是否为空SpeechManager();void show_Menu();void initSpeech(); //初始化容器属性void createSpeaker(); //创建12名选手void exit_Sys_0();void speechDraw(); //抽签void speechContest(); //竞赛void showScore(); //显示得分void saveRecord(); //Save 记录void startSpeech_1(); //开始整个流程void loadRecode(); //读取往届记录void showRecode_2(); //查看记录void clearRecode_3();~SpeechManager(); };class printVectorInt{ public:void operator()(int val) {cout val ; ;} };speaker.h #pragma once #include iostream using namespace std;class Speaker { public:void setSpeakerName(string name);void setSpeakerS1(double a);void setSpeakerS2(double a);string getName();double* getScore();private:string m_Name;double* m_Score new double[2]; //两轮得分数组 }; SpeechCompetition_Sys.cpp #includeiostream #includestring #include ctime #includespeechManager.h #includespeaker.husing namespace std;int main() {srand((unsigned int)time(NULL));SpeechManager sm; //test://for (mapint, Speaker::iterator it sm.m_Speaker.begin(); it ! sm.m_Speaker.end(); it) {// double* arr it-second.getScore();// cout Test ID: it-first// \t Name: it-second.getName()// \t Score: arr[0] endl;//}int inputChoice -1;while (1) {sm.show_Menu();cout Please input Your Choice : endl;cin inputChoice;switch (inputChoice) {case 1: //开始比赛sm.startSpeech_1();break;case 2: //往届记录sm.showRecode_2();break;case 3: //清空记录sm.clearRecode_3();break;case 0: //退出sm.exit_Sys_0();break;default:system(cls);break;}}system(pause);return 0; }speaker.cpp #includespeaker.h #includestring using namespace std;void Speaker::setSpeakerName(string name) {this-m_Name name; }void Speaker::setSpeakerS1(double a) {this-m_Score[0] a; }void Speaker::setSpeakerS2(double a) {this-m_Score[1] a; }string Speaker::getName() {return m_Name; } double* Speaker::getScore() {return this-m_Score; /*Speaker s;string name GodOuO;double score[2] { 12,34.5 };s.setSpeaker(name, score);double* arr s.getScore();cout arr[0] arr[1];delete[] arr; */ } speechManager.cpp #includespeechManager.hSpeechManager::SpeechManager() {this-initSpeech(); //初始化容器属性this-createSpeaker(); //创建12名选手this-loadRecode(); //加载数据 }void SpeechManager::show_Menu() {cout ******************************* endl *****SpeechCompetition_Sys***** endl **********#1.Start ********** endl **********#2.Histry ********** endl **********#3.Clean ********** endl **********#0.Quit ********** endl endl; }void SpeechManager::exit_Sys_0() {cout Bye Bye !!! endl;system(pause);exit(0); }void SpeechManager::initSpeech() {//容器置空this-v1.clear();this-v2.clear();this-vVectory.clear();this-m_Speaker.clear();//index置空this-m_Index 1;this-m_Speaker.clear(); }void SpeechManager::createSpeaker() {string nameSpace ABCDEFGHIJKL;for (int i 0; i nameSpace.length(); i){string name Name;name nameSpace[i];Speaker s;s.setSpeakerName(name);s.setSpeakerS1(0.0);s.setSpeakerS2(0.0);this-v1.push_back(i 10001); //选手编号 存入v1this-m_Speaker.insert(make_pair(i 10001, s));//选手编号 和对应选手 存入map} }void SpeechManager::speechDraw() {cout The No.( this-m_Index ) Rounds Player is Drawing... endl ----------------------------------------------------- endl The Order is : endl;if (1 this-m_Index) { //Round 1random_shuffle(v1.begin(),v1.end());for_each(v1.begin(), v1.end(), printVectorInt());}else if (2 this-m_Index) { //Round 2random_shuffle(v2.begin(), v2.end());for_each(v2.begin(), v2.end(), printVectorInt());}cout endl ----------------------------------------------------- endl;system(pause);cout endl; }void SpeechManager::speechContest() {cout The No.( this-m_Index ) Rounds Contest is Fighting... endl ----------------------------------------------------- endl;vectorint v_Player; //比赛选手容器multimapdouble, int, greaterdouble groupScore; //准备临时容器存放小组成绩int num 0; //记录人员个数 6人一组if (1 this-m_Index) {v_Player this-v1;}else if (2 this-m_Index) {v_Player this-v2;}for (vectorint::iterator it v_Player.begin(); it ! v_Player.end(); it){ //遍历所有选手dequedouble d; //评委打分num; //统计人数for (int i 0; i 10; i){double score (rand() % 401 600) / 10.f; //(600-1000) /10.f//test:// coutTest:endl;//cout score ; ;d.push_back(score);}//cout endl;sort(d.begin(), d.end(), greaterdouble()); //倒叙排序d.pop_front(); //del Topd.pop_back(); //del Lastdouble sum accumulate(d.begin(), d.end(), 0.0f); //起始累加值 0.0f小数double avg sum / (double)d.size(); //平均分if (1 m_Index)this-m_Speaker[*it].setSpeakerS1(avg); //平均分 存入 map容器else if(2 m_Index)this-m_Speaker[*it].setSpeakerS2(avg); //平均分 存入 map容器groupScore.insert(make_pair(avg, *it)); //key 平均成绩value IDif (0 num % 6) { //每六个人 取前三cout No. num / 6 group‘s Contest List: endl ----------------------------------------------------- endl;for (multimapdouble,int,greaterdouble::iterator it groupScore.begin(); it ! groupScore.end(); it){double* arr this-m_Speaker[it-second].getScore();cout ID: it-second \tName: this-m_Speaker[it-second].getName() \tScore: arr[this-m_Index - 1]endl;}//取走前三int count 0;for (multimapdouble, int, greaterdouble::iterator it groupScore.begin(); it ! groupScore.end() count 3; it,count){if (1 this-m_Index)this-v2.push_back((*it).second);else this-vVectory.push_back((*it).second);}groupScore.clear(); //del 缓存 组成绩cout endl;}/*cout Test: endl;double* arr this-m_Speaker[*it].getScore();cout ID: *it \tName: this-m_Speaker[*it].getName() \tScore: arr[0];*/} cout No.( this-m_Index ) group‘s Contest Done!!! endl;system(pause);cout endl; }void SpeechManager::showScore() {cout The No.( this-m_Index ) Rounds Winner List: endl ----------------------------------------------------- endl;vectorint v;if (1 this-m_Index){v v2;}else if (2 this-m_Index) {v vVectory;}for (vectorint::iterator it v.begin(); it! v.end(); it){double* arr this-m_Speaker[*it].getScore();cout ID: *it \tName: this-m_Speaker[*it].getName() \tScore: arr[this-m_Index - 1] endl;}cout endl;system(pause);system(cls);this-show_Menu(); }void SpeechManager::saveRecord() {ofstream ofs;ofs.open(speech.csv,ios::out | ios::app); //追加 写入for (vectorint::iterator it vVectory.begin(); it ! vVectory.end(); it) //数据写入文件{double* arr this-m_Speaker[*it].getScore(); //冠亚季三人ofs *it , arr[1] ,;}ofs endl;ofs.close();this-fileIsEmpty false;cout Save it!!! endl; }void SpeechManager::startSpeech_1(){//第一轮比赛1.抽签2.比赛3.显示结果this-speechDraw();this-speechContest();this-showScore();//第二轮比赛1.抽签2.比赛3.显示结果m_Index;this-speechDraw();this-speechContest();this-showScore();//保存分数到文件this-saveRecord();//重置比赛获取记录this-initSpeech(); //初始化容器属性this-createSpeaker(); //创建12名选手this-loadRecode(); //加载数据cout endl This Round is Finished!!! endl;system(pause);system(cls); }void SpeechManager::showRecode_2() {if (this-fileIsEmpty){cout File is Empty!!! endl;}else {for (int i 0; i this-m_Record.size(); i){cout NO.( i 1 ) Round Champions ID: this-m_Record[i][0] \tScore: this-m_Record[i][1] endl;cout NO.( i 1 ) Round No.2s ID: this-m_Record[i][2] \tScore: this-m_Record[i][3] endl;cout NO.( i 1 ) Round No.3s ID: this-m_Record[i][4] \tScore: this-m_Record[i][5] endl;}}system(pause);system(cls); }void SpeechManager::loadRecode() {ifstream ifs(speech.csv, ios::in);if (!ifs.is_open()) //文件不存在{this-fileIsEmpty true;//cout File is NOT Exist !!! endl;ifs.close();return;}//文件清空char c;ifs c;if (ifs.eof()) {this-fileIsEmpty true;//cout File is Empty !!! endl;ifs.close();return;}this-fileIsEmpty false;ifs.putback(c); //将上文读取单个字符 存回string data; int index 0; //第几届while (ifs data) {//test://cout data endl;int loc -1; //查到’‘ locint start 0;vectorstring vtemp; //存放 6个 string 字符串while (1){loc data.find(,, start);if (-1 loc) { //未找到 ’‘break;}string temp data.substr(start, loc - start);//test://cout temp endl;vtemp.push_back(temp);start loc 1;}this-m_Record.insert(make_pair(index, vtemp));index;}ifs.close();// test:// for (mapint,vectorstring::iterator it this-m_Record.begin(); it ! this-m_Record.end() ; it)//{// cout it-first// Winner ID: it-second[0]// \tScore: it-second[1] endl;//}}void SpeechManager::clearRecode_3(){cout endl Sure ? endl 1.Yes endl 2.No endl;int select 0;cin select;if (1 select) {//ios::trunc 如果文件存在删除文件 重新创建ofstream ofs(speech.csv, ios::trunc);ofs.close();//初始化this-initSpeech(); //初始化容器属性this-createSpeaker(); //创建12名选手this-loadRecode(); //加载数据cout Clean Done! endl;}system(pause);system(cls); }SpeechManager::~SpeechManager() { }
http://www.dnsts.com.cn/news/63666.html

相关文章:

  • 个人制作个网站活动线报app
  • 车行网站源码西安网站制作价格
  • 外贸营销系统湖南网站seo推广
  • 买的网站模板会影响有赞商城商家版
  • 怎样做京东网站网络营销是学什么
  • 学校要求做网站深圳建筑工地招聘信息
  • 漳州做网站建设游戏开发和软件开发哪个难
  • 专业网站设计速寻亿企邦湖北做网站教程哪家好
  • 个人特种证件查询网站ui界面设计实例100例
  • 广东企业网站seo报价做网站开发的公司哪家好
  • 南京做网站制作公司外贸网站建设公司流程图
  • 如何提交网站给百度重庆涪陵建设银行网站
  • 网站建设方案书写做一个app大概要多少钱
  • 郑州专业做淘宝网站汉阴县住房和城乡建设局网站
  • 自助建站系统有什么好处然后搭建网站
  • 网站特效怎么做自适应学广告设计去哪个学校好
  • 做外贸没网站可以吗数据分析师报名官网
  • 百度网站推广方案电商搜索关键词
  • 网页与网站设计说明软件下载官网源码
  • 驻马店做网站优化网站推广关键词排名
  • soho在哪里做网站网站建设需要提供什么东西
  • 成都网站设计推荐柚米wordpress08影院源码
  • 织梦猫网站模板中国最著名网站建设公司
  • 给别人做非法网站能判多久南通网站推广公司
  • go语做网站网站上不去原因
  • 什么蓝色 适合公司网站主色企业建立一个网站步骤
  • 购物网站宣传方案wordpress连接微博专业版 下载
  • 怎样做网站的ico图片驻马店营销型网站建设
  • 海南省建设集团有限公司网站吉林企业网络推广方法
  • 地和网站建设在线制作logo图片