花样作死记录文~


==============【花样作死~最短路】==================

【HDU】

2112     HDU Today基础最短路★

1874     畅通工程续基础最短路★

3832     Earth Hour三点连通(斯坦纳树)★

1317     XYZZY  Bellman-Ford判环,有负权★

1224     free DIY Tour 最短路+输出路径★

1839 Delay Constrained...二分下限+最短路(带限制最短路)★★

2807     The Shortest Path矩阵运算+最短路(floyd)★★

1595     find the longest of the shortest枚举+最短路(删掉任意一条边的最长最短路)★★

3986     Harry Potter and the Final Battle 枚举+最短路(删掉任意一条边的最长最短路)★★

3873     Invade the MarsDij变体(好题!,带限制最短路)★★★

1217     Arbitrage   货币交换 Floyd (或者 Bellman-Ford 判环)★
1245     Saving James Bond 计算几何+最短路★
1535     Invitation Cards   有向图的来回最短路,(反向建图)★
1546     Idiomatic Phrases Game   最短路★
2680     Choose the best route   最短路★
2923     Einbahnstrasse 最短路★
3339     In Action   最短路+背包★
2224     The shortest path 双调旅行商问题★★
1599     find the mincost route floyd求最小环★
3631 Shortest Path                   Floyd插点法★★
4114 Disney's FastPass 最短路+二维状压DP(难)★★★
4063 Aircraft 几何构图+最短路★★★★


hdu4179 Difficult Routes dis[][]开二维状态的最短路(带限制最短路)★★



1385     Minimum Transport Cost     最短路+输出路径(输出字典序最小路径,有点恶心)★★
1142     A Walk Through the Forest   最短路+记忆搜索★★
1596     find the safest road   乘积最小的最短路★
1598     find the most comfortable road 二分速度差+最短路(带限制最短路)★★
2722     Here We Go(relians) Again 最短路★
2962     Trucking   二分+最短路(带限制最短路)★★
1690     Bus System 最短路★
2433     Travel 删边+最短路之和(预处理桥边)★★★
2363     Cycling 二分+最短路(带限制最短路)★★
2377     Bus Pass 最短路(寻找一个点的最长最短路最小)★★
2833     WuKong 最短路+记忆化搜索(求两条最短路的最多公共点)★★
1688     Sightseeing 最短次短路条数★★
3191     How Many Paths Are There 次短路条数★★
2482     Transit search 最短路★★★
3768 Shopping 最短路+dfs(或最短路+状压DP)★★
3035     War 平面图最小割(建图麻烦)★★
3870     Catch the Theves 平面图最小割(建图麻烦)★★
3860 Circuit Board 平面图最小割(建图麻烦)★★


【POJ】
1062 昂贵的聘礼 竟然可以和最短路联系起来★★
1094 Sorting It All Out Floyd判环+拓扑排序★
1125 Stockbroker Grapevine Floyd★
1135 Domino Effect 最短路,比较有意思★★
1161 Walls 最短路(图太恶心了)★★
1502 MPI Maelstrom Floyd★
1511     Invitation Cards 来回最短路★
1556 The Doors   计算几何+最短路★★
1724 ROADS 带限制的最短路,dis[][]开二维来记录信息(或广搜)★★
1734 Sightseeing trip floyd最小环路径★
1797 Heavy Transportation 二分枚举+最短路★
1847 Tram 简单最短路★
1860 Currency Exchange 货币兑换★
1949 Chores 反向建边,求最长路★★
2139 Six Degrees of Cowvin Bacon Floyd★
2240 Arbitrage 货币兑换★
2253 Frogger 二分+最短路★
2312 坦克大战 spfa最短路本质变形-->广搜★
2387 Til the Cows Come Home 基础最短路★
2394 Checking an Alibi 最短路★
2449 Remmarguts' Date A*求第K短路★★
2457 Part Acquisition 最短路 (输出路径)★★
2472 106 miles to Chicago 乘积最短路(log一下,乘变加)★★


