汽水瓶 Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:65536KBTotal submit users: 110, Accepted users: 110Problem 10930 : No special judgementProblem description 有这样一道智力题:“某商店规定:三个空汽水瓶可以换一瓶
链接 https://ac.nowcoder.com/acm/problem/214395 Bobo has n strings s1, … , sn, and he would like to find the number of pairs i < j where si + sj = sj + si. Note that a + b means the concatenation of th
题目描述 You are a fan of "Internet of Things"(IoT, 物联网), so you build a nice Internet of Lights and Switches in your huge mansion. Formally, there are n lights and m switches, each switch controls one
双向链表练习题 Bobo 有 n n n 个列表 L 1 , L 2 , … , L n L_1, L_2, \dots, L_n L1,L2,…,Ln. 初始时, L i L_i Li 仅包含元素 i i i, 即 L i = [ i ] L_i = [i] Li=[i]. 他依次执行了 m m m 次操作。第 i i i 次操作由两个整数 a i , b i a_i,
全 1 子矩阵 Bobo 写了一个 n n n 行 m m m 列的矩阵 A i , j A_{i, j} Ai,j. 首先,他把所有元素 A i , j A_{i, j} Ai,j ( 1 ≤ i ≤ n , 1 ≤ j ≤ m 1 \leq i \leq n, 1 \leq j \leq m 1≤i≤n,1≤j≤m) 设为 0. 然后,他选了 4 4 4 个整数 x 1 ,
思路: 串的最后加上i以后,实际上加上了 n + 1 n+1 n+1个串,我们要减去重复的子串个数。 假设串加上 i i i后,对于长度为 m i d mid mid的后缀发生重复,那么对于长度为 1... m i d − 1 1...mid-1 1...mid−1的后缀也会发生重复,所以要判断有 m i d mid mid个重复子串,实际就是判断新串长度为 m i d mid mid的后缀和
思路: 之前听学长讲的思路是用 b i t s e t bitset bitset优化暴力写,对于每一行的大小关系依次确定(第 i i i行大于第 i − 1 i-1 i−1行)。 也就是对于已经选择的列,确定了前 i i i行大小关系了,那就继续遍历剩下的列,使得能确定第 i + 1 i+1 i+1行关系(或者更多),前提是不会破坏后面的大小关系。用 b i t s e t bitset b
单选题 1、甲、乙两公司签订了一份买卖合同,在合同履行期间两公司合并,该买卖合同因此终止。此种合同终止的方式是(C)。 A. 免除 B. 抵销 C. 混同 D. 提存 2、根据《民法通则》的规定,企业法人的住所为(D)。 A.主要财产所在地 B.法定代表人住所地 C.经营场所所在地 D.主要办事机构所在地 3、 根据我国《合同法》的规定,下列不属于承租人的义务的是(