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

没学过计算机开始学做网站qq邮箱在线登录网页版

没学过计算机开始学做网站,qq邮箱在线登录网页版,酷站网官网,wordpress 通讯录插件资源限制 内存限制#xff1a;256.0MB C/C时间限制#xff1a;1.0s Java时间限制#xff1a;3.0s Python时间限制#xff1a;5.0s 问题描述 足球赛上#xff0c;只见Q神如闪电般的速度带球时而左#xff0c;时而右#xff0c;时而前#xff0c;时而后#xff…资源限制 内存限制256.0MB   C/C时间限制1.0s   Java时间限制3.0s   Python时间限制5.0s 问题描述 足球赛上只见Q神如闪电般的速度带球时而左时而右时而前时而后时而上时而下……等等有什么奇怪的东西混进去了假设Q神力量可以突破地心引力他在一个三维空间里面可以沿着直角坐标系的坐标轴方向前进。告诉你他的每一次转的方向以及前进的距离请你回答他最后在哪个位置面朝那一个方向。假设他一开始在000面朝x轴的正方向。 输入格式 多组输入数据。   每组第一行是一个整数n。接下来n行每行一个字符表示方向接着一个整数表示前进距离。其中fforward表示继续前进方向不变bback表示向后转lleft表示向左转rright表示像右转uup表示向上d表示向下。如图示。 输出格式 对于每一组数据输出Q神的坐标和他的朝向。其中左手系的x正方向、y正方向、z正方向分别位0、1、2对应的负方向分别为3、4、5. 样例输入 6 l 10 r 11 u 12 d 13 f 14 b 15样例输出 23 -10 12 3数据规模和约定 数据组数不超过10组n《200 每次移动距离不超过100 #includeiostream using namespace std; int next_face(int face,int foot,char orient){if(face0){if(foot5){if(orientf){face0;}else if(orientb){face3;}else if(orientl){face4;}else if(orientr){face1;}else if(orientu){face2;foot0;}else if(orientd){face5;foot3;}}if(foot1){if(orientf){face0;}else if(orientb){face3;}else if(orientl){face5;}else if(orientr){face2;}else if(orientu){face4;foot0;}else if(orientd){face1;foot3;}}if(foot2){if(orientf){face0;}else if(orientb){face3;}else if(orientl){face1;}else if(orientr){face4;}else if(orientu){face5;foot0;}else if(orientd){face2;foot3;}}if(foot4){if(orientf){face0;}else if(orientb){face3;}else if(orientl){face2;}else if(orientr){face5;}else if(orientu){face1;foot0;}else if(orientd){face4;foot3;}}}else if(face1){if(foot5){if(orientf){face1;}else if(orientb){face4;}else if(orientl){face0;}else if(orientr){face3;}else if(orientu){face2;foot1;}else if(orientd){face5;foot4;}}if(foot3){if(orientf){face1;}else if(orientb){face4;}else if(orientl){face5;}else if(orientr){face2;}else if(orientu){face0;foot1;}else if(orientd){face3;foot4;}}if(foot2){if(orientf){face1;}else if(orientb){face4;}else if(orientl){face3;}else if(orientr){face0;}else if(orientu){face5;foot1;}else if(orientd){face2;foot4;}}if(foot0){if(orientf){face1;}else if(orientb){face4;}else if(orientl){face2;}else if(orientr){face5;}else if(orientu){face3;foot1;}else if(orientd){face0;foot4;}}}else if(face2){if(foot4){if(orientf){face2;}else if(orientb){face5;}else if(orientl){face3;}else if(orientr){face0;}else if(orientu){face1;foot2;}else if(orientd){face4;foot5;}}if(foot3){if(orientf){face2;}else if(orientb){face5;}else if(orientl){face1;}else if(orientr){face4;}else if(orientu){face0;foot2;}else if(orientd){face3;foot5;}}if(foot1){if(orientf){face2;}else if(orientb){face5;}else if(orientl){face0;}else if(orientr){face3;}else if(orientu){face4;foot2;}else if(orientd){face1;foot5;}}if(foot0){if(orientf){face2;}else if(orientb){face5;}else if(orientl){face4;}else if(orientr){face1;}else if(orientu){face3;foot2;}else if(orientd){face0;foot5;}}}else if(face3){if(foot5){if(orientf){face3;}else if(orientb){face0;}else if(orientl){face1;}else if(orientr){face4;}else if(orientu){face2;foot3;}else if(orientd){face5;foot0;}}if(foot1){if(orientf){face3;}else if(orientb){face0;}else if(orientl){face2;}else if(orientr){face5;}else if(orientu){face4;foot3;}else if(orientd){face1;foot0;}}if(foot2){if(orientf){face3;}else if(orientb){face0;}else if(orientl){face4;}else if(orientr){face1;}else if(orientu){face5;foot3;}else if(orientd){face2;foot0;}}if(foot4){if(orientf){face3;}else if(orientb){face0;}else if(orientl){face5;}else if(orientr){face2;}else if(orientu){face1;foot3;}else if(orientd){face4;foot0;}}}else if(face4){if(foot5){if(orientf){face4;}else if(orientb){face1;}else if(orientl){face3;}else if(orientr){face0;}else if(orientu){face2;foot4;}else if(orientd){face5;foot1;}}if(foot3){if(orientf){face4;}else if(orientb){face1;}else if(orientl){face2;}else if(orientr){face5;}else if(orientu){face0;foot4;}else if(orientd){face3;foot1;}}if(foot2){if(orientf){face4;}else if(orientb){face1;}else if(orientl){face0;}else if(orientr){face3;}else if(orientu){face5;foot4;}else if(orientd){face2;foot1;}}if(foot0){if(orientf){face4;}else if(orientb){face1;}else if(orientl){face5;}else if(orientr){face2;}else if(orientu){face3;foot4;}else if(orientd){face0;foot1;}}}else if(face5){if(foot1){if(orientf){face5;}else if(orientb){face2;}else if(orientl){face3;}else if(orientr){face0;}else if(orientu){face4;foot5;}else if(orientd){face1;foot2;}}if(foot3){if(orientf){face5;}else if(orientb){face2;}else if(orientl){face4;}else if(orientr){face1;}else if(orientu){face0;foot5;}else if(orientd){face3;foot2;}}if(foot4){if(orientf){face5;}else if(orientb){face2;}else if(orientl){face0;}else if(orientr){face3;}else if(orientu){face1;foot5;}else if(orientd){face4;foot2;}}if(foot0){if(orientf){face5;}else if(orientb){face2;}else if(orientl){face1;}else if(orientr){face4;}else if(orientu){face3;foot5;}else if(orientd){face0;foot2;}}} } int main(){int n;while(cinn){int x0,y0,z0;//最开始时的坐标int face0;//脸的朝向 int foot5;//脚的站位 for(int i0;in;i){char orient;int num;cinorientnum;next_face(face,foot,orient);if(face0){xnum;}else if(face1){ynum;}else if(face2){znum;}else if(face3){x-num;}else if(face4){y-num;}else if(face5){z-num;}} coutx y z face endl;}return 0; } 思路需要知道Q神的脸的朝向、脚的站位头指向脚的方向才能确定Q神的位置。已知脸的朝向可能有4个站位。 例如初始位置脸的朝向为0脚的站位为5
http://www.dnsts.com.cn/news/44287.html

