首页
比赛
tracker
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
小A的线段(easy version)
6条解析
开通博客写题解
银河护胃队
发表于 2026-02-22 10:03:31
#include<bits/stdc++.h> using namespace std; const int N=1e5+10,P=998244353; int n,m,res; vector<pair<int,int>> v; vector<int&g
展开全文
阿彪b
发表于 2025-12-17 22:02:57
//递归遍历m个线段选或者不选的情况。 //使用1-n的差分数组记录每个点被几个线段覆盖 #include <bits/stdc++.h> using namespace std; int n,m,ans=0; vector<pair<int,int>> xd(1
展开全文
冷艳的西红柿刷牛客
发表于 2025-10-27 12:12:23
#include <iostream> #include <vector> using namespace std; int line[10][2]; int n, m, ans; const int p = 998244353; bool judge(vector
展开全文
丨阿伟丨
发表于 2025-08-29 12:02:13
题目链接 小A的线段(easy version) 题目描述 在坐标轴的整数点 上给出 条闭区间线段,第 条线段用其端点 描述。 现在要从这 条线段中选择若干条,使得每个整数点被至少两条所选线段覆盖。求满足条件的选择方案数量。 两种方案视为不同,当且仅当存在某条线段在两方案中的“选不选”状态
展开全文
牛客754921490号
发表于 2025-12-22 15:01:58
#include <iostream> #include <istream> #include <ratio> #include <vector> #include <unordered_map> #include <algorith
展开全文
greatofdream
发表于 2025-08-26 18:55:53
n, m = map(int, input().split()) edges = [list(map(int, input().split())) for _ in range(m)] boundary = [] for i, e in enumerate(edges): boundary
展开全文
查看本题
查看本题讨论
相关比赛
75819-小白月赛90内测
进入比赛
78306-牛客小白月赛90
进入比赛
79851-0407新生组复习
进入比赛
79946-0407新生组复习题
进入比赛
79996-选拔赛
进入比赛
等你来战
查看全部
牛客小白月赛129
报名截止时间:2026-02-27 21:00
牛客周赛 Round 133
报名截止时间:2026-03-01 21:00
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题