网站首页 站内搜索

搜索结果

查询Tags标签: lights,共有 12条记录
  • 【设计模式】Java设计模式 - 外观模式

    Java设计模式 - 外观模式

    2022/9/15 1:17:18 人评论 次浏览
  • 蓝桥杯 --- (费解的开关)

    acwing 95 费解的开关 方法一:二进制枚举 + 位运算 + 递推 熄灯问题同方法解决,参考于郭炜老师; #include <iostream> #include <stdio.h> #include <string.h> #include <stdlib.h> using namespace std;//一共五行五列,每一行可以用一个字符来表…

    2022/1/28 23:34:44 人评论 次浏览
  • 2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛 HDU-1001 Cut The Wire

    Cut The Wire Problem Description In the country of Infinity , there is a strange road. This road only has a starting point, but no end. Since this road is infinite, there are also countless street lights. The street lights are numbered from 1(the star…

    2021/10/21 14:09:25 人评论 次浏览
  • 2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛 HDU-1001 Cut The Wire

    Cut The Wire Problem Description In the country of Infinity , there is a strange road. This road only has a starting point, but no end. Since this road is infinite, there are also countless street lights. The street lights are numbered from 1(the star…

    2021/10/21 14:09:25 人评论 次浏览
  • 设计模式——命令模式

    命令模式基本介绍命令模式(Command Pattern):在软件设计中,我们经常需要向某些对象发送请求,但并不知道请求的接受者是谁,也不知道被请求的操作是具体如何执行 命令模式使得请求发送者和请求接受者之间松耦合。 命令模式支持撤销功能如何解决 通过调用者发送指令,接…

    2021/9/30 23:10:50 人评论 次浏览
  • 设计模式——命令模式

    命令模式基本介绍命令模式(Command Pattern):在软件设计中,我们经常需要向某些对象发送请求,但并不知道请求的接受者是谁,也不知道被请求的操作是具体如何执行 命令模式使得请求发送者和请求接受者之间松耦合。 命令模式支持撤销功能如何解决 通过调用者发送指令,接…

    2021/9/30 23:10:50 人评论 次浏览
  • python 2nd 条件控制

    实例1#简单判断是否成年 age=19 if age>18:print("成年了") else:print("未成年") #输出:成年了 实例2#根据红绿灯执行 lights="blue" if lights == "red":print("stop") elif lights == "green":print…

    2021/8/28 12:36:10 人评论 次浏览
  • python 2nd 条件控制

    实例1#简单判断是否成年 age=19 if age>18:print("成年了") else:print("未成年") #输出:成年了 实例2#根据红绿灯执行 lights="blue" if lights == "red":print("stop") elif lights == "green":print…

    2021/8/28 12:36:10 人评论 次浏览
  • 「ARC105F」Lights Out on Connected Graph

    题目 点这里看题目。 分析 手玩容易发现 good graph 的第二条要求等价于 \(G\) 是二分图。说明: 设 \(x_u\) 表示某种方案中 \(u\) 是否被操作。 那么有 \(|E|\) 条方程。对于 \((u,v)\in E\),方程的形式为 \(x_u\oplus x_v=1\)。 取出任意的相邻两条边,比如 \((u,v),(…

    2021/8/9 23:37:17 人评论 次浏览
  • 「ARC105F」Lights Out on Connected Graph

    题目 点这里看题目。 分析 手玩容易发现 good graph 的第二条要求等价于 \(G\) 是二分图。说明: 设 \(x_u\) 表示某种方案中 \(u\) 是否被操作。 那么有 \(|E|\) 条方程。对于 \((u,v)\in E\),方程的形式为 \(x_u\oplus x_v=1\)。 取出任意的相邻两条边,比如 \((u,v),(…

    2021/8/9 23:37:17 人评论 次浏览
  • c++ 北大oj1222 熄灯问题

    #include <bitset> #include <memory> #include <cstring> #include <iostream> using namespace std; bitset<6> source[5], result[5], lights[5]; bitset<6> line; //000000~111111 0-2^6-1 void input_source() /*原始数据…

    2021/7/12 14:05:48 人评论 次浏览
  • c++ 北大oj1222 熄灯问题

    #include <bitset> #include <memory> #include <cstring> #include <iostream> using namespace std; bitset<6> source[5], result[5], lights[5]; bitset<6> line; //000000~111111 0-2^6-1 void input_source() /*原始数据…

    2021/7/12 14:05:48 人评论 次浏览
扫一扫关注最新编程教程