首页
比赛
tracker
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
铺地毯
16条解析
开通博客写题解
Ldh1315109
发表于 2025-11-07 16:55:37
def solve(testcase): n = II() res = -1 A = [] for _ in range(n): a, b, g, k = MI() A.append((a, b, g, k)) x
展开全文
_name
发表于 2025-12-26 20:08:43
#include <vector> #include <iostream> using namespace std; /* 先把所有地毯的坐标储存起来 因为后面的地毯覆盖在前面的地毯上 所以,如果有多个包含点(x,y)的地毯,就输出最后一个 也就是反向遍历 如果符合条件,就退
展开全文
哈基图
发表于 2026-01-26 18:32:46
#include<bits/stdc++.h> using namespace std; bool cover(int x,int y,vector<int>pos){ int ldx = pos[0], ldy = pos[1]; int rux = ldx
展开全文
无聊的劳伦斯在做测评
发表于 2026-03-26 12:33:29
#include <stdio.h> int main() { int n = 0; scanf("%d", &n); int arr[n][4]; for (int i = 0; i < n; i++) { for (int j = 0;
展开全文
Sk1Em6er
发表于 2025-12-07 21:18:06
#include <stdio.h> //利用结构体解决 typedef struct { int a, b, g, k; } Carpet; int main() { int n; scanf("%d", &n);
展开全文
小white君
发表于 2026-01-27 22:14:01
#include <iostream> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullpt
展开全文
星璇Xx
发表于 2025-11-16 19:12:48
#include<bits/stdc++.h> using namespace std; const int N = 1e4 + 10; struct pet{ //地毯结构体 int a,b,g,k; }p[N]; int main(){ int n; cin >>
展开全文
nous1
发表于 2026-02-07 12:30:38
#include <iostream> using namespace std; class dit{ public: int x,y; int xp,yp; }; int main() { int n; cin>>n; int ans=-
展开全文
牛客592569079号
发表于 2026-02-01 16:00:18
#include<bits/stdc++.h> using namespace std; struct C { int x1,y1,x2,y2; }; int main() { int n; cin>>n; vector<C>q(
展开全文
Drink0318
发表于 2025-12-08 10:17:37
import sys flag = 0 # 读取所有输入行并转换为迭代器,方便逐行读取(避免一次性加载所有行,节省内存) # sys.stdin.read() 读取所有输入内容,splitlines() 按换行符分割成行列表,iter() 转为迭代器 data = iter(sys.stdin.
展开全文
查看本题
查看本题讨论
相关比赛
20960-2021秋季算法入门班第一章习题:模拟、枚举、贪心
进入比赛
127358-模拟枚举和贪心
进入比赛
等你来战
查看全部
牛客练习赛151
报名截止时间:2026-04-17 21:30
牛客周赛 Round 140
报名截止时间:2026-04-19 21:00
哈尔滨华德学院第十七届程序设计竞赛(同步赛)
报名截止时间:2026-05-31 20:00
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题