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

怎么用自己的电脑搭建网站做国际网站怎么发货

怎么用自己的电脑搭建网站,做国际网站怎么发货,建站网页建设,html做成网页题意#xff1a; 给20个水碗。朝上为‘0’或朝下为‘1’#xff0c;每次操作使三个碗翻转#xff0c;问使所有20个水碗都朝上#xff0c;至少翻多少次#xff1f; 题目#xff1a; The cows have a line of 20 water bowls from which they drink. The bowls can be e…题意 给20个水碗。朝上为‘0’或朝下为‘1’每次操作使三个碗翻转问使所有20个水碗都朝上至少翻多少次 题目 The cows have a line of 20 water bowls from which they drink. The bowls can be either right-side-up (properly oriented to serve refreshing cool water) or upside-down (a position which holds no water). They want all 20 water bowls to be right-side-up and thus use their wide snouts to flip bowls. Their snouts, though, are so wide that they flip not only one bowl but also the bowls on either side of that bowl (a total of three or – in the case of either end bowl – two bowls). Given the initial state of the bowls (1undrinkable, 0drinkable – it even looks like a bowl), what is the minimum number of bowl flips necessary to turn all the bowls right-side-up? Input Line 1: A single line with 20 space-separated integers Output Line 1: The minimum number of bowl flips necessary to flip all the bowls right-side-up (i.e., to 0). For the inputs given, it will always be possible to find some combination of flips that will manipulate the bowls to 20 0’s. Sample Input 0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 Sample Output 3 Hint Explanation of the sample: Flip bowls 4, 9, and 11 to make them all drinkable: 0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 [initial state] 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 [after flipping bowl 4] 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 [after flipping bowl 9] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [after flipping bowl 11] 分析 这个题直接暴力过得直接正反遍历找最小值还有一种构造增广矩阵类似于根据开关的关系构造有向图的邻接矩阵构造增广矩阵高斯消元枚举自由元二进制枚举状态寻找最小值的方法因为时间关系就没有去钻研在这提供下思路。 AC代码 #includestdio.h #includestring.h #includealgorithm using namespace std; int a[30],b[30]; int ans,num; int main(){for(int i1;i20;i){scanf(%d,a[i]);b[i]a[i];}numans0;for(int i1;i20;i){if(a[i]1){ans;a[i1]!a[i1];a[i2]!a[i2];}}for(int i20;i1;i--){if(b[i]1){num;b[i-1]!b[i-1];b[i-2]!b[i-2];}}ansmin(ans,num);printf(%d\n,ans);return 0; }
http://www.pierceye.com/news/258248/

相关文章:

  • 可以用asp做哪些网站简历模板大学生免费
  • 公司 宜宾网站建设头条小程序
  • 大连h5建站学院网站建设申请报告
  • 大蒜做营销型网站贵州最好的网站建设推广公司
  • 单仁资讯做网站怎样备案网站应用服务
  • 如何生成一个网站怎么查看一个网站有没有做推广
  • 温州网站设计案例wdcp创建多个网站
  • 做个公司网站专业做网站app的公司
  • 动漫网站源码下载莱芜金点子最新招工信息
  • 小区住宅可以注册公司吗简述seo的概念
  • 做农村电商要多少钱南宁软件优化网站
  • 网站系统建设技术服务费网站建设 专项资金变更
  • 网站建设画册怎么用eclipse做网页
  • 百度网站安全检测平台广州番禺营销型网站建设
  • 杭州大的做网站的公司甘肃省住房和城乡建设部网站首页
  • 网站建设与网页设计考试题棋牌软件开发搭建
  • 短链接生成网址wordpress主叶SEO优化
  • 免费的cms视频网站做cpa怎么建立自己网站
  • 在哪里找做网站的北京的招聘网站有哪些
  • 做旅行网站aspx网站开发
  • 网站接入服务器商查询wordpress更换端口
  • 网站网页设计师武义县网站建设
  • 中铁建设集团有限公司官网建站到网站收录到优化
  • 做seo网站要多少钱网页设计师好吗
  • 建设部网站 绿色建筑评价表哪里页面设计培训好
  • 西部数码网站源码虹桥做网站公司
  • 生鲜网站开发wordpress mysql 链接
  • 做网站是怎么挣钱的网站建设福永附近网络公司
  • 关于网站制作的评价.net网站制作综合实训报告
  • 合肥专业制作网站科技创新绘画作品图片