首页
比赛
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
小心火烛的歪
14条解析
开通博客写题解
Leavery
发表于 2024-11-24 22:28:57
D题 bitset做法 直接枚举所有2^q种情况 因为数据范围很小 所以O(2^q*q*n*m)即可通过该题 #include <iostream> #include <bitset> using namespace std; int main() { int n,m,
展开全文
Nanssu
发表于 2025-03-11 15:19:12
#include <iostream> #include <bits/stdc++.h> #include <set> #include <vector> using namespace std; void dfs(vector<int>
展开全文
牛客336387193号
发表于 2025-03-26 19:53:05
用回溯法做,fireworks函数是回溯函数,如果填满了,且步数更少,就记录结果。重载了加减法方便一点。origin数组是记录的杂物,用于checkstone函数确保烟花没有放在杂物上面。 #include <iostream> #include<vector> using
展开全文
在记录秋招的四郎很想去夏威夷
发表于 2025-06-23 21:11:57
from itertools import combinations def main(): n, m, q = map(int, input().split()) gs = "".join(input().strip().replace(" &qu
展开全文
番禺小韭菜
发表于 2025-03-02 21:11:51
#include <iostream> #include <bitset> using namespace std; int main() { int n, m, q; cin >> n >> m >> q; bi
展开全文
在拧螺丝的他很有趣
发表于 2025-03-04 13:42:34
import copy # 获取可能的组合 def get_list(lst): def b(start, path): if path: result.append(path) for i in range(start, len(
展开全文
夜晚的精灵
发表于 2025-09-03 17:33:58
import java.util.*; import java.math.BigInteger; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static long initStatus; pu
展开全文
会飞的鱼20190425181601
发表于 2025-07-19 19:00:01
const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const tok
展开全文
爱读书的高级磨洋工很野蛮
发表于 2025-04-24 15:17:08
n,m,q=list(map(int,input().split())) grass=[] plan=[] for i in range(n): row=[] for j in input(): row.append(int(j)) grass.appe
展开全文
笑blue齿
发表于 2025-07-02 23:23:45
每个计划可以看作是一个n×m的二进制矩阵。当我们选择多个计划时,最终的燃放矩阵是这些计划的“或”(OR)运算结果:即某个位置只要在任意一个计划中被标记为1,那么该位置就是1。
查看本题
查看本题讨论
相关比赛
96115-牛客周赛 Round 69
进入比赛
96901-牛客周赛69内测
进入比赛
97419-24下第四次周赛
进入比赛
97425-测试
进入比赛
97564-实验室模拟赛11.26
进入比赛
等你来战
查看全部
牛客小白月赛120
报名截止时间:2025-09-05 21:00
牛客周赛 Round 108
报名截止时间:2025-09-07 21:00
牛客练习赛144
报名截止时间:2025-09-12 21:30
牛客周赛 Round 109
报名截止时间:2025-09-14 21:00
牛客挑战赛82
报名截止时间:2025-09-19 22:00
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题