当前位置: 首页 > 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.zqtcl.cn/news/258248/

相关文章:

  • 做网站最好选什么语言百度域名服务器
  • 网站维护一般多久西宁的网站建设
  • 网站建设需要什么工具投诉百度最有效的电话
  • 做家政网站公司策划公司英文
  • 自己建设个人网站要花费多少自己怎么制作微信网页链接
  • 邢台网站设计哪家专业php图书管理系统网站开发
  • 怎么去建一个网站艺术设计专业
  • 中国优秀设计网站有哪些内容万能影视免费观看app
  • 网站做响应式还是移动端广告创意设计模板
  • 企业网站建设的要求标准营销型网站定做价格
  • 兰溪优秀高端网站设计郑州正规网站制作公司
  • 霸气业务网站源码网站建设运营服务公司
  • 做seo对网站推广有什么作用网站开发程序流程图
  • 旅游网站怎么建设网站开发+搜索
  • 三分钟做网站传统企业建设营销型网站
  • 必须在当地网站备案化妆品做备案的网站
  • 网站建设7个主要流程图创建全国文明城市工作要求
  • 张店网站开发招聘怎样做网站变手机软件
  • 聊城做网站的公司流程网页设计网站模板
  • 宿迁网站建设哪家专业做网站宁夏
  • 静态网站规范贵州城乡建设厅施工员报名网站
  • 湖北长安建设集团股份有限公司网站wordpress主题套用
  • 本地门户网站系统小米应用商店
  • 网站建设怎么用宁波建设网网点
  • 购物网站二级页面模板国家企业信用公示信息系统官网app
  • tp框架做餐饮网站快速建站教程网
  • php自己做网站wordpress下拉刷新
  • 怎么提高网站收录量专业网站优化公司
  • 重庆建站费用素材最多的网站
  • 银联支付网站建设html5网站模板