codeforces round sort with

Codeforces Round 808 (Div. 2)

基本情况 最难受的一集。 A搞了一个半小时愣是没开出来。 A. Difference Operations Problem - A - Codeforces 错误分析 我分了好多类讨论,换言之没找到更本质的东西。 我想的是如果前面有一个数能处理到 \(1\) 那后面就都能过。 止步于此,而没有往更本 ......
Codeforces Round 808 Div

Codeforces Round 807 (Div. 2)

基本情况 AB题秒了。 C题搞了半天,搞了一个假的解法,最后还是爆空间了。 D题没想下去。 C. Mark and His Unfinished Essay Problem - C - Codeforces 错误分析 写出来自己的错解之后没有进一步思考,而是觉得没希望直接做D去了,实则D也没可能半小 ......
Codeforces Round 807 Div

gh-ost 报错 ERROR 1236 (HY000): A slave with the same server_uuid/server_id as this slave

使用 gh-ost 对表在线加索引时,第一次发生了下面的报错(使用gh-ost很长时间了,第一次遇到这个报错): [2023/12/12 11:48:08] [error] binlogstreamer.go:77 close sync with err: ERROR 1236 (HY000): A ......
server slave server_uuid server_id gh-ost

Java 7妙招:释放你的代码负担,try-with-resources登场

在Java编程的旅途中,资源管理曾是一座棘手的山。然而,随着Java 7引入的try-with-resources语句,我们仿佛找到了一把神奇的解锁钥匙,轻松释放了代码的负担。本文将深入探讨这项妙招,揭示其简洁而强大的魅力。 ......

[论文阅读] Replacing softmax with ReLU in Vision Transformers

Pre title: Replacing softmax with ReLU in Vision Transformers accepted: Arxiv 2023 paper: https://export.arxiv.org/abs/2309.08586 code: None 关键词:atten ......
Transformers Replacing softmax Vision 论文

mysql create store procedure for loops, and with parameters respectively

drop procedure if exists insert_into_t2_sp; DELIMITER // CREATE PROCEDURE insert_into_t2_sp() BEGIN DECLARE i INT DEFAULT 2; WHILE (i <= 1000000) DO I ......

CodeForces 235C Cyclical Quest

洛谷传送门 CF 传送门 首先对 \(s\) 建 SAM,设 \(m = |t|\),然后考虑断环为链,把询问串 \(t\) 再复制一份拼接在后面,然后相当于问现在 \(t\) 的所有长度为 \(m\) 的本质不同子串在 \(s\) 中的出现次数之和。 考虑枚举子串的右端点,维护当前在 SAM 上的 ......
CodeForces Cyclical Quest 235C 235

Codeforces 198 B Jumping on Walls

题面翻译 题目描述 瓦西亚在和忍者玩电脑游戏。在这个关卡,瓦西亚需要操控忍者走出一个很深的峡谷。 峡谷由两面垂直于地面且互相平行的墙组成,它们的高度为\(n\)米。我们将这些墙分成许多\(1\)米长的区域,并从下到上用\(1\)到\(n\)的正整数对它们进行编号。有些地方是安全的,忍者可以爬上去。有 ......
Codeforces Jumping Walls 198 on

Codeforces Round 914 (Div. 2)

