2013长春现场赛 (hdu4819)Mosaic

YOLO26算法心电图十二导联目标检测+训练好的模型+368张数据集+pyqt可视化界面.zip 附训练好的 YOLO 权重与 PyQt 可视化检测界面,页面底部含可视化效果预览,毕设/课设开箱即用。 【数据集概况】 · 检测类别(中文):[导联I(I), 导联II(II), 导联III(III), 胸导联V1(V1), 胸导联V2(V2), 胸导联V3(V3), 胸导联V4(V4), 胸导联V5(V5), 胸导联V6(V6), 加压肢体导联aVF(aVF), 加压肢体导联aVL(aVL), 加压肢体导联aVR(aVR)] · 训练集:313 张 · 验证集:37 张 · 测试集:18 张 · 总计:368 张 该数据集聚焦于临床心电图信号的精准识别与定位,其核心检测目标为标准12导联心电图中的各个独立导联波形区域,涵盖肢体导联(I、II、III)与加压肢体导联(aVR、aVL、aVF),以及胸前导联(V1至V6),适用于心电图自动分析系统中对各导联位置的快速准确标注与分类。数据采集场景真实还原了医院心电图室或急诊监护环境下的标准心电图记录纸,波形清晰、基线稳定,具有高度临床参考价值。... 【训练曲线与评估图】 【模型训练配置】 参数 | 值 模型 | yolo26n 训练轮数 | 100 epochs 输入尺寸 | 640x640 批次大小 | 24 优化器 | auto 初始学习率 | 0.01 训练设备 【关键指标汇总】 训练了 57 个 epoch,最终轮指标: 指标 | 数值 mAP50 | **0.9708** mAP50-95 | 0.6344 Precision | 0.8990 Recall | 0.9191 train/box_loss | 1.2231 train/cls_loss | 0.9703 val/box_loss | 1.2779 val/cls_loss | 0.... 使用场景:毕业设计、课程设计、深度学习入门、工业场景落地验证。 立即下载


Mosaic

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 102400/102400 K (Java/Others)
Total Submission(s): 1494    Accepted Submission(s): 654


Problem Description
The God of sheep decides to pixelate some pictures (i.e., change them into pictures with mosaic). Here's how he is gonna make it: for each picture, he divides the picture into n x n cells, where each cell is assigned a color value. Then he chooses a cell, and checks the color values in the L x L region whose center is at this specific cell. Assuming the maximum and minimum color values in the region is A and B respectively, he will replace the color value in the chosen cell with floor((A + B) / 2).

Can you help the God of sheep?
 

Input
The first line contains an integer T (T ≤ 5) indicating the number of test cases. Then T test cases follow.

Each test case begins with an integer n (5 < n < 800). Then the following n rows describe the picture to pixelate, where each row has n integers representing the original color values. The j-th integer in the i-th row is the color value of cell (i, j) of the picture. Color values are nonnegative integers and will not exceed 1,000,000,000 (10^9).

After the description of the picture, there is an integer Q (Q ≤ 100000 (10^5)), indicating the number of mosaics.

Then Q actions follow: the i-th row gives the i-th replacement made by the God of sheep: xi, yi, Li (1 ≤ xi, yi ≤ n, 1 ≤ Li < 10000, Li is odd). This means the God of sheep will change the color value in (xi, yi) (located at row xi and column yi) according to the Li x Li region as described above. For example, an query (2, 3, 3) means changing the color value of the cell at the second row and the third column according to region (1, 2) (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4). Notice that if the region is not entirely inside the picture, only cells that are both in the region and the picture are considered.

Note that the God of sheep will do the replacement one by one in the order given in the input.
 

Output
For each test case, print a line "Case #t:"(without quotes, t means the index of the test case) at the beginning.

For each action, print the new color value of the updated cell.
 

Sample Input
  
1 3 1 2 3 4 5 6 7 8 9 5 2 2 1 3 2 3 1 1 3 1 2 3 2 2 3
 

Sample Output
  
Case #1: 5 6 3 4 6
 

Source
 

Recommend
liuyiding   |   We have carefully selected several similar problems for you:   5831  5830  5829  5827  5826 
题意:给你一个大矩阵,给你一个点的位置,再给小矩阵的大小,该点为小矩阵的中心,求出小矩阵的最大值和最小值(max和min),更改中心点的值为(max+min)/2。

思路:很明显要用二维线段树,这应该是二维线段树里的入门题。。。。。今天我也是第一次打,如果对一维线段树具有比较深刻的了解,只要稍微想想,画画图,大概就知道怎么写了,只不过代码比较多,找错要找半天。。。我手残l写成了1,还写错两次找了我半天,醉。。。下面给代码。

