codeforces round sort with

sort vs sorted

The primary difference between the two is that list.sort() will sort the list in-place, mutating its indexes and returning None, whereas sorted() will ......
sorted sort vs

[Rust] Play around with Rust

Few intertesting things from Rust Option<T>: with Some, unwrap() function todo(): to skil compiler error for a while unreachable(): similar to Typescr ......
Rust around Play with

Keycloak: Requesting Token with Password Grant

Keycloak: Requesting Token with Password Grant https://www.appsdeveloperblog.com/keycloak-requesting-token-with-password-grant/ In this tutorial, you ......
Requesting Keycloak Password Grant Token

Codeforces Round 872 (Div. 1 & Div. 2)

这场寄大了。 My predictor say -101pts。 https://codeforces.com/contest/1824 https://codeforces.com/contest/1825 2A. LuoTianyi and the Palindrome String 因为给出的 ......
Codeforces Div Round 872 amp

Codeforces Round 871 (Div. 4)

A. Love Story #include<bits/stdc++.h> using namespace std; #define int long long int read() { int x = 0, f = 1, ch = getchar(); while ((ch < '0' || ch ......
Codeforces Round 871 Div

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager......

pip install -r requirements.txt 报错"WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system ......

Python-5高阶函数“map”、“reduce”、“filter”、“sorted”