2502 Subway
2570 Fiber Network floyd
3013 圣诞树
3037 Skiing
3072 Robot
3114 Countries in War 强联通+最短路
3160 Father Christmas flymouse 强联通+最长路
3255 Roadblock
3259 Wormholes (寻找负权回路)
3268 Silver Cow Part
3311 Hie with the Pie floyd+状压
3328 Cliff Climbing
3439 Server Relocation
3463 Sightseeing 次短路条数
3159
3521 Geometric Map 计算几何+最短路
3549 GSM phone 计算几何+最短路
3594 Escort of Dr. Who How
3613 Cow Relays   经过N条边的最短路 // floyd + 二分矩阵
3615 Cow Hurdles
3621 最优比率环
3635 full tank?
3660 传递闭包
3662 Telephone Lines
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
目标检测(Object Detection)是计算机视觉领域的一个核心问题,其主要任务是找出图像中所有感兴趣的目标(物体),并确定它们的类别和位置。以下是对目标检测的详细阐述: 一、基本概念 目标检测的任务是解决“在哪里?是什么?”的问题,即定位出图像中目标的位置并识别出目标的类别。由于各类物体具有不同的外观、形状和姿态,加上成像时光照、遮挡等因素的干扰,目标检测一直是计算机视觉领域最具挑战性的任务之一。 二、核心问题 目标检测涉及以下几个核心问题: 分类问题:判断图像中的目标属于哪个类别。 定位问题:确定目标在图像中的具体位置。 大小问题:目标可能具有不同的大小。 形状问题:目标可能具有不同的形状。 三、算法分类 基于深度学习的目标检测算法主要分为两大类: Two-stage算法:先进行区域生成(Region Proposal),生成有可能包含待检物体的预选框(Region Proposal),再通过卷积神经网络进行样本分类。常见的Two-stage算法包括R-CNN、Fast R-CNN、Faster R-CNN等。 One-stage算法:不用生成区域提议,直接在网络中提取特征来预测物体分类和位置。常见的One-stage算法包括YOLO系列(YOLOv1、YOLOv2、YOLOv3、YOLOv4、YOLOv5等)、SSD和RetinaNet等。 四、算法原理 以YOLO系列为例,YOLO将目标检测视为回归问题,将输入图像一次性划分为多个区域,直接在输出层预测边界框和类别概率。YOLO采用卷积网络来提取特征,使用全连接层来得到预测值。其网络结构通常包含多个卷积层和全连接层,通过卷积层提取图像特征,通过全连接层输出预测结果。 五、应用领域 目标检测技术已经广泛应用于各个领域,为人们的生活带来了极大的便利。以下是一些主要的应用领域: 安全监控:在商场、银行
``` <!DOCTYPE html> <html> <head> <title></title> </head> <style> * { padding: 0; margin: 0; } html, body { height: 100%; padding: 0; margin: 0; background: #000; } canvas { position: absolute; width: 100%; height: 100%; } .aa { position: fixed; left: 50%; bottom: 10px; color: #ccc; } </style> <body> <canvas id="pinkboard"></canvas> <script> /* * Settings */ var settings = { particles: { length: 500, // maximum amount of particles duration: 2, // particle duration in sec velocity: 100, // particle velocity in pixels/sec effect: -0.75, // play with this for a nice effect size: 30 // particle size in pixels } }; /* * RequestAnimationFrame polyfill by Erik M?ller */ (function () { var b = 0; var c = ["ms", "moz", "webkit", "o"]; for (var a = 0; a < c.length && !window.requestAnimationFrame; ++a) { window.requestAnimationFrame = window[c[a] + "RequestAnimationFrame"]; window.cancelAnimationFrame = window[c[a] + "CancelAnimationFrame"] || window[c[a] + "CancelRequestAnimationFrame"]; } if (!window.requestAnimationFrame) { window.requestAnimationFrame = function (h, e) { var d = new Date().getTime(); var f = Math.max(0, 16 - (d - b)); var g = window.setTimeout(function () { h(d + f); }, f); b = d + f; return g; }; } if (!window.cancelAnimationFrame) { window.cancelAnimationFrame = function (d) { clearTimeout(d); }; } })(); /* * Point class */ var Point = (function () { function Point(x, y) { this.x = typeof x !== "undefined" ? x : 0; this.y = typeof y !== "undefined" ? y : 0; } Point.prototype.clone = function () { return new Point(this.x, this.y); }; Point.prototype.length = function (length) { if (typeof length == "undefined") return Math.sqrt(this.x * this.x + this.y * this.y); this.normalize(); this.x *= length; this.y *= length; return this; }; Point.prototype.normalize = function () { var length = this.length(); this.x /= length; this.y /= length; return this; }; return Point; })(); /* * Particle class */ var Particle = (function () { function Particle() { this.position = new Point(); this.velocity = new Point(); this.acceleration = new Point(); this.age = 0; } Particle.prototype.initialize = function (x, y, dx, dy) { this.position.x = x; this.position.y = y; this.velocity.x = dx; this.velocity.y = dy; this.acceleration.x = dx * settings.particles.effect; this.acceleration.y = dy * settings.particles.effect; this.age = 0; }; Particle.prototype.update = function (deltaTime) { this.position.x += this.velocity.x * deltaTime; this.position.y += this.velocity.y * deltaTime; this.velocity.x += this.acceleration.x * deltaTime; this.velocity.y += this.acceleration.y * deltaTime; this.age += deltaTime; }; Particle.prototype.draw = function (context, image) { function ease(t) { return --t * t * t + 1; } var size = image.width * ease(this.age / settings.particles.duration); context.globalAlpha = 1 - this.age / settings.particles.duration; context.drawImage( image, this.position.x - size / 2, this.position.y - size / 2, size, size ); }; return Particle; })(); /* * ParticlePool class */ var ParticlePool = (function () { var particles, firstActive = 0, firstFree = 0, duration = settings.particles.duration; function ParticlePool(length) { // create and populate particle pool particles = new Array(length); for (var i = 0; i < particles.length; i++) particles[i] = new Particle(); } ParticlePool.prototype.add = function (x, y, dx, dy) { particles[firstFree].initialize(x, y, dx, dy); // handle circular queue firstFree++; if (firstFree == particles.length) firstFree = 0; if (firstActive == firstFree) firstActive++; if (firstActive == particles.length) firstActive = 0; }; ParticlePool.prototype.update = function (deltaTime) { var i; // update active particles if (firstActive < firstFree) { for (i = firstActive; i < firstFree; i++) particles[i].update(deltaTime); } if (firstFree < firstActive) { for (i = firstActive; i < particles.length; i++) particles[i].update(deltaTime); for (i = 0; i < firstFree; i++) particles[i].update(deltaTime); } // remove inactive particles while ( particles[firstActive].age >= duration && firstActive != firstFree ) { firstActive++; if (firstActive == particles.length) firstActive = 0; } }; ParticlePool.prototype.draw = function (context, image) { // draw active particles if (firstActive < firstFree) { for (i = firstActive; i < firstFree; i++) particles[i].draw(context, image); } if (firstFree < firstActive) { for (i = firstActive; i < particles.length; i++) particles[i].draw(context, image); for (i = 0; i < firstFree; i++) particles[i].draw(context, image); } }; return ParticlePool; })(); /* * Putting it all together */ (function (canvas) { var context = canvas.getContext("2d"), particles = new ParticlePool(settings.particles.length), particleRate = settings.particles.length / settings.particles.duration, // particles/sec time; // get point on heart with -PI <= t <= PI function pointOnHeart(t) { return new Point( 160 * Math.pow(Math.sin(t), 3), 130 * Math.cos(t) - 50 * Math.cos(2 * t) - 20 * Math.cos(3 * t) - 10 * Math.cos(4 * t) + 25 ); } // creating the particle image using a dummy canvas var image = (function () { var canvas = document.createElement("canvas"), context = canvas.getContext("2d"); canvas.width = settings.particles.size; canvas.height = settings.particles.size; // helper function to create the path function to(t) { var point = pointOnHeart(t); point.x = settings.particles.size / 2 + (point.x * settings.particles.size) / 350; point.y = settings.particles.size / 2 - (point.y * settings.particles.size) / 350; return point; } // create the path context.beginPath(); var t = -Math.PI; var point = to(t); context.moveTo(point.x, point.y); while (t < Math.PI) { t += 0.01; // baby steps! point = to(t); context.lineTo(point.x, point.y); } context.closePath(); // create the fill context.fillStyle = "#ea80b0"; context.fill(); // create the image var image = new Image(); image.src = canvas.toDataURL(); return image; })(); // render that thing! function render() { // next animation frame requestAnimationFrame(render); // update time var newTime = new Date().getTime() / 1000, deltaTime = newTime - (time || newTime); time = newTime; // clear canvas context.clearRect(0, 0, canvas.width, canvas.height); // create new particles var amount = particleRate * deltaTime; for (var i = 0; i < amount; i++) { var pos = pointOnHeart(Math.PI - 2 * Math.PI * Math.random()); var dir = pos.clone().length(settings.particles.velocity); particles.add( canvas.width / 2 + pos.x, canvas.height / 2 - pos.y, dir.x, -dir.y ); } // update and draw particles particles.update(deltaTime); particles.draw(context, image); } // handle (re-)sizing of the canvas function onResize() { canvas.width = canvas.clientWidth; canvas.height = canvas.clientHeight; } window.onresize = onResize; // delay rendering bootstrap setTimeout(function () { onResize(); render(); }, 10); })(document.getElementById("pinkboard")); </script> </body> </html> ``` ![示例图片](https://devbit-static.oss-cn-beijing.aliyuncs.com/devbit-static/img/heart.png)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值