#include<iostream>
#include<stack>
#include<cstring>
#include<map>
#include<string>
#include<queue>
#include<algorithm>
#include<cstdio>
#include<set>
#include<cmath>
using namespace std;
#define maxn 805<<2
#define ll (now<<1)
#define rr (now<<1|1)
#define inf 0x3f3f3f3f
typedef long long LL;
int maxnum[maxn][maxn], minnum[maxn][maxn];
int n, index, jud, x, y, value, la, ra, lb, rb;
void buildson(int l, int r, int now){
	if (l == r){
		if (jud){
			scanf("%d", &maxnum[index][now]);
			minnum[index][now] = maxnum[index][now];
		}
		else{
			maxnum[index][now] = max(maxnum[index << 1][now], maxnum[index << 1 | 1][now]);
			minnum[index][now] = min(minnum[index << 1][now], minnum[index << 1 | 1][now]);
		}
		return;
	}
	int mid = (l + r) >> 1;
	buildson(l, mid, ll);
	buildson(mid + 1, r, rr);
	maxnum[index][now] = max(maxnum[index][ll], maxnum[index][rr]);
	minnum[index][now] = min(minnum[index][ll], minnum[index][rr]);
}
void build(int l, int r, int now){
	if (l == r){
		jud = true;
		index = now;
		buildson(1, n, 1);
		jud = false;
		return;
	}
	int mid = (l + r) >> 1;
	build(l, mid, ll);
	build(mid + 1, r, rr);
	index = now;
	buildson(1, n, 1);
}
void updateson(int l, int r, int now){
	if (l == r){
		if (jud){
			minnum[index][now] = value;
			maxnum[index][now] = value;
		}
		else{
			maxnum[index][now] = max(maxnum[index << 1][now], maxnum[index << 1 | 1][now]);
			minnum[index][now] = min(minnum[index << 1][now], minnum[index << 1 | 1][now]);
		}
		return;
	}
	int mid = (l + r) >> 1;
	if (y <= mid)
		updateson(l, mid, ll);
	else
		updateson(mid + 1, r, rr);
	maxnum[index][now] = max(maxnum[index][ll], maxnum[index][rr]);
	minnum[index][now] = min(minnum[index][ll], minnum[index][rr]);
}
void update(int l, int r, int now){
	if (l == r){
		jud = true;
		index = now;
		updateson(1, n, 1);
		jud = false;
		return;
	}
	int mid = (l + r) >> 1;
	if (x <= mid)
		update(l, mid, ll);
	else
		update(mid + 1, r, rr);
	index = now;
	updateson(1, n, 1);
}
int querymaxson(int l, int r, int now){
	if (lb <= l&&rb >= r){
		return maxnum[index][now];
	}
	int mid = (l + r) >> 1;
	int a = 0, b = 0;
	if (lb <= mid)
		a = querymaxson(l, mid, ll);
	if (rb > mid)
		b = querymaxson(mid + 1, r, rr);
	return max(a, b);
}
int querymax(int l, int r, int now){
	if (la <= l&&ra >= r){
		index = now;
		return querymaxson(1, n, 1);
	}
	int mid = (l + r) >> 1;
	int a = 0, b = 0;
	if (la <= mid)
		a = querymax(l, mid, ll);
	if (ra > mid)
		b = querymax(mid + 1, r, rr);
	return max(a, b);
}
int queryminson(int l, int r, int now){
	if (lb <= l&&rb >= r){
		return minnum[index][now];
	}
	int mid = (l + r) >> 1;
	int a = inf, b = inf;
	if (lb <= mid)
		a = queryminson(l, mid, ll);
	if (rb > mid)
		b = queryminson(mid + 1, r, rr);
	return min(a, b);
}
int querymin(int l, int r, int now){
	if (la <= l&&ra >= r){
		index = now;
		return queryminson(1, n, 1);
	}
	int mid = (l + r) >> 1;
	int a = inf, b = inf;
	if (la <= mid)
		a = querymin(l, mid, ll);
	if (ra > mid)
		b = querymin(mid + 1, r, rr);
	return min(a, b);
}
int main(){
	int t;
	scanf("%d", &t);
	for (int tcase = 1; tcase <= t; tcase++){
		scanf("%d", &n);
		build(1, n, 1);
		int q;
		scanf("%d", &q);
		printf("Case #%d:\n", tcase);
		while (q--){
			int len;
			scanf("%d%d%d", &x, &y, &len);
			la = max(1, x - (len >> 1));
			ra = min(n, x + (len >> 1));
			lb = max(1, y - (len >> 1));
			rb = min(n, y + (len >> 1));
			int a = querymax(1, n, 1);
			int b = querymin(1, n, 1);
			value = (a + b) >> 1;
			printf("%d\n", value);
			update(1, n, 1);
		}
	}
}


