「CF519X」Codeforces Round #294 (Div. 2)

2015年2月28日4,0131

「cf519A」A and B and Chess

模拟

「cf519B」A and B and Compilation Errors

排序,双指针对比

用个hash/map统计下元素出现次数

「cf519C」A and B and Team Training

实际上答案是min(n,m,(m+n)/3)

我分类讨论了TAT

还是很好yy的

「cf519D」A and B and Interesting Substrings

a[i][j]表示前缀和为i,字母j为末尾的前缀数量

每次查询(sum[i]-val[i],ch[i])

a[sum[i]][ch[i]]++

实现要用个map

「cf519E」A and B and Lecture Rooms

倍增找出中点,以中点为根统计各个子树大小,不包含a,b所在子树

分类讨论下,注意x=y的情况

 

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
魔法炮 Recent comment authors
  Subscribe  
提醒
魔法炮

第一题把K当做knight了……还好有人及时Hack