基本情况 A题+2,幸好后面突然悟了。 B题体现了读题以及一词多义的重要性。 C题不会。看了一下1700分的题目,暂时先放了。 A. The Third Three Number Problem Problem - A - Codeforces 推出了规律,\(n\) 为偶数的时候,无脑 \(a = ......
Codeforces Round 914 Div

26-进阶SQL-递归查询(with recursive)

MySQL with Recursive是一种基于递归思想的MySQL查询方式,可以实现对数据的递归查询和处理,返回符合条件的数据,在MySQL 8.0版本中,该功能被正式引入。 MySQL with Recursive有什么作用 MySQL with Recursive的作用是基于一组初始数据,进 ......
recursive with SQL 26

CF1899 E Queue Sort 题解

Link CF1899 E Queue Sort Question 给出一个序列 \(\{a\}\) ,可以进行一种操作:把第一个数放到最后,然后向前移,直到前面的那个数比它小为止 求把序列变成非降序列的次数 Solution 先来考虑无法变成非降序列的情况 如果第一个数最小,在一次操作后,第一个数 ......
题解 Queue 1899 Sort CF

Codeforces Round 914 (Div. 2)

Codeforces Round 914 (Div. 2) A - Forked! 解题思路: 枚举皇后和国王能被骑士吃到的位置,重合的点数就是答案。 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; ty ......
Codeforces Round 914 Div

[ABC304Ex] Constrained Topological Sort 题解

题意 给定一张有向图 \(G\),有 \(n\) 个点和 \(m\) 条边,问是否存在一种拓扑序的排列 \(P\) 使得 \(l_{i} \le p_{i} \le r_{i}\)。 思路 首先对于一条边 \(u \to v\),如果限制满足 \(r_{v}\le r_{u}\) 或者 \(l_{v ......
题解 Constrained Topological Sort ABC

CodeForces 575F Bulbo

洛谷传送门 CF 传送门 提供一个傻逼 \(O(n^2)\) 做法。 首先考虑暴力 dp,设第 \(i\) 轮后在 \(j\) 坐标上的最小花费为 \(f_{i, j}\),有: \[f_{i, j} = \min f_{i, k} + |j - k| + \begin{cases} l_i - j ......
CodeForces Bulbo 575F 575

Codeforces Round 914 (Div. 2)

Codeforces Round 914 (Div. 2) A. Forked! #include <bits/stdc++.h> #define endl '\n' #define int long long using namespace std; void solve(){ int a,b; ......
Codeforces Round 914 Div

[Codeforces] CF1793C Dora and Search

CF1793C Dora and Search 题意 给定一个长度为 \(n\) 的排列 \(a\) ,问是否存在正整数 \(l,r\) 使得 \(a_l,a_r\) 均不为 \(a_{l...r}\) 中的最大值或最小值。 思路 很明显的双指针,虽然我最开始的思路是二分 预处理当前序列的最大值和最 ......
Codeforces Search 1793C 1793 Dora

[Codeforces] CF1790D Matryoshkas

CF1790D Matryoshkas 题意 ZYH 的玩具有很多种类,每种玩具都是一段连续的区间(如 \([3,4,5]\) ) ZYH 有很多种玩具,但是他不慎把所有玩具的元素乱序混合到了一起。例如玩具 \([1,2,3,4]\) 和玩具 \([2,3]\) 混合到一起后可能是 \([2,2,3 ......
Matryoshkas Codeforces 1790D 1790 CF

Codeforces Round 803 (Div. 2)

基本情况 A题秒了。 B题经典+2。(经典不开longlong) C题读错题,没得思路。 B. Rising Sand Problem - B - Codeforces 思路好想,分类讨论找规律就行。 这里还是要强调一下认真分析数据: Input The second line of each te ......
Codeforces Round 803 Div

PostgreSQL - Start a container with docker compose file

Docker compose file: services: postgres: image: postgres:16-alpine environment: - POSTGRES_USER=root - POSTGRES_PASSWORD=aaa - POSTGRES_DB=zimple_bank ......
PostgreSQL container compose docker Start

Codeforces Round 802 (Div. 2)

基本情况 A题秒了。 B题经典+4。 C题没想法(大概想了半小时)。 B. Palindromic Numbers Problem - B - Codeforces 起步 首先很明显是高精。 然后要求加上的数字位数和给的位数相同。 答案不限制,只要回文就行。 第一思路就是口胡几个万能的回文答案。 给 ......
Codeforces Round 802 Div

《Mamba: Linear-Time Sequence Modeling with Selective State Spaces》阅读笔记

论文标题 《Mamba: Linear-Time Sequence Modeling with Selective State Spaces》 作者 Albert Gu 和 Tri Dao 初读 摘要 Transformer 架构及其核心注意力模块 地位:目前深度学习领域普遍的基础模型。 为了解决 ......

20.Explain how the following reasoning fails to address the complexity of the issue involved, and rebut it. “Sanya is warm all year round and has beautiful beaches,

Round 1: Identifying the Failure in Reasoning Speaker 1 (Student A): Hello, everyone! Let's kick off our discussion by examining the reasoning: "Sanya ......
the complexity following and beautiful

16.What are the basic elements of an argument according to Toulmin Model? How do you evaluate evidences with the intellectual standards?

Round 1: Understanding the Basic Elements of Toulmin Model Speaker 1 (Student A): Hello, everyone! Let's start by discussing the basic elements of the ......

14.Do you have a tentative plan for you reading and/or research writing project for this semester? Create a timetable with specific goals, objectives, ways to realize them and timelines.

Round 1: Discussing the Importance of a Tentative Plan Speaker 1 (Graduate Student A): Greetings, everyone. Today, our topic revolves around having a ......
objectives you for and tentative

Codeforces Round 914 (Div. 2)

基本情况 脑子最卡的一集。 A题读假题,卡了快一小时。 B题代码太复杂,出错不好修改,一直调。 虽然最后都出来了,但是没有剩下任何时间看后面题目了。 A. Forked! Problem - A - Codeforces 一开始不知道犯得什么病,觉得可以斜着走一格算作一步,然后情况就太多了,非常不好 ......
Codeforces Round 914 Div

Codeforces Round 914 (Div. 2)

C. Array Game 题意:给定一个n的数组以及k的操作数,每次可以选择下表为i,j(i<j)得到一个abs(a[i]-a[j])的数放在数组末尾,问你k次操作后,数组中最小的数是多少? 思路:首先k>=3 选相同的下表两次,一定结果是0,是最小。 k==1 遍历出下表两两相减的绝对值最小以及 ......
Codeforces Round 914 Div

CodeForces 1902F Trees and XOR Queries Again

洛谷传送门 CF 传送门 如果我们能把 \(x \to y\) 路径上的所有点权插入到线性基,那么可以 \(O(\log V)\) 查询。 但是因为线性基合并只能 \(O(\log^2 V)\)(把一个线性基的所有元素插入到另一个),所以只能倍增做 \(O((n + q) \log n \log^2 ......
CodeForces Queries 1902F Again Trees

frida.ProcessNotFoundError: unable to find process with name 'xxx'

前言全局说明 frida 没有 hook 找到指定进程 一、原因 你没有启动 APP 是否开启端口转发 (adb forward) 官方修改了包名 官方把包名由 com.xxxx 改成中文名 二、解决方法 方法1、查看进程名 启动 frida-server 端后,在物理机的 cmd终端命令行 窗口中 ......
ProcessNotFoundError process unable frida 39

ARC169 B Subsegments with Small Sums 题解

Link ARC169 B Subsegments with Small Sums Question \(x\) 是一个序列,定义 \(f(x)\) 为把序列 \(x\) 切成几段,每段的和不能超过 \(S\) 的最小段数 给出序列 \(A=(A_1,A_2,\cdots,A_N)\) 求: \[\ ......
题解 Subsegments Small with Sums

【Cpp 基础】泛型算法 stable_sort() 的应用

最近在刷牛客的题。经常遇到排序问题,经常有一个附加的规则:相同的数值的,按照录入的顺序排序。 可是C++的sort()的底层是快速排序,并不能保证相同数值的顺序不改变。所以最后我不得不自己写冒泡排序。(冒泡排序不改变相同数值的录入顺序) 写了那么多的排序,但是其实C++里封装有排序函数,而且功能非常 ......
算法 stable_sort 基础 stable sort
共3000篇  :10/100页 首页上一页10下一页尾页