ofs

Codeforces Round 684 (Div. 2) B. Sum of Medians

定义 \(median\) 是一个非降序数组中第 \(\lceil \frac{n}{2} \rceil\) 的数。数组从 \(1\) 开始标号。 给两个数 \(n\) 和 \(k\) ,并给出一个长为 \(nk\) 的数组 \(a\) 。 需要分出为 \(k\) 个大小为 \(n\) 的数组,每个 ......
Codeforces Medians Round 684 Div

Codeforces Round 695 (Div. 2) A. Wizard of Orz

有 \(n\) 个数位板摆放成一条直线,每个数位板可以显示 \(0 \sim 9\) 的数字。最开始数位板显示的是 \(0\) 。每秒数位板上的数字都会加 \(1\) , \(9\) 的下一个数字是 \(0\) 。当一个数位板被暂停,它上面的数字将会定格在当前秒。 你必须对某个数位板执行一次暂停,在 ......
Codeforces Wizard Round 695 Div

CF1886A Sum of Three 题解

Question 给定一个正整数 N ,我们需要找三个不同的整数x,y,z,使得 N = x+y+z,其中下x,y,z不能被三整除 solution 我们把N%3会有一些余数,我们针对余数来讨论,其中我们只关注xyz的余数 如果余数为0 那么也就可能是1+1+1,或者2+2+2,但是考虑到xyz不同 ......
题解 1886A Three 1886 Sum

CF1886B Fear of the Dark 题解

Question Monocarp 在一个二维平面上,他的初始点在 \(O=(0,0)\) ,他需要到 \(P(P_x,P_y)\) 不幸的是,他能走的范围在两个圆内,我们给出了两个圆的坐标 \(A=(A_x,A_y)\) ,\(B=(B_x,B_y)\) 两个圆的半径相同,我们需要找到最小的半径让 ......
题解 1886B 1886 Fear Dark

leaflet使用heatmap.js出现heatmap.js:527 Uncaught TypeError: Cannot assign to read only property 'data' of object '#<ImageData>'问题

一、问题背景 问题是这样发生的,因为项目中需要实现热力图的功能,所以使用了第三方的库 heatmap.js。 但是在一些浏览器中使用它时,会出现这个错误: > Uncaught TypeError: Cannot assign to read only property 'data' of obje ......
heatmap 39 TypeError ImageData Uncaught

CF963B Destruction of a Tree 题解

CF963B Destruction of a Tree 题解 洛谷题目链接 这里提供一个较为朴素的 DP 想法。 题意简述 给定一棵树,节点个数不超过 \(2 \times 10^5\),每次可以删掉度数为偶数的点。问最后能不能删完;能删完给出删除方案。 思路分析 首先可以随便选一个点作为根。 其 ......
题解 Destruction 963B Tree 963

VScode使用MySQL插件老是Connect timeout,右下角还出现Cannot read properties of null (reading 'getPassword') error in vs code问题

安装了MySQL插件,一开始还用的好好的结果第二天就不行了真是鬼火直冒。 首先关闭vscode里面的自动更新:setting,搜索update,然后关闭application里面的自动更新; 我现在的版本是1.83.1,我在https://code.visualstudio.com/updates/ ......
getPassword properties 插件 老是 Connect

为什么我们需要不断的开发不同的机器学习模型 —— Do we Need Hundreds of Classifiers to Solve Real World Classification Problems?

论文: 《Do we Need Hundreds of Classifiers to Solve Real World Classification Problems?》 论文地址: https://jmlr.org/papers/volume15/delgado14a/delgado14a.pdf ......

excel 导出 The maximum length of cell contents (text) is 32767 characters Excel单元格最大存储长度32767个字符,超长会报错,数据库中也有这个最大长度

excel 导出 The maximum length of cell contents (text) is 32767 characters 导出excel功能,报错。错误日志提示::The maximum length of cell contents (text) is 32767 chara ......
长度 32767 characters 字符 单元

[LeetCode] 2863. Maximum Length of Semi-Decreasing Subarrays_Medium tag: stack

You are given an integer array nums. Return the length of the longest semi-decreasing subarray of nums, and 0 if there are no such subarrays. A subarr ......

1——of C++ and Java togather

因为那个C++最全的笔记是从第18课开始做(笔者说18课之前都很基础),所以这里就对前18课的知识做个笔记总结 C++的工作过程 这里提到的C++工作过程主要涉及两个:编译与链接 之前考研时候学到,(在组成原理的某个章节),计算机的工作过程其实就涉及 “将源程序转换成可执行文件”,与其中便有许多雷同 ......
togather Java and

【论文阅读】Accuracy of real-time multi-model ensemble forecasts for seasonal influenza in the U.S.

原始题目:Accuracy of real-time multi-model ensemble forecasts for seasonal influenza in the U.S. 中文翻译:针对美国季节性流感的实时多模型集合预报的准确性 发表时间:2019年11月22日 平台:PLOS Com ......

问题记录贴:vue-i18n在弹出框中$t()报错:TypeError: Cannot read property '_t' of undefined

网上有用的解决方法:vue 国际化在弹出框中$t()报错:TypeError: Cannot read property '_t' of undefined 大佬给出的解决方法: 弹窗是一个新的Vue对象,只需要单独给弹窗重新绑定i18n即可。 代码: // dialog/main.js impor ......
TypeError undefined property Cannot 问题

