CodeForces 289A Polo the Penguin and Segments

YOLO26算法保龄球馆保龄球目标检测+训练好的模型+743张数据集+pyqt可视化界面.zip 数据集可视化效果可参见下方展示。 【数据集概况】 · 检测类别(中文):[保龄球(bowling)] · 训练集:594 张 · 验证集:75 张 · 测试集:74 张 · 总计:743 张 该数据集聚焦于室内保龄球馆场景,系统性采集了多角度、多姿态下保龄球在不同运动阶段的视觉特征,为保龄球运动过程中的球体识别与轨迹分析提供了高质量标注样本,具有明确的体育训练与智能辅助系统开发价值。... 【训练曲线与评估图】 【模型训练配置】 参数 | 值 模型 | yolo26n 训练轮数 | 100 epochs 输入尺寸 | 640x640 批次大小 | 24 优化器 | auto 初始学习率 | 0.01 训练设备 【关键指标汇总】 训练了 100 个 epoch,最终轮指标: 指标 | 数值 mAP50 | **0.9938** mAP50-95 | 0.6966 Precision | 0.9740 Recall | 0.9974 train/box_loss | 0.9113 train/cls_loss | 0.2862 val/box_loss | 1.1516 val/cls_loss | 0.3116 【训练过程分析】 100 轮训练后 mAP50 达到 0.9938,模型收敛良好。Loss 曲线前段快速下降,后段趋于平稳,val_loss 无反弹,没有明显过拟合。但 mAP50-95 为 0.6966,和 mAP50 差距 0.30,定位精度仍有优化空间。 【模型性能评估】 Precision 0.9740、Recall 0.9974,精召双高,模型对保龄球的检测能力强。 【预测效果展示】 验证集预测效果较好,检测框基本准确覆盖保龄球,置信度整体偏高。 【改进建议】 1. 丰富场景多样性:补充不同光照、背景和遮挡条件下的样本。 2. 提升输入分辨率:640 ... 立即下载


The value of a set of segments that consists of n segments [l1r1], [l2r2], ..., [lnrn] is the number of integers x, such that there is integer j, for which the following inequality holds, lj ≤ x ≤ rj.

懵逼,上一句题意一直读不懂,并不知道它在说什么……

In one move Polo can either widen any segment of the set 1 unit to the left or 1 unit to the right, that is transform [lr] to either segment [l - 1; r], or to segment [lr + 1].

Find the minimum number of moves needed to make the value of the set of Polo's segments divisible by k.

他可以往右加一,可以往左加一,又让整除k

猜测题意大概是求区间和加上几,模k余0.

#include<stdio.h>
#include<iostream>
#include<math.h>
#include<string.h>
#include<iomanip>
#include<stdlib.h>
#include<ctype.h>
#include<algorithm>
#include<deque>
#include<functional>
#include<iterator>
#include<vector>
#include<list>
#include<map>
#include<queue>
#include<set>
#include<stack>
#define CPY(A, B) memcpy(A, B, sizeof(A))
typedef long long LL;
typedef unsigned long long uLL;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const LL INFF = 0x3f3f3f3f3f3f3f3fLL;
const double EPS = 1e-9;
const double OO = 1e20;
const double PI = acos (-1.0);
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
using namespace std;
int n,k,i,ans,x,y;
int main() {
    scanf ("%d%d",&n,&k);
    for (i=1; i<=n; i++) {
        scanf ("%d%d",&x,&y),ans+=y-x+1;
    }
    if (ans%k==0) { puts ("0"); }
    else { printf ("%d",k-ans%k); }
    return 0;
}

CodeForces 289A 题意: 第一行给两个数n,k,之后给出n 行每行两个数字a,b 表示区间的边界,每次调整的时候只能调整a-1或者b+1,而且区间之间不可相交,要保证n 个区间长度的和可以被k整除的移动步数。如果不用移动就能被K整除就输出0. 输入: 2 3 1 2 3 4 3 7 1 2 3 3 4 7 输出: 2 0 分析: 如果区间长度之和对 k 有余,那么它的移 阅读详情

相关推荐

CodeForces 289A Polo the Penguin and Segments

