摘要:
Deploying from a Git Tag -- buildingTag https://notesfromthelifeboat.com/post/deploying-from-a-git-tag/ If you want to evaluate your changes in the st
阅读全文
posted @ 2023-01-24 23:11
lightsong
阅读(18)
推荐(0)
摘要:
B - New Place https://atcoder.jp/contests/arc154/tasks/arc154_b 思路 https://blog.csdn.net/nike0good/article/details/128751025 由于操作的特殊性,从s的第一个字符删除,插入后面任
阅读全文
posted @ 2023-01-23 20:17
lightsong
阅读(43)
推荐(0)
摘要:
A - Swap Digit https://atcoder.jp/contests/arc154/tasks/arc154_a 思路 A 和 B中数字需要互换, 互换的准则是,使得 互换后的 AB 乘积最小, 互换后的 A 和 B 差值尽量大 即: 将对应位置的 数字, 小的数字放在A, 大的数字
阅读全文
posted @ 2023-01-23 18:28
lightsong
阅读(53)
推荐(0)
摘要:
E - Souvenir https://atcoder.jp/contests/abc286/tasks/abc286_e 思想 图计算Floyd算法,求任意两点之间的最短距离 最短距离对应路径上value总和。 Floyd算法理解 https://www.cnblogs.com/lightson
阅读全文
posted @ 2023-01-22 23:54
lightsong
阅读(27)
推荐(0)
摘要:
D - Money in Hand https://atcoder.jp/contests/abc286/tasks/abc286_d 思路 参考:https://www.geeksforgeeks.org/coin-change-dp-7/ dp[i][j]: for j yuan, find i
阅读全文
posted @ 2023-01-22 22:30
lightsong
阅读(22)
推荐(0)
摘要:
D - Money in Hand https://atcoder.jp/contests/abc286/tasks/abc286_d 思路 -- 可达性标记法 创建可达性标记map vis 默认设置 vis[0] = true 表示 0 的钱数,可以凑成,不用选取任何硬币 对于 A1 B1 做可访
阅读全文
posted @ 2023-01-22 14:00
lightsong
阅读(40)
推荐(0)
摘要:
C - Rotate and Palindrome https://atcoder.jp/contests/abc286/tasks/abc286_c 思路 从原始字符串开始, rotate第一次, rotate第二次, ... , rotate最后一次 对于每种情况得到的字符串: 判断如果转换成回
阅读全文
posted @ 2023-01-22 13:38
lightsong
阅读(55)
推荐(0)
摘要:
C - abc285_brutmhyhiizp https://atcoder.jp/contests/abc285/tasks/abc285_c 思路 对于长度为L+1的字符序列, A[1], ..., A[L], A[L+1] 首先统计长度为1 到 L 字符序列 总数, 即 A , ... ,
阅读全文
posted @ 2023-01-20 13:06
lightsong
阅读(22)
推荐(0)
摘要:
D - Change Usernames https://atcoder.jp/contests/abc285/tasks/abc285_d 思路 DFS深度遍历图。 需要注意的是, 整个大图中可能有很多小的连通子图, 每个子图需要确定起始访问节点,起始节点为没有入度的节点。 同时还需要注意的是,
阅读全文
posted @ 2023-01-20 12:59
lightsong
阅读(54)
推荐(0)
摘要:
1032. Find a Multiple https://acm.timus.ru/problem.aspx?space=1&num=1032 思路 对于n个数 a[1] ... a[n] 首先计算累加和 s[1] ... s[n] s[i] = a[1] + a[2] + ... + a[i]
阅读全文
posted @ 2023-01-10 22:35
lightsong
阅读(21)
推荐(0)
摘要:
B. Kolya and Tandem Repeat https://codeforces.com/problemset/problem/443/B 思路 如果补充字符长度k大于等于s长度,则新的字符串,一份两半, 前半分包括s,可能包括部分补充的字符, 后半部分,则是完全的补充字符,可以完全匹配前
阅读全文
posted @ 2023-01-08 23:22
lightsong
阅读(39)
推荐(0)
摘要:
C - Count Connected Components https://atcoder.jp/contests/abc284/tasks/abc284_c 思路 寻找独立的子连通图个数。 使用map记录边,即点之间的连通性 使用vector记录顶点是否被访问过 使用queue对任意未访问点做b
阅读全文
posted @ 2023-01-08 18:01
lightsong
阅读(49)
推荐(0)
摘要:
E - Don't Isolate Elements https://atcoder.jp/contests/abc283/tasks/abc283_e 思路 参考 https://www.cnblogs.com/cilinmengye/p/17008799.html
阅读全文
posted @ 2023-01-07 19:55
lightsong
阅读(47)
推荐(0)
摘要:
1055. Combinations https://acm.timus.ru/problem.aspx?space=1&num=1055 思路 对于组合数 C(M,N) 不能使用公式计算最终值,然后再根据最终值,分解质因数,统计质因数个数; 因为这种情况会导致数值越界。 改变思路, 组合数公式实际
阅读全文
posted @ 2023-01-03 15:34
lightsong
阅读(18)
推荐(0)
摘要:
F - Permutation Distance https://atcoder.jp/contests/abc283/tasks/abc283_f 思路 最小生成树法: https://zhuanlan.zhihu.com/p/595421879 动态缩减查找距离法 朴素思维: 如果按照Di定义,
阅读全文
posted @ 2023-01-03 12:20
lightsong
阅读(45)
推荐(0)
摘要:
D - Scope https://atcoder.jp/contests/abc283/tasks/abc283_d 思路 使用stack做字符串的内容分析, 除了)所有的字符依次入栈, 遇到(字符,则从栈顶开始依次出栈,直到第一个(也被出栈; 使用set做已入栈的小写字母统计, 在小写字母入栈过
阅读全文
posted @ 2023-01-01 22:53
lightsong
阅读(52)
推荐(0)
摘要:
C. On Number of Decompositions into Multipliers https://codeforces.com/problemset/problem/397/C 思路 Code https://codeforces.com/contest/397/submission/
阅读全文
posted @ 2023-01-01 22:46
lightsong
阅读(19)
推荐(0)
摘要:
D - Make Bipartite 2 https://atcoder.jp/contests/abc282/tasks/abc282_d Simple Graph https://mathworld.wolfram.com/SimpleGraph.html A simple graph, als
阅读全文
posted @ 2022-12-18 00:50
lightsong
阅读(90)
推荐(0)
摘要:
Median http://poj.org/problem?id=3579 思路 参考: https://www.cnblogs.com/sky-stars/p/11317030.html lower_bound http://c.biancheng.net/view/7521.html
阅读全文
posted @ 2022-12-12 21:14
lightsong
阅读(90)
推荐(0)
摘要:
Floyd算法 dijistra算法解决,从一点出发,到其它所有点的最短路径。 此算法解决,从任何一点出发,到任何点的最短路径。 https://zhuanlan.zhihu.com/p/87480486 理解
阅读全文
posted @ 2022-12-11 23:40
lightsong
阅读(33)
推荐(0)
摘要:
1053. Pinocchio https://acm.timus.ru/problem.aspx?space=1&num=1053 思路 每次取两个,进行比较, 相等则舍去一个, 不相等,则从长的里面减去短的。 对于不相等的情况, 则相当于将长的中多减几次短的,直到不能减为止,这就相当于求最大公约
阅读全文
posted @ 2022-12-10 15:33
lightsong
阅读(26)
推荐(0)
摘要:
1236. Decoding Task https://acm.timus.ru/problem.aspx?space=1&num=1236 思路 对于带空格串加密结果,第一个字符61,K1K2 XOR 32 = 61,可以算出K1K2 对于原始串加密结果,第一个字符05, K1K2 XOR C1C
阅读全文
posted @ 2022-12-10 14:45
lightsong
阅读(25)
推荐(0)
摘要:
D - Factorial and Multiple https://atcoder.jp/contests/abc280/tasks/abc280_d 思路 Code https://blog.csdn.net/wp_fxy/article/details/128179159 https://ww
阅读全文
posted @ 2022-12-07 10:21
lightsong
阅读(69)
推荐(0)
摘要:
E - Critical Hit https://atcoder.jp/contests/abc280/tasks/abc280_e REFERENCE https://blog.csdn.net/sophilex/article/details/128169335 dp[i]=(dp[i-2]+1
阅读全文
posted @ 2022-12-05 23:26
lightsong
阅读(55)
推荐(0)
摘要:
Q Learning 升级版 https://zhuanlan.zhihu.com/p/110657606 Q Learning面向的是离散状态空间, DQN可以面向连续状态空间。 Sample Code https://github.com/louisnino/RLcode/blob/master
阅读全文
posted @ 2022-12-01 15:28
lightsong
阅读(287)
推荐(0)
摘要:
D - Freefall https://atcoder.jp/contests/abc279/tasks/abc279_d 思路 求凹函数的极小值 https://www.cnblogs.com/luoyj/p/12408277.html#6 #include<bits/stdc++.h> usi
阅读全文
posted @ 2022-11-27 22:34
lightsong
阅读(99)
推荐(0)
摘要:
E - Crystal Switches https://atcoder.jp/contests/abc277/tasks/abc277_e 思路 做双层图分离。 使用虚线连接两个图,表示switch动作。 使用双端队列,结合最短路算法,从1出发,遍历所有节点。 取两个目标节点路径更小值。 Code
阅读全文
posted @ 2022-11-19 12:07
lightsong
阅读(45)
推荐(0)
摘要:
Q-Learning https://www.geeksforgeeks.org/q-learning-in-python/ Reinforcement Learning briefly is a paradigm of Learning Process in which a learning ag
阅读全文
posted @ 2022-11-14 22:38
lightsong
阅读(262)
推荐(0)
摘要:
D - Takahashi's Solitaire https://atcoder.jp/contests/abc277/tasks/abc277_d 思路 先计算所有的输入的和 total, 将输入列表首先进行排列 找到所有连续段和中最大的值 maxsum, 此处连续满足条件 a[i] == a[
阅读全文
posted @ 2022-11-13 23:46
lightsong
阅读(95)
推荐(0)
摘要:
C - Ladder Takahashi https://atcoder.jp/contests/abc277/tasks/abc277_c 思路 把梯子可达楼层看成图的节点 把梯子看成节点之间的连线 所以整个问题变成图的遍历问题,找到所有节点的最大值。 Code https://atcoder.j
阅读全文
posted @ 2022-11-13 23:39
lightsong
阅读(127)
推荐(0)
摘要:
How JWT (JSON Web Token) authentication works? https://www.idiotinside.com/2019/09/26/how-jwt-authentication-works/ What is JWT (JSON Web Token)? JSON
阅读全文
posted @ 2022-11-10 23:18
lightsong
阅读(57)
推荐(0)
摘要:
TOPIC https://fastapi.tiangolo.com/advanced/security/oauth2-scopes/ FASAPI不支持OAuth2的全部流程,但是支持scopes功能, 类似一起全集API,特定的用户只能访问其scope范围之内的API, 使用此功能, 即不再是登
阅读全文
posted @ 2022-11-10 16:21
lightsong
阅读(207)
推荐(0)
摘要:
OAuth2 https://oauth.net/2/ OAuth 2.0 OAuth 2.0 is the industry-standard protocol for authorization. OAuth 2.0 focuses on client developer simplicity
阅读全文
posted @ 2022-11-10 16:09
lightsong
阅读(102)
推荐(0)
摘要:
泛型(Generics) https://www.geeksforgeeks.org/generics-in-java/ 一般类的定义,其引用类是要在其代码中明确指定的 但是对于一些上层公共逻辑,其期望可以应用到若干引用类中 则定义泛型类, 可以满足这种需求。 泛型类在使用的使用, 才绑定具体的引用
阅读全文
posted @ 2022-11-08 10:49
lightsong
阅读(344)
推荐(0)
摘要:
FastAPI CRUD Router https://github.com/awtkns/fastapi-crudrouter fastapi提供基础的制作API能力 对于简单的业务来说,对于表仅仅需要 CRUD 接口,不需要其他额外的数据逻辑, 对于这种情况,我们希望能够快速提供对指定表格的 C
阅读全文
posted @ 2022-11-02 22:28
lightsong
阅读(378)
推荐(0)
摘要:
dataset https://dataset.readthedocs.io/en/latest/index.html https://github.com/pudo/dataset https://dataset.readthedocs.io/en/latest/quickstart.html#s
阅读全文
posted @ 2022-11-01 18:25
lightsong
阅读(34)
推荐(0)
摘要:
D - Yet Another Recursive Function https://atcoder.jp/contests/abc275/tasks/abc275_d 思路 动态规划问题。 第一印象使用函数递归调用实现, 但刚开始担心会爆栈,因为n很大会产生很多次递归调用层数, 所以,最开始考虑使
阅读全文
posted @ 2022-10-31 22:46
lightsong
阅读(46)
推荐(0)
摘要:
C - Counting Squares https://atcoder.jp/contests/abc275/tasks/abc275_c 参考: https://atcoder.jp/contests/abc275/submissions/36103954 思路 首先不能使用暴力穷举法,任意四个
阅读全文
posted @ 2022-10-31 12:20
lightsong
阅读(132)
推荐(0)
摘要:
load balance https://zhuanlan.zhihu.com/p/64777456 四层负载均衡(tcp) 在三层负载均衡的基础上,用 ip+port 接收请求,再转发到对应的机器。 七层负载均衡(http) 根据虚拟的 url 或 IP,主机名接收请求,再转向相应的处理服务器。
阅读全文
posted @ 2022-10-30 22:30
lightsong
阅读(138)
推荐(0)
摘要:
Argparse https://www.geeksforgeeks.org/argparse-vs-docopt-vs-click-comparing-python-command-line-parsing-libraries/ python内置库。 使用代码形式定义CLI. Argparse i
阅读全文
posted @ 2022-10-29 18:50
lightsong
阅读(9)
推荐(0)