how abc 306 ak

【题解】AtCoder-ABC321

AtCoder-ABC321A 321-like Checker 依题意判断。 提交记录:Submission - AtCoder AtCoder-ABC321B Cutoff 枚举 \(a_n\),依题意模拟即可。 提交记录:Submission - AtCoder AtCoder-ABC321C ......
题解 AtCoder-ABC AtCoder ABC 321

solution-at-abc321-c

题意 将所有每位满足递减的整数排序,问第 \(k\) 大的是多少,不包括 \(0\)。 思路 我们发现最大的满足要求的整数是 \(9876543210\) ,只有 \(1e10\) 的大小,\(k\) 只有不到 \(3000\) 的大小,可以从小到大枚举所有的数,从 T1 粘来判断函数打一个表就解决 ......
solution-at-abc solution abc 321 at

ABC321题解

A 从低位到高位判断是否递增就行了。 B 直接暴力枚举。 C 深搜一下,答案最多 1023 个,然后要开 long long !!! D 从小到大枚举 a 的同时从大到小枚举 b,然后前缀和优化一下就行了。 E 考虑把这棵树分成两部分,分界线为从 1 到 n 的路径。 然后在路径上从下往上dp出长为 ......
题解 ABC 321

ABC321

T1:321-like Checker 模拟 代码实现 #include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0; i+1 < s.size(); ++i) { if ( ......
ABC 321

How to install a command once for all login users in Linux All In One

How to install a command once for all login users in Linux All In One /etc/profile & /etc/profile.d/ ......
install command Linux login users

题解 ABC267 A~H

ABC267 solution https://atcoder.jp/contests/abc267/ Problem A. 题目描述 输入一个表示星期的英文字符串,输出:还有多少天到星期六? solution 依题意模拟。\(O(1)\)。 Problem B. 题目描述 Robin 有十个小球, ......
题解 ABC 267

[ABC309Ex] Simple Path Counting Problem

Problem StatementWe have a grid with $N$ rows and $M$ columns. We denote by $(i,j)$ the cell in the $i$-th row from the top and $j$-th column from the ......
Counting Problem Simple Path ABC

How to use a shell script to check whether a command had been installed in the Linux server All In One

