marbles game with

【五期李伟平】CCF-A(S&P'20)The Value of Collaboration in Convex Machine Learning with Differential Privacy

Nan W., et al. “The Value of Collaboration in Convex Machine Learning with Differential Privacy.” 2020 IEEE Symposium on Security and Privacy. 304-317 ......

CodeForces 1906K Deck-Building Game

洛谷传送门 CF 传送门 UNR #2 黎明前的巧克力。 枚举两个人选的卡的并集 \(S\),那么当 \(\bigoplus\limits_{i \in S} a_i = 0\) 时 \(S\) 有贡献 \(2^{|S|}\)。 考虑将 \(2^{|S|}\) 分摊到每个元素上,也就是每个元素有 \ ......
Deck-Building CodeForces Building 1906K 1906

AtCoder Regular Contest 168 E Subsegments with Large Sums

洛谷传送门 AtCoder 传送门 尝试二分答案,问题变为要求恰好选 \(x\) 段 \(\ge s\),最大化选的段数。 发现我们不是很会算段数的 \(\max\),因为要求段不重不漏地覆盖 \([1, n]\)。考虑给每个 \(\ge s\) 段 \([l, r]\) 一个 \(r - l\) ......
Subsegments AtCoder Regular Contest Large

Quake recovery starts with a bowl of hot beef noodles 地震恢复从一碗热牛肉面开始

In freezing temperatures, a simple bowl of beef noodles brings hope to thousands of residents who lost their homes in the magnitude-6.2 earthquake in ......
牛肉面 牛肉 地震 recovery noodles

Atcoder ABC 333 F - Bomb Game 2

题目大意(采用0#语言):有n个人,每个人每次要么被“炸掉”,要么就被移到最后面去,概率都是1/2,求最后只剩下初始时排名为第i的人的概率。 这道题跟人数有关,而且跟位置有关。 我们定义dp[i]表示一共有i个人,第i个为最后一位留下来时的概率。 (不想写公式) 定义j从0到i - 1,表示从前面i ......
Atcoder Bomb Game ABC 333

关于cin,cout的 I/O 性能优化【ios::sync_with_stdio(false);】

遇到大数据量(cin、cout 数据量级达到 1e5、1e6 ),因为考虑 IO 性能会报错 TLE,一般选择 scanf、printf 替代 cin、cout 但是加上这两段代码,它们之间的速度就相差无几了 ios::sync_with_stdio(false); cin.tie(nullptr) ......
sync_with_stdio 性能 false stdio cout

FLAC: Federated Learning with Autoencoder Compression and Convergence Guarantee-2022

目的:减少通信量(成本),例如VGGNet架构具有大约1.38亿个参数(4264 Mb) 方法:具有自动编码器压缩(Autoencoder Compression)且具有收敛保证(Convergence Guarantee);利用冗余信息(the redundant information)和FL的 ......

B. Collecting Game

原题链接 简单概括 把每个i看成一只怪兽,每只怪兽的初始能量值是\(a[i]\),怪兽可以吃掉其他比自己能量值小的怪兽,并得到进化,能量值增加,增加的大小等于被吃的怪兽的能量值。 问每只怪兽最多能吃几只怪兽? 事实 1.无论如何,一只怪兽一定能吃掉所有初始值比他小的怪兽。 2.在吃完所有初始值比他小 ......
Collecting Game

Configuration 'compile' is obsolete and has been replaced with 'implementati解决方案

Android Studio更新到3.1.2编译之前的项目直接抛出下面的异常,这让我很是头疼,经过一翻查找发现是我们配置文件中的API已经过期,我对过期的API进行修改就Over了 1、异常显示 Configuration ‘compile’ is obsolete and has been rep ......

浅谈 Nim game(尼姆博弈)

首先,我们需要了解 \(Nim\) 游戏是什么东西。 \(Nim\) 游戏指:两个人,有 \(n\) 堆数,每堆有 \(a_i\) 个,每次可以且仅可以取一堆中的若干个数,求问先手有没有必胜策略(当然两个人都足够聪明)。 首先,先研究显然的必胜策略。比如,我们要得到 \(0\) 这个数,那么当你取完 ......
game Nim

Codeforces Round 651 (Div. 2)C. Number Game(数学思维数论)

C. Number Game 我们考虑那些状态是必胜态 我的回合时n为奇数(除1外),直接除以n则必胜 下面偶数的情况稍复杂 偶数我们能进行的操作只有除以一个奇数,需要考虑怎么把当前状态变为对手的必败态 偶数一定含2的因子,\(n=2^k*q,q为奇数\) 当\(k=1时如果q\)是一个质数那么只能 ......
数论 Codeforces 思维 数学 Number

《OneLLM: One Framework to Align All Modalities with Language》论文学习

一、Abstract 随着LLM的兴起,由于其强大的语言理解和推理能力,在学术和工业界中越来越受欢迎。LLM的进展也启发了研究人员将LLM作为多模态任务的接口,如视觉语言学习、音频和语音识别、视频理解等,因此多模态大语言模型(Multimodal Large Language Model, MLLM ......
Modalities Framework Language OneLLM 论文

CF1904B Collecting Game 题解

每次在数组中找大于 \(s\) 的数太麻烦了,将数组排序后,每次能删去的数一定是一个前缀,就只需要对于每个 \(i\),考虑它能删去的数的右端点在哪。设 \(r_i\) 为初始删除 \(i\) 能删到的数的右端点的编号,那么有: \[r_i= \begin{cases} n & \text{ if ......
题解 Collecting 1904B 1904 Game

Game with Marbles

引言 题目链接:https://codeforces.com/contest/1914/problem/E2 思路 假设有数组 \(a_1,a_2, \cdots a_n\) 和数组 \(b_1,b_2, \cdots b_n\) 分别表示 \(Alice\) 和 \(Bob\) 的弹珠数。 假设有 ......
Marbles Game with

论文阅读-Self-supervised and Interpretable Data Cleaning with Sequence Generative Adversarial Networks

1. GARF 简介 代码地址:https://github.com/PJinfeng/Garf-master 基于 SeqGAN 提出了一种自监督、数据驱动的数据清洗框架——GARF。 GARF 的数据清洗分为两个步骤: 规则生成 (Rule generation with SeqGAN):利用 ......

E2. Game with Marbles (Hard Version)

原题链接 导论,有点博弈论的感觉? 每个人轮流选一个大家都有的球,然后自己扣一个球,对方扣完。问女生剩下的球减去男生剩下的球,最大值是多少? 一些条件 1.初始每个人每种球都有 2.女生想使这个值大一点,男生想使这个值小一点,换句话说,每个人都尽量多扣对面的球,多保留自己的球。 3.如果选择扣掉对面 ......
Marbles Version Game with Hard

MySQL server is running with the --super-read-only option的解决办法

原因 数据库是只读模式 解决办法 修改为读写模式 mysql -uroot -p你的密码 进入mysql select @@read_only; set global read_only=0; # 顺便设置可远程连接(不需要可跳到flush privileges) use mysql; update ......
super-read-only running 办法 server option

SSH失败:Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

一、表象 二、分析 由报错信息可以看出“公钥”是错误的 检查 **服务器 **~/.ssh/authorized_keys文件公钥配置 也有可能是配置问题,解决问题如下 三、解决 vim /etc/ssh/sshd_config # 增加如下修改: PasswordAuthentication ye ......

Unable to negotiate with ip port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

一、解决 cd ~/.ssh vim config # 添加以下内容 Host * HostkeyAlgorithms +ssh-rsa PubkeyAcceptedKeyTypes +ssh-rsa ......
negotiate ssh matching ssh-rsa ssh-dss

CF1866B Battling with Numbers 题解

前置知识:如果 \(p=x^a,q=x^b\),那么 \(\gcd(p,q)=x^{\min(a,b)},\operatorname{lcm}(p,q)=x^{\max(a,b)}\)。 对于每个 \(x \in a_i\),令 \(x\) 在 \(Y\) 中的指数为 \(d_i\)(实际上不一定) ......
题解 Battling Numbers 1866B 1866

Build Secure Web Services With SOAP Headers and Extensions

原文如下: https://www.developer.com/microsoft/dotnet/build-secure-web-services-with-soap-headers-and-extensions/ 摘录我最想要的Extensions部分 <%@ WebService Langua ......
Extensions Services Headers Secure Build

Freezing with Style 题解?

好像不是题解,算是记录。 记一个 Trick:当求路径边权的中位数的最大值的时候,可以先二分一个答案 \(mid\),然后把大于 \(mid\) 的边设为 \(1\),否则设为 \(-1\)。这样只需要看路径长度是否大于零就可以判断出有没有中位数大于等于 \(mid\) 的情况了。 当然类似到求一个 ......
题解 Freezing Style with

报错 MEDIA_URL setting must end with a slash

报错 MEDIA_URL setting must end with a slash 构建Django报错, MEDIA_URL setting must end with a slash 分析 根据报错找到media url配置,查看官方文档 MEDIA_URL 必须以/结尾 #根据报错找到med ......
MEDIA_URL setting MEDIA slash must

C. Game with Multiset

原题链接 反思:要把各种可能的情况都判断一遍再提交!不要急着提交 简介 仓库里有若干个二次方数,请问是否能取出若干数使得刚好等于给定数? 情况讨论 情况1.仓库里只有一个4,但是我要求2,求不得 情况2.仓库里有三个1,我要求3,能求 大概思路 从\(i\in[log2(v),0]\)遍历(从大到小 ......
Multiset Game with

Docker error: "host" network_mode is incompatible with port_bindings

原因 这个错误的原因是在Docker的配置中,使用了"host"网络模式,同时又试图绑定端口(port_bindings)。"host"网络模式意味着容器将直接使用主机的网络,而不是使用Docker创建的虚拟网络。在这种模式下,容器的网络栈不会被隔离,容器可以直接监听主机的网络端口。 因此,当使用" ......

Vision Transformer with Super Token Sampling

Vision Transformer with Super Token Sampling * Authors: [[Huaibo Huang]], [[Xiaoqiang Zhou]], [[Jie Cao]], [[Ran He]], [[Tieniu Tan]] Local library 初读 ......
Transformer Sampling Vision Super Token

InternImage: Exploring Large-Scale Vision Foundation Models with Deformable Convolutions 可变形卷积v3

InternImage: Exploring Large-Scale Vision Foundation Models with Deformable Convolutions * Authors: [[Wenhai Wang]], [[Jifeng Dai]], [[Zhe Chen]], [[Z ......

SegViT: Semantic Segmentation with Plain Vision Transformers

SegViT: Semantic Segmentation with Plain Vision Transformers * Authors: [[Bowen Zhang]], [[Zhi Tian]], [[Quan Tang]], [[Xiangxiang Chu]], [[Xiaolin We ......

BiFormer: Vision Transformer with Bi-Level Routing Attention 使用超标记的轻量ViT

alias: Zhu2023a tags: 超标记 注意力 rating: ⭐ share: false ptype: article BiFormer: Vision Transformer with Bi-Level Routing Attention * Authors: [[Lei Zhu] ......
轻量 Transformer 标记 Attention BiFormer

Adaptive Sparse Convolutional Networks with Global Context Enhancement for Faster Object Detection on Drone Images

Adaptive Sparse Convolutional Networks with Global Context Enhancement for Faster Object Detection on Drone Images * Authors: [[Bowei Du]], [[Yecheng ......