首页 > TAG信息列表 > 779

2022.3.28# Codeforces Round #779 (Div. 2) A.Marin and Photoshoot

2022-03-28 两个0之间至少有2个1,所以判断两个0之间的间隔,也就是1的数量,如果少于2那就sum++; 1 #include<iostream> 2 #include<vector> 3 #include<string> 4 #include<unordered_map> 5 #include<algorithm> 6 #include<cmath> 7 #define maxn 100010 8 #de

779. K-th Symbol in Grammar. Sol

这个题目是没有官方Sol的。用循环是不可以解出的(Memory or Time exceeded),罕见的必须要用递归的题目,而且递归的写法也很优雅 We build a table of n rows (1-indexed). We start by writing 0 in the 1st row. Now in every subsequent row, we look at the previous row