WERTYU UVA - 10082 A common typing error is to place the hands on the keyboard one row to the right of the correct position. So ‘Q’ is typed as ‘W’ an ...
分类:
其他好文 时间:
2019-05-21 12:40:11
阅读次数:
151
题意:有n个点,m条边,边有c种颜色,q次操作。 每个边都有一种颜色。 然后操作有两种,一种是再加一条边,另一种是查询能否从x达到y。 移动的限制是,连着走两步必须是同一种颜色,如果走奇数步,最后一步可以是任意颜色。 例子:1-2-3-4-5-6。 这个题颜色种类很多,我是用map<int,vect ...
分类:
其他好文 时间:
2019-05-20 22:39:15
阅读次数:
154
Broken Keyboard (a.k.a. Beiju Text) UVA - 11988 用stl的链表做的,模拟链表的方法暂时没学会,先给自己挖个坑,以后来填。 注意点: 1.一定要及时更新it的位置it=s.insert(it,ch);,如果写成s.insert(it,ch);,it的位置 ...
分类:
其他好文 时间:
2019-05-19 23:20:13
阅读次数:
125
题意翻译 在一条直线上有n件珠宝,已知每件珠宝的位置,并且第 i 件珠宝在 ti 时刻就消失,问能否将所有的珠宝收集起来?如果能,求出最短时间。搜集能瞬间完成。 dp[i][j][k] 表示把i到j的珠宝全收完的最优解,k==0表示在i点,k==1表示在j点 #include<bits/stdc++ ...
分类:
其他好文 时间:
2019-05-19 15:47:58
阅读次数:
139
File>Setting>Editor>Live Templates 先添加个分组。相关代码段放到一个组里,名字要见名知意3。 然后在创建Live Template. 如下: ...
分类:
其他好文 时间:
2019-05-19 12:22:01
阅读次数:
96
Prime Ring Problem UVA - 524 A ring is composed of n (even number) circles as shown in diagram. Put natural numbers 1,2,...,n into each circle separat ...
分类:
其他好文 时间:
2019-05-19 09:35:21
阅读次数:
103
题意:有n个数编号从0→n-1,两种操作: Q L R:询问编号为L→R-1的数中共有多少种不同的数 M X Y:将编号为X的数改为Y 共有m个操作 题目 链接 : https://vjudge.net/problem/UVA-12345 #include<bits/stdc++.h> #defin ...
分类:
其他好文 时间:
2019-05-19 09:20:40
阅读次数:
108
Fractions Again?! UVA - 10976 It is easy to see that for every fraction in the form 1 k (k > 0), we can always ?nd two positive integers x and y, x ≥ ...
分类:
其他好文 时间:
2019-05-18 21:03:24
阅读次数:
176
Feeding Habits of East African Herbivores Buffalo, zebras, wildebeests, topi, and Thomson’s gazelles live in huge groups that together make up some 90 ...
分类:
其他好文 时间:
2019-05-18 18:52:26
阅读次数:
138
Maximum Product UVA - 11059 Given a sequence of integers S = {S1,S2,...,Sn}, you should determine what is the value of the maximum positive product in ...
分类:
其他好文 时间:
2019-05-18 18:42:57
阅读次数:
148