codeforces round sort with
codeforces 50题精选训练
本章节参考:2020,2021 年 CF 简单题精选 - 题单 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 首先,很容易观察到点的一些特征: - 都在第一象限;- 点的分布越来越稀疏。 以样例为例: 还有无限个点没有画出来。 根据点的分布越来越稀疏的特性,能不能发现收集点的规律 ......
Codeforces Round 905 (Div. 3) ABCDEG1
Codeforces Round 905 (Div. 3)ABCDEG1 A. Morning 思路:签到,直接模拟。 // AC one more times // nndbk #include <bits/stdc++.h> using namespace std; typedef long l ......
Educational Codeforces Round 99 (Rated for Div. 2)
https://codeforces.com/contest/1455 很久没有vp了,感觉思维又僵化了 A题直接看样例,直接猜是长度。 B题首先如果是 \(x=\frac{n(n+1)}{2}\),那么就是n 否则如果\(x=\frac{n(n+1)}{2}+y\),分成两类 y=n,ans=n+ ......
Educational Codeforces Round 156 (Rated for Div. 2) ABCD
Educational Codeforces Round 156 (Rated for Div. 2) ABCD A. Sum of Three 题意:给定正整数 \(n\),判断是否存在正整数 \(a\),\(b\),\(c\) 满足: \(a+b+c=n\)。 \(a\),\(b\),\(c\) ......
Codeforces Round 904 (Div. 2)
\(A. Simple Design\) https://codeforces.com/contest/1884/submission/233628914 \(B. Haunted House\) https://codeforces.com/contest/1884/submission/2336 ......
Codeforces Round 910 (Div. 2) - D
目录D. Absolute Beauty Codeforces Round 910 (Div. 2) D. Absolute Beauty 观察可知,只要当交换的 \(i\) 和 \(j\) 满足 $ max(a_i, b_i) < min(a_j, b_j)$ 或者 $ min(a_i, b_i) ......
[948] Extract PDF tables that have cells with multiple lines
If your PDF tables have cells with multiple lines, and you want to merge those lines within the same cell when extracting the table, you might need a ......
Applying sewage charging system to deal with water pollution problem in Russia.
What is the sewage charging system? Although manufacturing has always been a key driving force for China's economic growth, it is also the root cause ......
CodeForces 合集第三弹
这个合集主要是近期的 CodeForces 比赛题。 1898. Codeforces Round 910 (Div. 2) https://codeforces.com/contest/1898 A. Milica and String 很容易发现答案不超过 \(1\),然后分类讨论当前 B 的个 ......
Running DPDK Forwarding Applications With Pktgen-DPDK
As part of the evaluation stage of our bachelor thesis, we set up a testbed for running forwarding applications in DPDK and with Pktgen-DPDK as the tr ......
Solving 0/1 knapsack problem with dynamic programming (英语课汇报)
Solving 0/1 knapsack problem with dynamic programming Introduction 0/1 knapsack problems A long time ago, an explorer went to an island where there we ......
Codeforces Round 785 (Div. 2)
A - Subtle Substring Subtraction /* * __ ~~~~~~~~~~~ ___ * . . ~~// ...... __--~ ~~ * -. \_|// |||\\ ~~~~~~::::... /~ * ___ _ _-~o~ \/ ||| \\ _/~~- * ......
Codeforces Round 908 (Div. 2)
Preface 补一下之前期中考落下的CF yysy因为这学期又开始断电了,所以除了周五周六晚上的CF可能都不一定会去打,都会以后面补题为主 A. Secret Sport 由于题目保证给出的状态合法,因此直接输出最后一个字符即可 #include<cstdio> #include<iostream ......
【略读论文|时序知识图谱补全】Temporal Knowledge Graph Reasoning with Historical Contrastive Learning
会议:AAAI,时间:2023,学校:上海交通大学 摘要: 大多数时序知识图谱的推理方法高度依赖于事件的递归或周期性,这给推断与缺乏历史交互的实体相关的未来事件带来了挑战。本文提出一种新的基于历史对比学习训练框架的对比事件网络(CENET)的新事件预测模型。 1.CENET 学习历史和非历史依赖来区 ......
Codeforces Round 910 (Div. 2)
Codeforces Round 910 (Div. 2) 基本情况 做A题的速度比之前快多了,大概20分钟搞定。 B题想了一个贪心错解,想用链表实现,但是不熟练,实现太慢,而且还被hack了。 但是自己hack掉了,造数据上进步。 B. Milena and Admirer 贪心思路 发现一个大于 ......
Codeforces Round 910 (Div. 2)
\(A. Milica and String\) https://codeforces.com/contest/1898/submission/233431132 \(B. Milena and Admirer\) https://codeforces.com/contest/1898/submis ......
Codeforces Round 909 (Div. 3)
Codeforces Round 909 (Div. 3) 基本情况 第一次在 CF 上 AC 了超过一道题。(毕竟是Div3) B 题卡住了很久。 D 没有深入思考。 [B. 250 Thousand Tons of TNT](Problem - B - Codeforces) 一开始死活过不了的 ......
《Fine-Grained Image Analysis with Deep Learning: A Survey》阅读笔记
论文标题 《Fine-Grained Image Analysis with Deep Learning: A Survey》 作者 魏秀参,南京理工大学 初读 摘要 与上篇综述相同: 细粒度图像分析(FGIA)的任务是分析从属类别的视觉对象。 细粒度性质引起的类间小变化和类内大变化使其成为一个具有 ......
Princeton Algorithms, Part I week3 Quick Sort
Quick Sort 今天学习quick sort,quick sort的基本思想是有一个数组,先shuffle以后,保证数组的item位置是均匀分布的,选择一个item然后,把所有比这个item大的放在item右边,所有比这个item小的放在左右,然后递归的进行这个操作,如下图所示 这里面的par ......
[Javascript] Using Generator to create a number generate with condition
const generateTimeMs = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min /** * A generator which can generate numbers based on settings ......
Educational Codeforces Round 13 E
tilian 最开始看错了以为是 可以任意选择两人or选择一人胜出 但题意是 可以选择下一个擂主是谁 考虑dp的话 我们显然需要记录一个state以及当前擂主是谁 转移就是 dp[state][i]=max(dp[state][i],dp[state(1<<j)][j]*a[i][j]+dp[sta ......
Codeforces Round 909 (Div. 3) A-E
Codeforces Round 909 (Div. 3) A. Game with Integers 题意: 两人轮流操作,可以加一或减一,若结果能被3整除则输出First,否则输出Second 思路: 若n不能被3整除,则第一个人可以直接通过加一或减一使结果被3整除,反之则一定不能 代码: #i ......
练习记录-cf-Codeforces Round 909 (Div. 3)(A-G)
好久没打div了 然后思维太差 现在被抓回来继续打了QWQ 终于被我逮到一场G数据结构的 ak了 既然ak了就开心地写下题解 别被hack别被hack别被hack 这场挺简单的 之前打的div3都好难qaq A. Game with Integers 题意:给一个数字,两人轮流操作,可以+1或者-1 ......
重写Java中Arrays数组工具类提供的sort()排序函数中的比较器类Comparator的compare()方法!
排序方法是我们日常开发或者写功能函数,或者实现算法时,常调用的方法。 有时甚至,开发人员自己还要写一写排序算法。 今天,我们来修改Java官方提供的Arrays工具类中的静态排序sort()方法。 反问一下,为什么要重写呢? 官方提供的还不够你用? 回答:确实不够用,官方默认是对数字,特别是sort ......
sort
sort学习笔记: 基本认识: sort并非只是普通的快速排序,除了对普通的快速排序进行优化,它还结合了插入排序和堆排序。根据不同的数量级别以及不同情况,能自动选用合适的排序方法。 头文件: 在C++中使用sort()函数需要使用#include<algorithm>头文件。algorithm意为" ......
使用Linux命令sort及uniq对文件或屏幕输出进行分组统计
sort demo.txt | uniq -c | sort -rn | head -3 在日常Linux操作常常需要对一些文件或屏幕数次中重复的字段进行分组统计。 实现的方法非常简单,核心命令为:sort | uniq --c | sort -rn 。 sort:对指定列进行排序,使该列相同的字段 ......
SQL server的with的用法
with主要用法之一就是简化联合子查询的sql代码,先将要用的子查询定义成一个表,后面可以重复使用。 在多级和较为复杂的查询中可以让SQL更清晰。 简单样式1 WITH subQry_A AS (SELECT fld1, fld2, fldxxx..... FROM tabName) SELECT ......
Shell - Run a script with environment variables
zzh@ZZHPC:/zdata/Github/microservices/order/cmd$ DATA_SOURCE_URL="root:verysecretpass@tcp(127.0.0.1:3306)/order" \ > APPLICATION_PORT=3000 \ > ENV=dev ......
Docker - Run MySQL database with docker
zzh@ZZHPC:~$ docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=verysecretpass -e MYSQL_DATABASE=order mysql In this case, our data source URL isroot:very ......
CodeForces 1709F Multiset of Strings
洛谷传送门 CF 传送门 考虑若确定了所有 \(c_s\),如何计算集合最大大小。 下文令原题面中的 \(f\) 为 \(m\)。 发现我们可以类似倒推地确定。比如若 \(n = 3\),\(c_{00} = \min(c_{000}, c_{001})\),\(c_{01} = \min(c_{0 ......