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

长沙网站托管优化哪个网站做视频钱多

长沙网站托管优化,哪个网站做视频钱多,网络营销推广方案模板,湖州哪里做网站先上题目#xff1a; https://icpcarchive.ecs.baylor.edu/external/67/6755.pdf 题目复制起来比较麻烦。 题意#xff1a;定义一种操作#xff1a;给出一个字符串#xff0c;然后手指就按照给出的字符串的字符出现顺序不离开触摸屏那样移动#xff0c;这样最后就会得到一…先上题目 https://icpcarchive.ecs.baylor.edu/external/67/6755.pdf 题目复制起来比较麻烦。     题意定义一种操作给出一个字符串然后手指就按照给出的字符串的字符出现顺序不离开触摸屏那样移动这样最后就会得到一个字符串(不一定等于给出的字符串)现在再给你一堆字符串问你这些字符串根据给你的顺序最先出现的是哪一个字符串是得到的那个字符串的子序列。如果没有出现的话就输出NO SOLUTION。   做法先求出那个字符串然后再逐个逐个字符串找。关于怎样求这个字符串说起来好像有点复杂大概的做法就是在判断划过某两个字符的过程中会有哪些字符的时候先缩小枚举的范围然后对于范围里面的每一个字符都进行一次判断判断的方法是使用叉积来判断如果这个判断的字符的四个角不都在原来的那两个字符连成的线段的一侧的话说明就是穿过的(注意刚好在线上的情况)。具体实现看代码。   上代码   1 #include cstdio2 #include cstring3 #include cmath4 #include algorithm5 #include iostream6 #include string7 #define APH 268 #define MAX 10029 using namespace std;10 11 12 typedef struct Point{13 int x,y;14 15 Point(int x0,int y0):x(x),y(y){}16 17 }Point;18 typedef Point Vector;19 Vector operator (Point A,Point B){ return Vector(B.xA.x,B.yA.y);}20 Vector operator - (Point A,Point B){ return Vector(B.x-A.x,B.y-A.y);}21 Vector operator * (Point A,int e){ return Point(A.x*e,A.y*e);}22 Vector operator / (Point A,int e){ return Point(A.x/e,A.y/e);}23 24 int Dot(Vector A,Vector B){ return A.x*B.x A.y*B.y;}25 inline int Cross(Vector A,Vector B){ return A.x*B.y - A.y*B.x;}26 27 int cx[]{-1,1,1,-1};28 int cy[]{1,1,-1,-1};29 30 string path[APH][APH];31 Point pos[APH];32 char ch[APH][APH];33 34 Point getPoint(char c){35 if(cE) return Point(c-A2,4);36 else{37 return Point((c-F)%71,3-(c-F)/7);38 }39 }40 41 bool check(Point A,Point B,Point C){42 bool b0,l0;43 A.x*2; A.y*2;44 B.x*2; B.y*2;45 C.x*2; C.y*2;46 Point u;47 for(int i0;i4;i){48 uPoint(C.xcx[i],C.ycy[i]);49 if(Cross(A-u,B-u)0) b|1;50 if(Cross(A-u,B-u)0) l|1;51 }52 return bl;53 }54 55 string GetPath(int a,int b){56 string ans;57 if(ab) return ans;58 int axpos[a].x,aypos[a].y;59 int bxpos[b].x,bypos[b].y;60 for(int i ax ; (ax bx ? ibx : ibx) ; (ax bx ? i : i--) ){61 for(int j ay ; (ay by ? jby : jby) ; (ay by ? j : j--)){62 if(ch[i][j]0) continue;63 if(check(pos[a],pos[b],pos[ch[i][j]-A])) ansch[i][j];64 }65 }66 //if(ans.length()1) return ;67 ans ans.substr(1,max((int)(ans.length()-2),0));68 //coutansendl;69 return ans;70 }71 72 void prepare(){73 memset(ch,0,sizeof(ch));74 for(int i0;iAPH;i){75 pos[i]getPoint(Ai);76 ch[pos[i].x][pos[i].y]Ai;77 // coutch[pos[i].x][pos[i].y] ;78 }79 // coutendl;80 for(int i0;iAPH;i){81 for(int j0;jAPH;j){82 path[i][j]GetPath(i,j);83 // coutpath[i][j]endl;84 }85 }86 }87 88 string connect(string st){89 string ans;90 ansst[0];91 for(unsigned int i1;ist.length();i){92 anspath[st[i-1]-A][st[i]-A];93 ansst[i];94 }95 //ansst[st.length()-1];96 return ans;97 }98 99 bool check_str(string s,string str){ 100 unsigned i,j; 101 for(i0,j0;is.length();i){ 102 if(s[i]str[j]){ 103 j; 104 if(jstr.length()) return 1; 105 } 106 } 107 return 0; 108 } 109 110 int main() 111 { 112 int t,n; 113 string st,s,str; 114 //freopen(data.txt,r,stdin); 115 ios::sync_with_stdio(false); 116 prepare(); 117 cint; 118 while(t--){ 119 cinnst; 120 sconnect(st); 121 //cout* sendl; 122 bool f0; 123 for(int i0;in;i){ 124 cinstr; 125 //coutstrendl; 126 if(!f check_str(s,str)){ 127 f1; 128 coutstrendl; 129 } 130 } 131 if(!f) coutNO SOLUTIONendl; 132 } 133 return 0; 134 } /*6755*/     转载于:https://www.cnblogs.com/sineatos/p/3969014.html
http://www.pierceye.com/news/651269/

相关文章:

  • 南阳网站建设icp备手机应用商店免费下载
  • 网站开发测量像素工具网站模板包含哪些内容
  • 南昌网站排名优化费用湖北公众号定制开发
  • 个人主页自助建站凡科网干嘛的
  • 网站后台上传图片不显示品牌营销咨询公司
  • 卖房网站母亲节做什麽活动从传播的角度
  • 永久免费的cad软件seo咨询
  • 网站邮件功能设计理论网站排名软件包年
  • wordpress语言文件编辑专业的企业网站优化公司
  • 正定网站建设制作公司wordpress去掉模板登录
  • 定制开发一个网站多少钱网站开发项目的心得体会
  • 网站被做跳转怎么办个人网站开发软件
  • 湛江网站制作费用南昌建站系统外包
  • 杭州市住房和城乡建设厅网站网页设计个人网站作业
  • 钦州建站哪家好杭州网站建站平台
  • 程序员做笔记的网站在线简历制作系统
  • 有一个网站自己做链接获取朋友位置wordpress504
  • 设计感 网站wordpress企业内网主题
  • 金塔精神文明建设网站上线了小程序制作平台
  • 东莞阳光网站建设成效网站内容营销
  • 阿里云做网站吗深圳香蜜湖街道
  • 营销型网站名词解释关键词有几种类型
  • 高端网站建设浩森宇特Php做网站要求
  • 盐田高端网站建设湖南网站seo营销多少费用
  • 福州建设招聘信息网站东莞房价将暴跌
  • 外包做网站的要求怎么写网站建设调查分析
  • 北京网站建设公司哪个最好鲜花网页设计模板
  • 汕头网站制作方法江苏网站设计公司
  • 免费1级做看网站上海策朋网站设计公司
  • 自贡做网站的公司wordpress网站加密码