标题: 送个UK节点
作者: #tongshuai
板块: #福利羊毛
编号:
帖子: https://linux.do/t/topic/1279671
时间: 2025-12-06 16:01:14
摘要:
作者: #tongshuai
板块: #福利羊毛
编号:
1279671帖子: https://linux.do/t/topic/1279671
时间: 2025-12-06 16:01:14
摘要:
vless://da7e4505-3f1d-43f5-cce1-a630cd6096c9@51.38.79.253:17899?type=tcp&encryption=none&security=reality&sni=go.microsoft.com&pbk=EG2nENt5GG8vIcHLWF2NsRPuWKfENmupYKRKUD0FLwk&sid=1ee18f10&fp=chrome&flow=xtls-rprx-vision#UK
标题: gemini cli的每日限额好迷啊。
作者: #imocone
板块: #开发调优
编号:
帖子: https://linux.do/t/topic/1279673
时间: 2025-12-06 16:01:37
摘要:
作者: #imocone
板块: #开发调优
编号:
1279673帖子: https://linux.do/t/topic/1279673
时间: 2025-12-06 16:01:37
摘要:
我随便跑跑一个从一组照片中裁剪主体表格内容的程序,调试一会就限额了,要求降到flash模型。有没有办法多用一些啊。
标题: Chrome浏览器被篡改
作者: #alenx
板块: #开发调优
编号:
帖子: https://linux.do/t/topic/1279686
时间: 2025-12-06 16:05:35
摘要:
作者: #alenx
板块: #开发调优
编号:
1279686帖子: https://linux.do/t/topic/1279686
时间: 2025-12-06 16:05:35
摘要:
佬们,有人能帮忙解决一下Chrome启动页被篡改的问题吗。Chrome启动的时候会跳转到http://b.laomaotaotool.com/,然后重定向到百度,https://www.baidu.com/?tn=44004473_96_oem_dg
标题: 远程服务器上如何使用Antigravity或者AI studio
作者: #NickY
板块: #搞七捻三
编号:
帖子: https://linux.do/t/topic/1279693
时间: 2025-12-06 16:07:55
摘要:
作者: #NickY
板块: #搞七捻三
编号:
1279693帖子: https://linux.do/t/topic/1279693
时间: 2025-12-06 16:07:55
摘要:
谷歌实在太强了,但是我想利用它改服务器上的网页代码,下载的太慢了。之前用的是VS code的远程连接,然后用cline。
标题: Leetcode每日一题 —— 3578. 统计极差最大为 K 的分割方式数
作者: #魔法师
板块: #开发调优
编号:
帖子: https://linux.do/t/topic/1279696
时间: 2025-12-06 16:08:02
摘要:
作者: #魔法师
板块: #开发调优
编号:
1279696帖子: https://linux.do/t/topic/1279696
时间: 2025-12-06 16:08:02
摘要:
3578. 统计极差最大为 K 的分割方式数
思路
看完题第一反应是滑动窗口或者动态规划。但是滑动窗口找不到单调属性,所以就用了动态规划。动态转移方程dp(i)=dp(i-1)+dp(i-2)+……直到nums[j]超出nums[i]的上下范围。
代码
public int countPartitions(int[] nums, int k) {
int n = nums.length;
int[] dp = new int[n];
dp[0] = 1;
for (int i = 1; i < n; i++) {
int num = nums[i];
int max = num, min = num;
int j = i;
while (max - min <= k) {
if (j == 0) {
dp[i]++;
break;
} else {
dp[i] = (dp[i] + dp[--j]) % 1000000007;
max = Math.max(max, nums[j]);
min = Math.min(min, nums[j]);
}
}
}
return dp[n - 1];
}
时间复杂度:O(n^2)
空间复杂度:O(n)
优化思路
看范围我以为能过的,结果在最后几个数据的时候超时了。外层遍历肯定是没法优化的,只能考虑如何内层循环如何改为快速的求和,但是真的想不到合适方法。看题目明明这么适合滑动窗口,但是却没有单调属性可用。在纠结滑动窗口的时候,想起了一个很合适的数据结构适合这种情况,TreeMap。TreeMap的firstKey和lastKey能判断超过极限的值是否还在窗口中,如果在就移动left,然后通过right和left计算前缀和的差获取dp[right]的值。
代码
private static final int MOD = 1000000007;
public int countPartitions(int[] nums, int k) {
int n = nums.length;
int[] dp = new int[n];
int[] pre = new int[n + 1];
TreeMap<Integer, Integer> map = new TreeMap<>();
pre[0] = 0;
int left = 0, right = 0;
while (right < n) {
int num = nums[right];
map.merge(num, 1, Integer::sum);
while (map.firstKey() + k < num || map.lastKey() - k > num) {
int leftNum = nums[left++];
map.merge(leftNum, -1, Integer::sum);
if (map.get(leftNum) == 0) map.remove(leftNum);
}
if (left == 0) {
dp[right] = pre[right] + 1;
} else {
dp[right] = (pre[right] - pre[left - 1] + MOD) % MOD;
}
pre[right + 1] = (pre[right] + dp[right]) % MOD;
right++;
}
return dp[n - 1];
}
标题: cc的用户提示词貌似没有写的空间?
作者: #Haku271
板块: #搞七捻三
编号:
帖子: https://linux.do/t/topic/1279717
时间: 2025-12-06 16:14:12
摘要:
作者: #Haku271
板块: #搞七捻三
编号:
1279717帖子: https://linux.do/t/topic/1279717
时间: 2025-12-06 16:14:12
摘要:
我使用gork 4.1询问了cc知道应该如何调用工具,无脑的mcp工具优先只会浪费上下文和token。同时它也知道如何管理持久化记忆。所以用户提示词好像没有写的空间,只需要配置一下output-styles
我做了一个实验,我启动cc后说了从现在开始你不能调用任何工具和阅读任何文件。从你的上下文中列举出当前安装的mcp服务,并列举出他们的作用。cc完美的回答出了答案,我感觉它的系统提示词已经无敌了
标题: 徵集各種語言的好歌 (不要中英)
作者: #善解人意屬實有點害羞
板块: #搞七捻三
编号:
帖子: https://linux.do/t/topic/1279733
时间: 2025-12-06 16:20:21
摘要:
作者: #善解人意屬實有點害羞
板块: #搞七捻三
编号:
1279733帖子: https://linux.do/t/topic/1279733
时间: 2025-12-06 16:20:21
摘要:
只要你覺得好聽就行了
不用顧慮太多
一首多首都隨便你
标题: 最近Ubuntu 24.04的VPS上升级软件包总是报错
作者: #智子
板块: #开发调优
编号:
帖子: https://linux.do/t/topic/1279741
时间: 2025-12-06 16:23:08
摘要:
作者: #智子
板块: #开发调优
编号:
1279741帖子: https://linux.do/t/topic/1279741
时间: 2025-12-06 16:23:08
摘要:
看起来好像系统自动在运行apt-get,设置了锁,但长时间不释放。有没有人遇到同样问题。
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 334393 (apt-get)
标题: 小白也有探针啦~
作者: #jsishsjsj
板块: #搞七捻三
编号:
帖子: https://linux.do/t/topic/1279744
时间: 2025-12-06 16:23:38
摘要:
作者: #jsishsjsj
板块: #搞七捻三
编号:
1279744帖子: https://linux.do/t/topic/1279744
时间: 2025-12-06 16:23:38
摘要:
jsishsjsj的移动快乐机
标题: win10 设置--蓝牙和其他设备设置,闪退怎么办?
作者: #monobo
板块: #福利羊毛
编号:
帖子: https://linux.do/t/topic/1279752
时间: 2025-12-06 16:26:59
摘要:
作者: #monobo
板块: #福利羊毛
编号:
1279752帖子: https://linux.do/t/topic/1279752
时间: 2025-12-06 16:26:59
摘要:
我需要操作【蓝牙】,可是现在闪退,问了AI(deepseek: DeepSeek
gemini:
下图,我选的自动(我手动开启,也还是打不开蓝牙);而且我还从https://www.tenforums.com/tutorials/57567-restore-default-services-windows-10-a.html 下载了注册表,双击这三个导入了电脑
还是没搞定,有没有大佬指教下?(不想重装系统,要重新装软件好麻烦)
标题: Antigravity 原来台湾地区也可以
作者: #kuhua
板块: #搞七捻三
编号:
帖子: https://linux.do/t/topic/1279755
时间: 2025-12-06 16:27:35
摘要:
作者: #kuhua
板块: #搞七捻三
编号:
1279755帖子: https://linux.do/t/topic/1279755
时间: 2025-12-06 16:27:35
摘要:
纯数好奇 为啥都限制香港地区 不限制台湾 claude也是 之前申请美国没有通过 最近挂了两周台湾的梯子 然后申请改到台湾 就过了 然后Antigravity正常登录
标题: 回家一看,发现早上我的牛油果被…
作者: #欣欣|林可欣
板块: #搞七捻三
编号:
帖子: https://linux.do/t/topic/1279759
时间: 2025-12-06 16:28:45
摘要:
作者: #欣欣|林可欣
板块: #搞七捻三
编号:
1279759帖子: https://linux.do/t/topic/1279759
时间: 2025-12-06 16:28:45
摘要:
习惯性的让他靠墙了,结果因为重力的影响,上面没棉花,被压扁了w
我其实一直不确定他是什么的
我喜欢称他为我的梨
虽然几乎从不吃梨,不爱吃梨
标题: 求推荐欧洲非申根区sim卡
作者: #hansjohnson
板块: #搞七捻三
编号:
帖子: https://linux.do/t/topic/1279761
时间: 2025-12-06 16:29:07
摘要:
作者: #hansjohnson
板块: #搞七捻三
编号:
1279761帖子: https://linux.do/t/topic/1279761
时间: 2025-12-06 16:29:07
摘要:
准备到欧洲旅游 3 周,其中 6 天是北马其顿、科索沃、阿尔巴尼亚各 2 天,所以正在寻找一种可以同时在西巴尔干六地(WB6)和欧洲经济区(EEA)使用的 SIM 卡,手机不支持 eSIM。
目前看到德国 MTEL 的预付卡(Mobile Deals - MTEL Germany EEA 和北马其顿可用,不支持科索沃和阿尔巴尼亚。但 WB6 从 2021 年起成为同一漫游区,网上看到有的说这卡两地可用,有的说信号差等于不可用。
如果不能兼容,考虑 EEA 和 WB6 各买一张,以前 EEA 用 Lebara UK 还不错,不过似乎最近有封号问题。听说 Vodafone UK 保号更便宜,不知是否有其他推荐。
至于 WB6,考虑在北马其顿单独购买 A1 SIM 卡,¥55 不算贵,它在北马其顿境内还行,境外只有 2GB,等于科索沃和阿尔巴尼亚每天只能用 500MB。
先谢谢各位佬。
标题: 有没人有人注意到官方的新帖tg推送频道会漏帖子
作者: #VictorLee
板块: #搞七捻三
编号:
帖子: https://linux.do/t/topic/1279773
时间: 2025-12-06 16:34:21
摘要:
作者: #VictorLee
板块: #搞七捻三
编号:
1279773帖子: https://linux.do/t/topic/1279773
时间: 2025-12-06 16:34:21
摘要:
https://linux.do/t/topic/1277365
比如这个帖子,显示18小时之前发的,我翻遍新帖推送频道都没翻到
标题: 请问佬们怎么看论坛等级啊
作者: #sdzssy
板块: #搞七捻三
编号:
帖子: https://linux.do/t/topic/1279775
时间: 2025-12-06 16:34:29
摘要:
作者: #sdzssy
板块: #搞七捻三
编号:
1279775帖子: https://linux.do/t/topic/1279775
时间: 2025-12-06 16:34:29
摘要:
几个月前注册的账号,最近才有时间来论坛,还不知道自己等级在哪里看,不要见笑!
标题: github copilot网络问题
作者: #yiming
板块: #开发调优
编号:
帖子: https://linux.do/t/topic/1279777
时间: 2025-12-06 16:35:03
摘要:
作者: #yiming
板块: #开发调优
编号:
1279777帖子: https://linux.do/t/topic/1279777
时间: 2025-12-06 16:35:03
摘要:
我在使用github copilot过程中经常遇见网络问题。当我提出需求时,copilot能够读取文件、能够回复文字,这些功能全部正常,但是步骤一来到编辑或者创建文件就会报错
我甚至使用profixier对vscode代理都无效,有没有佬知道怎么解决
标题: 使用leaflow搭建的frp穿透new-api服务无法使用
作者: #Diffuser
板块: #开发调优
编号:
帖子: https://linux.do/t/topic/1279784
时间: 2025-12-06 16:36:30
摘要:
作者: #Diffuser
板块: #开发调优
编号:
1279784帖子: https://linux.do/t/topic/1279784
时间: 2025-12-06 16:36:30
摘要:
可以访问new-api和获取模型 但是一直无法聊天,有佬帮忙看看吗
这是服务端配置
# 服务端监听地址
bindAddr = "0.0.0.0"
# 服务端监听端口
bindPort = 7000
# 认证token
auth.token = "****"
# 服务端web控制台配置
webServer.addr = "0.0.0.0"
webServer.port = 7500
webServer.user = "admin"
webServer.password = "******"
# 允许的端口号范围
allowPorts = [
{ single = 7400 },
{ start = 30000, end = 39999 }
]
标题: augment出新策略了?
作者: #oaiNext
板块: #搞七捻三
编号:
帖子: https://linux.do/t/topic/1279833
时间: 2025-12-06 16:49:48
摘要:
作者: #oaiNext
板块: #搞七捻三
编号:
1279833帖子: https://linux.do/t/topic/1279833
时间: 2025-12-06 16:49:48
摘要:
什么鬼,刚刚注册了两个号都没试用资格了,上午注册了五个都有,黑人问号?