高匿反爬实战:Python打造无痕爬虫,规避风控系统追踪 网络层匿踪:核心是使用住宅IP代理池,按真实用户IP画像匹配,控制请求频率;协议层匿踪:动态生成请求头(每次都不同),参数添加随机噪声,避免规律化;行为层匿踪:模拟人类的非规律行为(贝塞尔轨迹、随机停顿、非精准点击);设备层匿踪:伪造Canvas/WebGL指纹,禁用webdriver标识,每次请求更换指纹;核心原则:无痕爬虫的本质是“无限接近真实用户”,所有维度都要消除爬虫特征,而非单一维度伪装。打造真正的无痕爬虫需要全维度的匿踪策略,单一维度的伪装极易被高级风控系统识别。 阅读详情

相关推荐

FreeRTOS OTA实战:从Bootloader设计到安全升级的完整流程(附MQTT示例代码)

本文详细介绍了在FreeRTOS系统中实现安全OTA固件升级的完整流程。内容涵盖从Bootloader设计、存储分区规划到与MQTT协议集成的OTA Agent任务开发,并重点解析了固件签名验证、防回滚等关键安全机制,为嵌入式物联网设备提供了一套高可靠性的远程升级解决方案。

weixin_29248653的博客 159

2013 Asia Regional Changchun

A Hard Code题意不是我敲的。题目意思好像是把一个字符串分成NN份长度为MM的子串吧?GT手速慢,被他妹子强了FB。233333code#include<cstdio> #include<cstring> #include<cmath> #include<iostream> #include<algorithm> #include<string> using namespace std; i

xuelanghu407 792

HDU 4819 Mosaic

题意: 一个矩形内每个格子都有一个值  现在有q个操作  每个操作给出坐标(x,y)和长度L  每次操作输出以(x,y)为中心的边长为L的矩形内的最大值和最小值之和的一半  并将这个值更新到(x,y)坐标上 思路: 区间查询最大最小值  单点更新  明显是线段树的特征  不过这里是二维的线段树  我用的是树套树的写法 我对二维线段树的理解:(个人理解不一定正确) 初始化麻烦  相

House 972

【win10+RAGFlow+Ollama】搭建本地大模型助手(教程+源码)

在当今科技飞速发展的时代,人工智能(AI)已经成为各行各业不可或缺的一部分。特别是在文档处理和数据分析领域,AI的应用更是无处不在。今天,我要向大家介绍一个开源的AI框架引擎——RAGflow。它能够在深度文档理解方面执行检索增强生成(Retrieval-Augmented Generation,简称RAG),并且被认为是目前最优秀的RAG框架之一。本文将详细探讨RAGflow的创新功能、技术特点以及如何在实际应用中发挥其最大潜力。

Yooao的博客 9618

Open3D (C++) 计算点云坐标最值及其索引

使用C++版本的Open3D计算点云最值点及其对应的下标索引

点云侠的博客 728

hdu4819 Mosaic,二维线段树

hdu4819 Mosaic 13年长春regional。二维线段树。 需要变更某个点,询问某个矩形的最大最小值。 在二维线段树里这只算个裸题。 这里只说一点,为了保持O(nlogn)的复杂度查询在更新点的时候,需要将所有包含该点的区间的最大最小值都变更。 假设n=3,当你修改点(2,3)你不仅要修改x=(2,2)的y轴线段树,也要修改x=(1,2)对应的y轴线段树。 这里

Necs的小窝 676

基于STM32L4XX 、HAL库的SGM452B数字温度传感器驱动应用C语言程序设计

SGM452B_RESOLUTION_12BIT = SGM452B_CONFIG_R1 | SGM452B_CONFIG_R0 /* 12位分辨率,精度0.0625°C,转换时间200ms */SGM452B_RESOLUTION_11BIT = SGM452B_CONFIG_R1, /* 11位分辨率,精度0.125°C,转换时间100ms */SGM452B_RESOLUTION_10BIT = SGM452B_CONFIG_R0, /* 10位分辨率,精度0.25°C,转换时间50ms */

PP_Cottage的博客 327

HDU 4819 —— Mosaic(二维线段树)

题目:http://acm.hdu.edu.cn/showproblem.php?pid=4819

hongrock的专栏 738

AgentScope实战训练营:从零搭建一个完整的A2A Agent应用

2024年4月,Google在Google Cloud Next大会上正式提出了A2A(Agent-to-Agent)协议,这是一个开放协议,旨在让不同的AI Agent之间能够像微服务一样相互发现、相互调用。通俗地讲:A2A协议就是AI Agent世界的HTTP协议——有了它,一个Agent可以把自己的能力以标准化的方式暴露出去,另一个Agent可以无缝地发现并调用它。本文将基于阿里巴巴开源的(Apache 2.0协议),手把手带你从零搭建一个完整的A2A Agent应用。

