首页 > TAG信息列表 > xpos

「JOISC2021」IOI Fever

题目 点这里看题目。 分析 唉,感觉分析起来力不从心啊...... 首先做一些简单的规约处理: 将居民 \(1\) 平移到坐标原点; 枚举一下居民 \(1\) 的行走方向,并且旋转坐标轴,使得 \(x\) 轴指向居民 \(1\) 的行走方向。 Note. 下面的坐标都是变换过后的坐标。 接下来,我们考虑一下每

this的引用与类变量

this的引用与类变量 示例: class caculate { static int staticVar = 0; //类变量、静态变量 static final float STATIC_CONSTANT = 1; //类变量、静态常量 int xPos, yPos; //实例变量 double distance(int xPos, int yPos) { double dis = Math.sqrt(x

LCT倾情压行板子

改考试题的时候突然发现LCT压疯了写出来还挺好看? 好像写得比DC还短。。 namespace LinkCut_Tree{ int fa[NN],val[NN],sum[NN],tag[NN],son[NN][2]; bool get(int x){ return x==son[fa[x]][1]; } bool isroot(int x){ return x!=son[fa[x]][0]&x!=son[fa[x]][1]; }

基于Google开源 | Python实现手部追踪

利用Google开源手部追踪 以下为代码及其讲解 import cv2 #导入opencv库 import mediapipe as mp #导入Google开源mediapipe库 import time #导入时间库 cap = cv2.VideoCapture(0) #调用视频流(摄像头或视频文件) mpHands = mp.solutions.hands hands = mpHands.Hands() #选择

leetcode 春季个人赛

AC前三题,感觉以后放假还得去混混洛谷长一下见识     第一题  LCP 28. 采购方案 先排序,再二分往前找和当前数相加小于target合适的个数 class Solution { public: const int mm = 1e9 + 7; int purchasePlans(vector<int>& nums, int target) { sort(nums.beg

坦克大战的Lua实现

坦克大战lua代码 --[ author:终是蝶衣梦晓楼 language:Lua website:https://developers.mini1.cn/wiki/luawh.html#lua%E6%95%B0%E7%BB%84 data:2021,2,19 --] return (function() local X, Y, Z = 0, 0, 0 --初始出生点 local Map_Wid, Map_Len = -1,-1 --地图横长/竖宽 loca

CSS background-position

CSS背景定位 目录CSS背景定位xpos yposx% y%x y background-position: xpos ypos | x% y% | x y xpos ypos 使用预定义关键字定位,水平方向可选的关键字 left | center | right,垂直方向可选关键字有 top | center | bottom。 关键字定位,应用的是对齐规则,而不是坐标规则。xpos 为 l