Polo the Penguin and SegmentsDescriptionLittle penguin Polo adores integer segments, that is, pairs of integers [l; r](l ≤ r).He has a set that consists of n integer segments: [l1; r1], [l2; r2], …, [l

平行空间 976

CodeForces 518A Vitaly and Strings

给出s和t两个字符串,s字典序小于t,问是否可以找到字典序小于t,大于s的字符串,请输出其中一个 本来想了些其他方法,都有问题,最后无奈……… 从s第一个字母开始,构造一个当前位置字母稍大的一个新字符串,后面全部置a,与t进行比较即可得出答案。 #include #include #include #include #include #include #include #include #i

Kim0403的博客 4169

Codeforces-289a I Polo the Penguin and Segments

A. Polo the Penguin and Segments time limit per test 2 seconds memory limit per test 256 megabytes Little penguin Polo adores integer segments, that is, pairs of integers [l; r] (l ≤

JSure的代码库 3440

CodeForces 289B Polo the Penguin and Matrix

觉得和矩阵没什么关系,直接看成一个数列,从中位数开始,小的增加d,大的减小d,求操作多少次即可。 如果取余不相等,那肯定不可能转换成同一个数字。 #include #include #include #include #include #include #include #include #include #include #include #include #include #include

Kim0403的博客 1209

CodeForces 288A Polo the Penguin and Strings

构造出前面都是a,b交替的字符串,最后一组在a,b之后添加c,d……这就是所求字符串。 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #d

Kim0403的博客 976

CodeForces 342A Xenia and Divisors

题目挺水,只有“1 2 4”,”1 2 6“,”1 3 6“这三种情况符合。所以就简单多了。 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #inc

Kim0403的博客 857

Gym 101190F Foreign Postcards

题意和转移就不讲了,讲讲比较 迷 的一点吧。 比赛结束之前,WA好多遍也没过,, 我开始还以为状态转移不对,或者写搓了,但是队友坚持查错,最终发现了这些有趣的地方。 目前只能怀疑和编译器有关系。 这样写是正确的,可以AC: dp[0][0]=s[0]=='C'?1:0; 这样写是不行的,27组测试数据处会WA: (s[0]=='C')?dp[0][0]=1:dp[0][0]=

Kim0403的博客 847

CodeForces 339B Xenia and Ringroad

就是顺着环走,模拟一下,不能回头,所以遇到小的门牌号,就只能转一圈转回来 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #defi

Kim0403的博客 790

CodeForces 131C The World is a Theatre 组合数

看过生活大爆炸的都知道,四男一女。 所以就是男生的取法乘女生的取法 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define

Kim0403的博客 780

CodeForces 687C The Values You Can Make

 给出n个数和K。  问n个数所有能构成k的子集合中所有的可能的和是多少? 思路: dp[i][j]表示当前和是i能否构成j。 如果dp[i][j]是可以的话,那么dp[i+m][j]和dp[i+m][j+m]都是可以得!(因为是子集合!!) 最后枚举dp[K][i],把可以得放入ans数组或者vector输出即可!  不过我刚开始不明白dp[0][0]=1的实际意义。意义:空

Kim0403的博客 754

CodeForces 589A Email Aliases

模拟题加上STL map的应用。 开始竟然想用结构体来处理,后来觉得不仅会占大量空间,并且不好写…… 细节见代码。 输入: 6 ICPC.@bmail.com p+con+test@BMAIL.COM P@bmail.com a@bmail.com.ru I.cpc@Bmail.Com a+b@bmail.com.ru 输出: 4 2 ICPC.@bmail.com I.

Kim0403的博客 736

CodeForces 548A Mike and Fax (回文)

#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define CPY(A, B) memcpy(A, B, sizeof(A)) typed

Kim0403的博客 734

CodeForces 547A Mike and Frog

求循环节很关键。还有,得确定循环次数。 比如青蛙三次达到a1,花四次达到a2,那么循环12次时,也可以同时到达a1,a2 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #i

Kim0403的博客 695

CodeForces 670B(模拟)水题

Input 4 5 10 4 18 3 The first robot says his identifier. After that the second robot says the identifier of the first robot and then says his own identifier. Then the third robot says the identifie

Kim0403的博客 686

CodeForces 288C Polo the Penguin and XOR operation

 题意:给一个数 n,求0~n的一个排列,使得这个排列与0-n的对应异或之和最大。 分析:两个数二进制数正好互补,异或就是最大的,比如,一个数是100,那么我们要找11,(都是二进制) 就是这样找,而且两两正好配对,如果多了一个就是0。怎么找那另一个和它互补的数呢?用11...1 - 本身 借鉴了MZH的代码 #include #include #include #include #

Kim0403的博客 674

CodeForces 131B Opposites Attract

两重for循环妥妥超时 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define CPY(A, B) memcpy(A, B, siz

Kim0403的博客 635
上一篇: CodeForces 547 B (区间dp)
下一篇: CodeForces 289B Polo the Penguin and Matrix
Kim0403
博客等级 码龄12年 25粉丝 132原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值