1.map函数:map(func, iterable) ①功能:处理数据 把iterable中的数据一个一个拿出来,扔到func中做处理,通过调用迭代器来返回参数。 ②参数:func:函数(自定义,或者内置函数) iterable:可迭代对象(容器数据,range,迭代器) ③返回值:迭代器(需要迭 ......
高阶 函数 Python filter reduce

Unable to find GatewayFilterFactory with name CircuitBreaker

起因 要在springCloudGateway中整合CircuitBreaker。 按照官网 https://cloud.spring.io/spring-cloud-gateway/reference/html/#spring-cloud-circuitbreaker-filter-factory ......

Understanding Dataset Difficulty with V-Usable Information

Ethayarajh K., Choi Y. and Swayamdipta S. Understanding dataset difficulty with $\mathcal{V}$-usable information. ICML, 2022. 概 将 $\mathcal{V}$-inform ......

workerman下框架gateway报错 worker[thinkphp:30776] exit with status 64000

wokerman启动之后一直报错 Worker[30477] process terminated worker[thinkphp:30477] exit with status 64000 Worker[30533] process terminated worker[thinkphp:30533 ......
workerman 框架 thinkphp gateway worker

Codeforces Round 871 (Div. 4)

A.Love Story 题意: 给定n个长度为10的字符串,问其与codeforces字符串的对应下标字母不同的个数。 分析: 对于每个字符串从前往后依次和“codeforces”对应字符比较然后统计不同字母数即可 code: #include <bits/stdc++.h> using name ......
Codeforces Round 871 Div

python学习笔记9(地图、柱状图、sort函数、动态柱状图)

1. 折线图案例 对于大量数据,json的格式不规范,想要知道json的格式以及层次可以使用以下网站进行查看。P103~104 懒人工具-json 在线解析-在线JSON格式化工具-json校验-程序员必备 (ab173.com) 2.地图可视化 """ 地图可视化 """ from pyechar ......
函数 地图 笔记 动态 python

Codeforces Round 871 (Div. 4)

Codeforces Round 871 (Div. 4) A - Love Story #include<bits/stdc++.h> using namespace std; typedef pair<int,int>PII; typedef pair<string,int>PSI; const ......
Codeforces Round 871 Div

Codeforces 871 div4(重拳出击)

Codeforces 871 div4 ABC 简单题 D 题意 每次操作可以将当前的数分成两份,一份是$\frac{1}{3}$,一份是$\frac{2}{3}$,问当前数n可否进行若干次操作,最终出现一份大小为m的片。递归一下就好了,数据最大才$10^7$ 代码 void dfs(int x) ......
重拳 Codeforces div4 871 div

Codeforces Round 871 (Div. 4) 题解

好久没打比赛了啊 qwq A~C skip D 把能被 $3$ 整除的数丢到一个队列里去 $\text{BFS}$,每次取队头把它分成两个,如果能被 $3$ 整除继续入队。最后看给定的数有没有入过队。 E 直接 $\text{BFS}$,把每个块总和算出来求最大。 F 可以发现,图的点数 $n=1+ ......
题解 Codeforces Round 871 Div

1 - Hand on system programming with Linux - 虚拟内存

虚拟内存 我的博客 虚拟内存 现代操作系统基于称作虚拟内存的内存模型。这些操作系统包括 Linux、UNIX、MS Windows 以及 macOS。要想真正理解现代操作系统,必须深入理解虚拟内存以及内存管理。 没有虚拟内存会有什么问题 现在,让我们考虑一个只具有 64 MB RAM 物理内存的情况 ......
programming 内存 system Linux Hand

Codeforces 1817E - Half-sum

好题啊!最喜欢这种思路层层递进的题了。 首先从最终形态的角度入手分析。建立一棵合并树,每次合并两个数的时候就新建一个节点,令这个节点为合并的两个节点的父亲。那么显然一个点对答案的贡献系数就是 $2^{-\text{其在合并树中的深度}}$。更具体地不妨设 $B>A$,最终被划分在 $A$ 对应的数中 ......
Codeforces Half-sum 1817E 1817 Half

Codeforces Round 870 (Div. 2)

Codeforces Round 870 (Div. 2) A - Trust Nobody 思路:枚举每一种说谎人数x,若a[i]大于x则说谎人数加一,判断最后说谎总人数是否为x,若是则输出x,结束枚举;若没有满足的x则-1 #include<bits/stdc++.h> using namesp ......
Codeforces Round 870 Div

Codeforces 1817F - Entangled Substrings(SA)

为什么赛时不开串串题?为什么赛时不开串串题?为什么赛时不开串串题?为什么赛时不开串串题?为什么赛时不开串串题? 一种 SA 做法,本质上和 SAM 做法等价,但是说来也丢人,一般要用到 SAM 的题我都是拿 SA 过的/wul 考虑将 $ac$ 看作一个整体。记 $\text{occ}(S)$ 为 ......
Codeforces Substrings Entangled 1817F 1817

Codeforces Round 848 (Div. 2)C

B. The Forbidden Permutation 一定要注意题目中说的是对于all i满足才算不好的,我们做的时候只要破坏一个i这个a就不算好的了,被这一点坑了,没注意到all。 #include <bits/stdc++.h> using namespace std; typedef lo ......
Codeforces Round 848 Div

无法加载响应数据: No data found for resource with given identifier

环境 Ubuntu 22.04 IDEA Docker中使用nginx 问题描述 之前使用正常,今天打开前端报错,postman测试正常 解决 由于nginx在docker中使用,upstream不能使用127.0.0.1,需要使用本机ip,而本机ip是会变的。 需要更改新的本机ip ......
identifier resource 数据 found given

Twitter延迟转化论文《Addressing Delayed Feedback for Continuous Training with Neural Networks in CTR prediction》阅读

背景 由于用户的兴趣是实时变化的,现代推荐、广告系统采用了流式更新的方式来捕捉用户实时兴趣的变化。实时训练的方式面临的一个难题就是正样本的回传是有延迟的,一个实时发送的负样本其实是无法确认是否是真的负样本的。也就是说实时观测到的数据流是一个有偏数据流,并不是真实的数据。如果模型在这个有偏分布上学习, ......

Codeforces Round 856 (Div. 2)C

C. Scoring Subsequences 思路:我们想要找到满足的最大值的长度最长的的区间,因为单调不减,所以更大的数一定在最大值的里面包含,所以我们用两个指针维护这样一个满足当前i的最大值区间,当新来一个数,这时我们答案里面一定要包含这个数,我们看能否保持这个长度,能不能保持需要看j指针所指 ......
Codeforces Round 856 Div

Codeforces——870

A. Trust Nobody 题目大意 给你一个长度为$n$的数组$a$,$a$中每个元素$a_i$表示当前人认为$n$个人中至少有$a_i$个人说谎,让你找出说谎的人的个数。 思路: 枚举说谎人数$x$,遍历$a$数组,对于当前$a_i$,如果有$a_i \geq x$,那么显然第$i$个人在说 ......
Codeforces 870

解决iframe嵌套不同域报错问题:SecurityError: Blocked a frame with origin

Error: Failed to resolve async component default: SecurityError: Blocked a frame with origin "https://223.82.12.165:8282" from accessing a cross-origi ......
SecurityError Blocked iframe origin 问题

使用nacos配置,启动服务时一直报 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. APPLICATION FAILED TO START

报错日志如下: Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.-2023-05-05 09:46:02.328 [TID ......

PostgreSQL versions shipped with Omnibus GitLab

PostgreSQL versions shipped with Omnibus GitLab ALL TIERS SELF-MANAGED This table lists only GitLab versions where a significant change happened in th ......
PostgreSQL versions Omnibus shipped GitLab

[CodeForces-1104A]题解(C++)

Part I Preface 原题目(Luogu) 原题目(CodeForces) Part II Sketch 给定一个整数 $n$。 将 $n$ 拆分成一个数列 $a_1,a_2,a_3,\dots,a_m$。 使得 $\sum\limits_{k = 1}^{m}a_k = n$,每个 $a_ ......
题解 CodeForces 1104

[CodeForces-143A]题解(C++)

Part I Preface 原题目(Luogu) 原题目(CodeForces) Part II Sketch 设有一个 $2 \times 2$ 的棋盘,上面可以填入 $1-9$ 的数字。 给出 $6$ 个数字,为每行每列以及每个对角线上的数字之和,求相应的摆放方式,无解输出 $-1$。 Par ......
题解 CodeForces 143

练习记录-cf-div2-Codeforces Round 870 (A-D)

这次写的也是比较快!rank305 虽然D简单,但是写出来了就算胜利! A. Trust Nobody 题意:给出n个人,他们会说多少人是说谎的,你要找出这个人数 思路: n最多只有100个,我枚举说谎的人有i个,对说话小于等于i的做前缀和,这个几个人都是说真话,记录前缀和sum,n-sum就是说谎 ......
Codeforces cf-div Round 870 A-D