How to use a shell script to check whether a command had been installed in the Linux server All In One shell script error [: :需要整数表达式 / [: -eq:需要一元表达... ......
installed command whether script server

[885] How to generate automated tables in Word document with Python

ref: How to Generate Automated Word Documents with Python ref: docxtpl快速上手使用,数据填入以及循环写入表格 Creating a Template Before you can proceed, you must first c ......
automated generate document Python tables

[884] How to generate automated Word documents by Python

ref: python-docx ref: How to Generate Automated Word Documents with Python ref: Automating Word Documents from Excel Using Python | ‘docxtpl’ Tutorial ......
automated documents generate Python Word

How to print a string with a variable by using the echo command in the shell script All In One

How to print a string with a variable by using the echo command in the shell script All In One Node.js & nvm ......
the variable command string script

abc188F - +1-1x2

F - +1-1x2 做过好几道类似的题了,跟之前杭电的一道题很像。 反正就是在一个y的位置上下抖一抖再除2就行。 #include<algorithm> #include<cstdio> #include<cstring> #include<vector> #include<queue> #inc ......
188F abc 188 1x

ABC319题解

直接从 D 开始了。 D 可可爱爱的二分捏。 check 就按照题目里写的就行了。 然后 \(l\) 的初值要注意一下,就是 \(\max^{i \le n}_{i=1}a_i\)。 代码: #include<bits/stdc++.h> #define int long long using na ......
题解 ABC 319

abc278题面

A 问题陈述 给你一个长度为 \(N\) 的序列 \(A = (A_1, A_2, \dots, A_N)\)。 你正好执行了下面的操作 \(K\) 次: 删除\(A\)的初始元素,并在\(A\)的尾部追加一个\(0\)。 操作后打印 \(A\) 的所有元素。 限制因素 \(1 \leq N \le ......
abc 278

abc287F - Components

F - Components 一眼经典的树上背包 \(f[x][s][0/1]\)表示在x的子树中有s个连通块,选不选x的方案数 那么转移的话就是按照背包的转移即可 然后隐约记得这个是\(O(n^2)\)的 但是一直TLE,后面发现是有一个地方写法有问题,应该在计算完当前子树后再更新的size,这样 ......
Components 287F abc 287

How to get a variable data type in Python 3 All In One

How to get a variable data type in Python 3 All In One typeof in js type(var) & isinstance(var, type) ......
variable Python data type How

How to enable HTTPS on a localhost Node.js Server All In One

How to enable HTTPS on a localhost Node.js Server All In One Let's Encrypt - Free SSL/TLS Certificates ......
localhost enable Server HTTPS Node

How to SupressWarnings for Sonar Security Hotspots?

How to SupressWarnings for Sonar Security Hotspots? Sonarlint/SonarQube allows you to use comments for disabling analysis in specific lines. In order ......
SupressWarnings Hotspots Security Sonar How

How to use ESM & TypeScript in Node.js All In One

How to use ESM & TypeScript in Node.js All In One { "compilerOptions": { "module": "NodeNext", // "module": "Node16", } } { "name": "esm-ts-package", ......
TypeScript Node How ESM All

abc320f <dp >

题目 F - Fuel Round Trip 总结 关键在于状态的定义。因为每个位置尽可加油一次,因此往返会相互影响,因而必须考考虑状态中定义去时经过此地的油量j与回时经过此地的油量k,这样才能成功转移; 此外,本题状态转移比较奇特,相邻两个位置的状态的转移,在时间上包含去和回两个不同的时刻,较难理 ......
320f abc 320 lt dp

ABC 320

博主打这一次 abc 有点乱打,加上晚来了,倒开的,所以赛时只做了 abcg,def 没看。 ef 现在还没想,所以这篇文章:abcg 正常写,d 口胡(应该是对的) submissions A 可以直接 for 循环求值。(但是我用了快速幂) B 枚举左右端点,\(O(|S|)\) 判断是否回文。 ......
ABC 320

abc265F - Manhattan Cafe

F - Manhattan Cafe 暴力dp是显然的,f[s1][s2] 假设a,b是第i维中p,q两个向量分别对应的数。 那么分类讨论一下 不妨设 a<c<b \[f[i][s1][s2]= \sum f[i-1][s1-(c-a)][s2-(b-c)] \]\[=\sum f[i-1][s1+ ......
Manhattan 265F Cafe abc 265

abc320

A 题意 给你\(A\)和\(B\),输出\(pow(A,B)+pow(B,A)\) #include<bits/stdc++.h> using namespace std; typedef long long ll; #define len(x) ((int)((x).size())) #defi ......
abc 320

Atcoder abc の 初体験

[ABC320F] Fuel Round Trip 若只考虑单程的,设一个 \(dp_{i,j}\) 表示走到第 \(i\) 个加油站剩下的油为 \(j\) 的最小花费。 但是还需要考虑回来可能也要加油,所以综合考虑,设 \(dp_{i,j,k}\) 表示到第 \(i\) 个加油站去的途中有 \(j ......
Atcoder abc

[ABC320E] Somen Nagashi题解

2023-09-16 题目 题目传送门 翻译 翻译 难度&重要性(1~10):4 题目来源 AtCoder 题目算法 优先队列 解题思路 水题一道。 需要两个优先队列: 因为每一次是队首的人拿到面条,即队列中编号最小的拿面条,就用一个优先队列用来维护当前队列中的编号最小的人。 由于每一次拿了面条后再 ......
题解 Nagashi Somen 320E ABC

【题解】AtCoder-ABC320

AtCoder-ABC320A Leyland Number 依题意计算。 提交记录:Submission - AtCoder AtCoder-ABC320B Longest Palindrome 直接 \(O(n^2)\) 枚举,\(O(n)\) 判断。 提交记录:Submission - AtC ......
题解 AtCoder-ABC AtCoder ABC 320

[ABC320F] Fuel Round Trip 题解

题意 在坐标轴上给定 \(N\) 个点,坐标依次为 \(X_1, X_2, \cdots, X_N\),你需要从原点前往 \(X_N\) 并折返,其中在第 \(1\) 个到第 \(N - 1\) 个点上有加油站,其中第 \(i\) 个加油站可以花费 \(P_i\) 购买 \(F_i\) 升汽油,汽油 ......
题解 Round 320F Fuel Trip

[ABC320F]FuelRoundT

[ABC320F] Fuel Round Trip 这道题我们首先观察数据范围,发现 \(n,h\le 300\),于是就可以围绕它想一个三次方的复杂度。 这个数据范围,一般明摆着就是 DP,所以我先往 DP 方向思考。 首先思考如果只要一趟的情况,发现十分简单,令 \(dp_{i,j}\) 表示到 ......
FuelRoundT 320F ABC 320

How to Set the Default Gateway on Ubuntus

ip route list ip r | grep default sudo ip route add default via 10.10.1.1 sudo ip route add default via 10.10.1.1 dev enp0s3 sudo ip route delete defa ......
Default Gateway Ubuntus How Set

ABC320

T1:Leyland Number 模拟 代码实现 a, b = map(int, input().split()) print(a**b+b**a) T2:Longest Palindrome 模拟 代码实现 #include <bits/stdc++.h> #define rep(i, n) f ......
ABC 320