相关文章:

  • 百度网站空间html菜鸟工具
  • 肇庆北滘网站设计可以做网站的编程有什么
  • 兰州市网站建设网站被墙了什么意思
  • 网站 php .net手机网站建设机构
  • 企业网站可以免费做吗feed wordpress
  • 佛山网站制作流程wordpress博客空间
  • 网络公司如何建网站化妆品商城网站建设
  • 设计师一般是什么学历邢台seo技术
  • qq临时会话网站c语言软件开发和网站开发区别
  • 网站技术方案说明优是是什么网站
  • 站长平台工具建设网站通过什么赚钱
  • 本地网站模板修改如何设立网站
  • 小学网站建设情况汇报旅业认证二维码有什么用
  • 给实体店老板做的网站网页制作考证视频
  • 建设部网站统计m开头的网站建设公司
  • 南阳做网站许昌市网站建设
  • 跟我学做纸艺花网站有帮忙做网站的吗
  • 优质的南昌网站建设女和男做的视频网站
  • 服装网站建设教程WordPress主题里的AD
  • 广州市规划建设局网站花多少钱能把网站做到页面
  • 清远市建设局官方网站提供网站建设的功能
  • 有网站开发专业吗wordpress博客主题acg
  • 淄博网站排名外包软件开发公司账务处理
  • 如何推广公司网站学校学不到网站建设
  • 所以免费爱做网站网站开发素材包
  • 建设厅注册中心网站首页优秀广告案例分析
  • 公路局网站建设方案韩国网站模板下载地址
  • 旅游网站需求分析上海网站设计网页设计
  • 如何拷贝网站代码中企动力邮箱登陆
  • 天津网站开发公司网站开发 分类编码