program哲学 563

CDD数据库文件制作(二)——服务配置(0x27)

主要根据诊断调查表,针对0x27服务在CDD中的每一步配置给出详细介绍 1.会话切换配置 1.1.根据诊断调查表进行信息提取 1.2.子功能添加 1.2.1.Level1安全等级1创建 1.2.2.Level3安全等级3创建 1.2.3.安全等级名字查看与修改 1.3.会话切换信息提取(应用程序下) 1.4.会话转换配置(应用程序下) 1.5.会话切换信息提取(引导程序下) 1.6.会话转换配置(引导程序下) 2.安全等级配置信息提取 2.1.安全访问配置(level1) 2.2.安全访问配置(level2

LOVE135149的博客 2929

2016 ICPC青岛赛 hdu5984 C Pocky

Pocky Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 156    Accepted Submission(s): 68 Problem Description Let’s talking about som

overload1997 2855

《Scratch图形化等级考试(1~4级)历届真题解析》专栏总目录

❤️ 专栏名称:《🌸 专栏介绍:中国电子学会《全国青少年软件编程等级考试》Scratch图形化等级考试(1~4级)历届真题解析。🚀 订阅专栏:原价 99.9,🔥 火爆订阅中 🔥,限时 19.9。订阅后可阅读专栏内所有文章,本专栏持续更新中,欢迎订阅!

人生就是一个不断学习的过程 1万+

2017 icpc广西邀请赛 K.Query on A Tree (hdu 6191)可持久化字典树

Query on A Tree Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 132768/132768 K (Java/Others) Total Submission(s): 0    Accepted Submission(s): 0 Problem Description Monkey A liv

overload1997 1294

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

2012杭州赛区(浙江理工大学)J - Scaring the Birds

J - Scaring the Birds Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Description It’s harvest season now!  Farmer John plants a lot of co

overload1997 1263

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

2017 ACM-ICPC 亚洲区(西安赛区)网络赛 G Xor lca+暴力

题目链接:https://nanti.jisuanke.com/t/17120 题意:给你一棵树,每个点都有权值,q次询问,每次询问给你a,b,k,问从点a到点b每隔k步的异或和是多少。 思路:现场没敢打,复杂度怎么算都不对。。。后来别人说可以1的情况lca其他暴力,我就试了一下,一开始是TLE,然后我各种迷之优化确实可以过。。。。走k步这里我是用了倍增的数组然后用logk的复杂度走k步。。。

overload1997 1164

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

2016 ICPC青岛赛 hdu5988 G.Coding Contest

Coding Contest Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 849    Accepted Submission(s): 156 Problem Description A coding cont

overload1997 948

2016 ICPC大连赛区 hdu5978 To begin or not to begin

To begin or not to begin Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 229    Accepted Submission(s): 175 Problem Description A b

overload1997 935

2012杭州赛区(浙江理工大学)H - Friend Chains

H - Friend Chains Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4460 Description For a group of people, there is an idea t

overload1997 774

2016 ICPC大连赛区 hdu5976 Detachment

Detachment Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 437    Accepted Submission(s): 144 Problem Description In a highly devel

overload1997 718

2015CCPC南阳场 H - Sudoku

比赛的时候都错了题意我去。。一直TLE+WA.. 赛后看了题解才知道都错了题意。。愧疚啊我去。。这次比赛我读的两道题都读错了题意,坑死队友。。 H - Sudoku Time Limit:1000MS     Memory Limit:65535KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU

overload1997 676

2012杭州赛区(浙江理工大学)C - Substrings

C - Substrings Time Limit:5000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4455 Description XXX has an array of length n. XXX wants to kno

overload1997 654

2016 ICPC大连赛区 hdu5974 Convex

Convex Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 170    Accepted Submission(s): 145 Problem Description We have a special con

overload1997 570

2016 ICPC大连赛区 hdu5974 A Simple Math Problem

A Simple Math Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 456    Accepted Submission(s): 179 Problem Description Given

overload1997 546

2016 ICPC大连赛区 hdu5980 Find Small A

Find Small A Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 353    Accepted Submission(s): 179 Problem Description As is known to

overload1997 487

2013长沙现场赛A - Alice's Print Service

题意:给你2n个数,b[i]表示不小于a[i]页数时的单价,问你印刷一定页数时,最便宜是多少钱。因为可以选择再刷多n页来改变单价从而改变总价格,所以要考虑的东西比较多。下面给代码。 #include #include #include #include #include #include #include #include using namespace std; #define

overload1997 448
上一篇: hdu 5787 K-wolf Number
下一篇: c++的输入优化
overload1997
博客等级 码龄11年 328粉丝 210原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值