Loading

上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 74 下一页
摘要: 不知道为啥是90分,而且是错误不是超时...正在忙着写web,等有时间再改吧 大体思路就是用队列去模拟(一开始写了个优先队列乱排序喜提70,改成普通队列就90了),node存储时间和节点以及当前节点的区块链。为什么要存当前节点的区块链?看看第二个样例的前两个询问就明白了,如果不这么存的话,2号节点就 阅读全文
posted @ 2021-09-04 14:27 脂环 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 挺nt的一个题,除了嗯模拟没想到更好的办法...大概就是每次遍历一遍所有的进程的当前通信,如果 可以收发则直接收发,然后更新当前通信;如果所有进程都不能收发则死锁。细节见代码。 #include <bits/stdc++.h> using namespace std; int t, n; struc 阅读全文
posted @ 2021-08-30 19:24 脂环 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 76. 最小覆盖子串 难度困难1312 给你一个字符串 s 、一个字符串 t 。返回 s 中涵盖 t 所有字符的最小子串。如果 s 中不存在涵盖 t 所有字符的子串,则返回空字符串 "" 。 注意: 对于 t 中重复字符,我们寻找的子字符串中该字符数量必须不少于 t 中该字符数量。 如果 s 中存在 阅读全文
posted @ 2021-08-28 23:27 脂环 阅读(77) 评论(0) 推荐(0) 编辑
摘要: Problem Description Let's define the sum of all digits in x as g(x). For example, g(123)=1+2+3=6. Give you a function: f(x)=Ax2g(x)+Bx2+Cxg2(x)+Dxg(x) 阅读全文
posted @ 2021-08-28 21:58 脂环 阅读(172) 评论(0) 推荐(1) 编辑
摘要: Problem Description Pty has a string S of length n consisting of lowercase English letters. He denotes the value of string T as the number of occurren 阅读全文
posted @ 2021-08-23 12:07 脂环 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 题目背景 这是个非常经典的主席树入门题——静态区间第 kk 小。 数据已经过加强,请使用主席树。同时请注意常数优化。 题目描述 如题,给定 nn 个整数构成的序列 aa,将对于指定的闭区间 [l,r][l,r] 查询其区间内的第 kk 小值。 输入格式 第一行包含两个整数,分别表示序列的长度 nn 阅读全文
posted @ 2021-08-22 00:09 脂环 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定一个字符串 ss,定义它的 k*k* 前缀 prekpre**k 为字符串 s1…ks1…k,k*k* 后缀 sufksuf**k 为字符串 s∣s∣−k+1…∣s∣s∣s∣−k+1…∣s∣,其中 1≤k≤∣s∣1≤k≤∣s∣。 定义 Border(s)Borde****r(s) 为对 阅读全文
posted @ 2021-08-21 18:17 脂环 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Problem Description You are required to put n straight lines on a plane, guaranteeing no three lines share a common point and no lines are coincident. 阅读全文
posted @ 2021-08-20 01:43 脂环 阅读(307) 评论(1) 推荐(1) 编辑
摘要: Problem Description TI10 and ICPC World Finals 2020, which will be held earlier? Take a bet! The International(TI) is the biggest and most prestigious 阅读全文
posted @ 2021-08-18 01:53 脂环 阅读(134) 评论(0) 推荐(1) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/11261/F 来源:牛客网 题目描述 You are now the coordinator for the Nonexistent Old Railway Station! The Nonexistent Old Ra 阅读全文
posted @ 2021-08-17 12:02 脂环 阅读(65) 评论(0) 推荐(1) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 74 下一页