fedor game and new
Codeforces Round 843 (Div. 2) A2. Gardener and the Capybaras (hard version)
有三个字符串 $s_1, s_2, s_3$ ,每个字符串只有 $a, b$ 组成。三个字符串顺序连接在了一起。满足以下条件之一: * $s1 \leq s_2, s_3\leq s_2$ * $s1 \geq s_2, s_3\geq s_2$ 以上为字典序比较。 给出连接的三个字符串,输出一组可 ......
Codeforces Round 845 (Div. 2) and ByteRace 2023 B. Emordnilap
给一个长为 $n$ 的排列,对于它的每一个排列 $p$ ,复制一份并 $reverse$ 拼到原排列的后面得到 $a = \left [p, p_{reverse} \right ]$ 。 求 $p$ 的所有排列对应的 $a$ 的逆序对数之和,结果对 $1E9+7$ 取模。 **逆序对贡献**: * ......
* Codeforces Round 885 (Div. 2) A. Vika and Her Friends
给一个 $n \times m$ 的网格,每个格子对应一个坐标 $(a, b)$ 。如果存在一个各自的坐标为 $(c, d)$ 且满足 $|a - c| + |b - d| = 1$ ,则称 $(a, b)$ 与 $(c, d)$ 相邻。 给出 $k + 1$ 个点,初始坐标分别为 $(x_0, y ......
1521A - Nastia and Nearly Good Numbers
## A. Nastia and Nearly Good Numbers https://codeforces.com/problemset/problem/1521/A ```python """ 思路: 1.就是普通的打印,NO的情况是只有b=1的时候才会出现,其他的都是YES,如果不想再继续分 ......
SLAMesh论文及代码阅读与思考<五>Real-time LiDAR Simultaneous Localization and Meshing
# 前言 本节重点对filterMeshGlb()函数进行理解。该函数在可视化模块中重点对全局地图中的每个栅格进行mesh的生成。一开始我的疑惑是代码是如何实现相邻cell之间的mesh连接的,这个应该具有较大的挑战性。其实,代码只考虑栅格内部的mesh的生成,全局mesh地图也就是mesh的并集, ......
The Riordan Group and Applications 第1章 笔记
2022年的一本书,只有376页。证明直接去书里面找。 [TOC] # 1 介绍 ## 1.1 啥是RiordanArray ## 1.2 起源和研究动机 ## 1.3 基础的应用 $$ \mathfrak{B}_r=\sum_{n \geq 0} \frac{1}{(r-1) n+1}\left( ......
day④-Python之路(new)
本节内容 迭代器&生成器 装饰器 Json & pickle 数据序列化 软件目录结构规范 作业:ATM项目开发 1.列表生成式,迭代器&生成器 列表生成式 孩子,我现在有个需求,看列表[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],我要求你把列表里的每个值加1,你怎么实现?你可能会想 ......
new方法、定制属性访问、描述符与装饰器知识点总结
一:__new__方法 思考: a. 我们创建实例是通过什么方法创建的呢? b. 类每次实例化的时候都会创建一个新的对象,如果要求类只能被实例化一次该怎么做呢? 通过单利模式实现 c.什么是单例模式(Singleton Pattern 1、确保一个类只有一个实例,而且自行实例化并向整个系统提供这个实 ......
Proj CDeepFuzz Paper Reading: Differential Testing of Cross Deep Learning Framework APIs: Revealing Inconsistencies and Vulnerabilities
## Abstract 背景:目前对cross-framework conversion中的inconsistencies和security bugs的研究少有 本文:TensorScope Task: test cross-frame APIs in Machine Learning Librar ......
css: SVG and CSS
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_and_CSS 两种方式的CSS SVGCSS: /*** SVG demonstration ***/ /* page */ svg { background-color: ......
SLAMesh论文及代码阅读与思考<四>Real-time LiDAR Simultaneous Localization and Meshing
# 前言 本节继续对update()函数进行理解。update是将当前点云对应的map_now对全局地图map_glb进行更新。 ## 获取重叠的区域 `OverlapCellsRelation overlap_ship = map_now.overlapCells(*this);` ```c++ ......
B. Fedor and New Game
## B. Fedor and New Game https://codeforces.com/problemset/problem/467/B ```python """ 467B 思路: 1.暴力方法: 通过循环二进制之后的,逐个位与fedor进行判断,通过取余,如果最后不同的超过3个就计+1 ......
XOR and Favorite Number题解
## XOR and Favorite Number题解 ### 思路引导 这一道题主要是为了说明莫队算法和分块之间的联系。 先主要讲讲莫队的用处吧。 它是个离线算法,维护两个指针l,r。 移动l和r的时候顺便进行更改,维护好l-r区间内的某个值。 对于询问区间的排序,遵循l所在的分块相同,其次是r ......
Position-Enhanced and Time-aware Graph Convolutional Network for Sequential Recommendations
# Position-Enhanced and Time-aware Graph Convolutional Network for Sequential Recommendations [TOC] > [Huang L., Ma Y., Liu Y., Du B., Wang S. and Li ......
Scheduling and Resource Allocation
Module aims Real-life problems arising in computer science, computational management and economics often involve deciding the best way to use a given ......
[AIGC] a brief summary for this week, replica and localGPT
In this week, I experienced two main projects, replica and localGPT. ## replica demo:  by Wizard
Today I have a try on new large model designed by code generating named WizardCoder-Python-34B-V1.0. It's quite astonishing. You can have a try throug ......
What's the best approach for generating a new API key?
https://stackoverflow.com/questions/14412132/whats-the-best-approach-for-generating-a-new-api-key Edit: I've spoke to a few friends (email/twitter) an ......
CF1848B Vika and the Bridge 题解
# CF1848B Vika and the Bridge 题解 ## 题目大意 ~~给个题目传送门吧,感觉题意已经很清楚了~~ [题目传送门](https://www.luogu.com.cn/problem/CF1848B) ## 分析 (~~我不会告诉你我第一眼看过去是二分~~) 因为我们只能 ......
Photometry and Radiometry
Photometry(光度学):度量感知量 Radiometry(辐射度量学):度量物理量 Radiometric | Symbol | Unit | Photometric | Symbol | Unit : : | : : | : : | : : | : : | : : 辐射能量 Radiant ......
双指针(9/1 and9/2 )
1、复习了前缀和,差分(一维和二维) 2、双指针 //双指针核心思想就是优化时间 for() for()->O(n^2) >优化成O(n) /*for(i=0,j=0;i<n;i++) { while(j<i&&check(i,j)) j++; //每道题的逻辑 }*/ #include <iost ......
443A - Anton and Letters
## A. Anton and Letters https://codeforces.com/problemset/problem/443/A ##### Recently, Anton has found a set. The set consists of small English lette ......
vue --version 运行出现throw new ERR_SYSTEM_ERROR 错误
(1)根据错误提示信息,找到出错入口文件: E:\SVN\zlpt\node_modules\node-ipc\entities\Defaults.js 然后指定位置添加如下代码即可: const os = require('os');os.hostname=()=>"localhost"; ......
C. Vika and Price Tags
C. Vika and Price Tags Vika came to her favorite cosmetics store "Golden Pear". She noticed that the prices of $n$ items have changed since her last v ......
AtCoder Beginner Contest 201 D - Game in Momotetsu World
# D - Game in Momotetsu World [原题链接](https://atcoder.jp/contests/abc201/tasks/abc201_d) 题意 有一个 H×W 的方格,每个方格里写着 '+' 或 '-' 有一个初始在 (1,1),(也就是左上角)的棋子, Tak ......
CF797F Mice and Holes 题解
## Description 有一天 Masha 回到家,发现有 $n$ 只老鼠在它公寓的走廊上,她大声呼叫,所以老鼠们都跑进了走廊的洞中。 这个走廊可以用一个数轴来表示,上面有 $n$ 只老鼠和 $m$ 个老鼠洞。第 $i$ 只老鼠有一个坐标 $x_i$ ,第 $j$ 个洞有一个坐标 $y_j$ ......
Q-learning and RL implementation
Aim: Train a model to properly play vintage video games... Deep Q-learning Algo~ Very short Brief of Notations: {A,pi(Policy),Q(quality of action-at a ......
CF500G New Year Running
# solution 首先求出两条路径 $(A,B)$ $(C,D)$ 的交路径,记作 $(S,T)$ 。 那么假设相遇在某个节点 $u$,相遇的条件可以写成下面的式子: $$k_1t_1+r_1+d_1 s=k_2t_2+r_2+d_2s$$ 其中: $t_1,t_2$ 为周期,$r_1,r_2$ ......
go: json marshal and unmarshal
引用: https://bluehive.medium.com/golang-json-marshal-a-struct-with-pointers-2a362d0543f5 1. Golang JSON Marshal a Struct With Pointers: a. Always name ......
return new 内存泄漏
样例如下: #include <iostream> class B { public: int Fun() { return 100; } } class A { public: B* CreateB() //new了个B对象 { return new B(); } } int main() { A ......