SP11470 TTM - To the moon C l r d:区间 \([L,R]\) 中的数都加 d ,同时当前的时间戳加 1. Q l r:查询当前时间戳区间 \([L,R]\) 中所有数的和 . H l r t:查询时间戳 \(t\) 区间 \([L,R]\) 的和 . B t:将当前时间戳置为 \(t\) 每次记下版本 \(times\) 保留标记-每次标记的时候直接加上\(tag_p\) 即可 #include <bits/stdc++.h> #define ls(x) ch[…
ToLower()用于将字符串变为小写,注意字符串的不可变特性,需要重新赋值给另一个字符串变量. s = s.ToLower();//字符串具有不可变性,转换后需要重新赋值,不可仅有s.ToLower(); 这可以使用户的输入不区分大小写,例如验证码. ToUpper()用于将字符串全部变为大写,与上面类似. Trim()可以用于去掉两边的空格. string s1 = " a b c "; s1 = s1.Trim();//用于去除字符串两边的空格 Console.WriteLine…
DQUERY - D-query #sorting #tree English Vietnamese Given a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), you have to return the number of distinct elements in the…
一.题目 COT - Count on a tree You are given a tree with N nodes. The tree nodes are numbered from 1 to N. Each node has an integer weight. We will ask you to perform the following operation: u v k : ask for the kth minimum weight on the path from node u…
Problem Description Background To The Moon is a independent game released in November 2011, it is a role-playing adventure game powered by RPG Maker. The premise of To The Moon is based around a technology that allows us to permanently reconstruct th…