typescript: Chain of Responsibility Pattern

/** * Chain of Responsibility Pattern 责任链是一种行为设计模式, 允许你将请求沿着处理者链进行发送, 直至其中一个处理者对其进行处理。 * file: Chaints.ts * The Handler interface declares a method fo ......
Responsibility typescript Pattern Chain of

[LeetCode] 2282. Number of People That Can Be Seen in a Grid_Medium tag: stack.

You are given an m x n 0-indexed 2D array of positive integers heights where heights[i][j] is the height of the person standing at position (i, j). A ......
Grid_Medium LeetCode Number Medium People

[LeetCode] 1944. Number of Visible People in a Queue_Hard tag: stack

There are n people standing in a queue, and they numbered from 0 to n - 1 in left to right order. You are given an array heights of distinct integers ......
Queue_Hard LeetCode Visible Number People

【论文笔记】A theory of learning from different domains

防盗 https://www.cnblogs.com/setdong/p/17756127.html domain adaptation 领域理论方向的重要论文. 这篇笔记主要是推导文章中的定理, 还有分析定理的直观解释. 笔记中的章节号与论文中的保持一致. 1. Introduction doma ......
different learning domains 笔记 theory

Basic concepts of complex number

目录虚数的引入复数和虚数的关系Example - 分辨一个数判断两个复数是否相等的条件共轭复数复数的几何意义、复平面的认识求复数的模 虚数的引入 假设有一个数,可以叫它狗逼数,但是不太好听,改成高大上一点,叫成虚数吧! 对它的定义如下: 虚数=i \(i^2\) = -1 这样搞有什么好处吗? 假设 ......
concepts complex number Basic of

[CF1158F]Density of subarrays

F - Density of subarrays 屲,平衡复杂度题 首先考虑如何求一个序列的密度 从最左端开始,找到需序列\(A[1...n]\)的最小段\(A[1...a_1]\),使其包含\(1\sim c\)的所有颜色,然后又以\(a_1+1\)为起点,找下一个最短的包含\(1\sim c\) ......
subarrays Density 1158F 1158 CF

CF915F Imbalance Value of a Tree

原题 翻译 首先观察式子: \[\sum_{i=1}^{n} \sum_{j=i}^{n} \max\{ i,j \} - \min\{i,j\} = \frac{ \sum_{i=1}^{n} \sum_{j=1}^{n} \max\{i,j\} - \min\{i,j\} }{2} = \fra ......
Imbalance Value 915F Tree 915

[902] Get the current file's directory of CMD batch scripts

In a batch file, you can use the %~dp0 special variable to get the directory of the currently executing batch file. Here's how you can do it: @echo of ......
directory current scripts batch file

[901] Reuse variables of CMD batch scripts

In a batch file, you can reuse a variable to generate different file paths by concatenating the variable with other strings or variables. Here's an ex ......
variables scripts Reuse batch 901

[900] Print an empty line of CMD batch scripts

Use the echo. command to print an empty line. @echo off echo This is a line of text echo. echo This is a new line of text This will produce the output ......
scripts Print empty batch line

[898] Convert the data type of a DataFrame column

In Pandas, you can convert the data type of a DataFrame column to a string data type using the .astype() method. Here's how to do it: import pandas as ......
DataFrame Convert column data type

[895] Sort the rows of a DataFrame

In Pandas, the sort_values() method is used to sort the rows of a DataFrame by one or more columns. This method allows you to specify which column(s) ......
DataFrame Sort rows 895 the

引用axios时出现问题——Cannot read properties of undefined (reading 'get') TypeError: Cannot read properties of undefined (reading 'get')

问题描述 我就是按照特别正常的操作进行引用,但是就一直显示axios的get未定义; 问题解决 本来我是使用的this.$axios.get,引用的全局变量, 然后直接改成这样(在该vue界面定义的import,没有使用全局变量): 就能解决这个问题啦! ......
properties undefined reading Cannot 39

np.expand_dims: AxisError: axis 4 is out of bounds for array of dimension 4

np.expand_dims axis = 0时,[]加在最外面 axis = 1时,给每一行都加[] axis = 2时,给每一个元素都加[] x_train = np.expand_dims(X, axis=4) AxisError Traceback (most recent call las ......

vue显示echarts报错——echarts未在vue界面中定义init——TypeError: Cannot read property ‘init‘ of undefined

问题描述 本来按照网上的教程说是想要定义一个全局变量,就不需要在每个需要用到echarts组件的vue页面里面重新定义了, 直接使用就行,然后就报错了; 问题解决 我觉得应该是我的全局变量定义错误了,但是吧,我就直接改成在该vue页面定义了它,然后再使用: 就没有再使用到那个全局变量,直接这样就通过 ......
echarts init vue TypeError undefined

AES key — encoded in the machine readable zone of a European ePassport

AES key — encoded in the machine readable zone of a European ePassport 题目地址 AES key — encoded in the machine readable zone of a European ePassport 解题过 ......
ePassport European readable encoded machine

D. Effects of Anti Pimples

D. Effects of Anti Pimples 对于样例一: 14出现2次 9出现1次 19出现12次 规律: 1.我们发现1与后面的组合的最大值等于数列的最大值,次数是2^(n-1),这是巧合吗? 2.往下递推,我们可知2与后面的组合为2的倍数的最大值,次数为2^(n-2),... 3.因此 ......
Effects Pimples Anti of