传送门
虽然是模拟,但是我们可以用矩阵保存结果,来是其更加简便。
——代码
1 #include <cstdio> 2 #include <iostream> 3 4 int map[5][5] = , 5 , 6 , 7 , 8 }; 9 int n, x, y, ans1, ans2; 10 int a[210], b[210]; 11 12 inline int read() 13 20 21 int main() 22 38 printf("%d %d\n", ans1, ans2); 39 return 0; 40 }View Code
上一篇:[BZOJ3196] [Tyvj1730] 二逼平衡树(线段树 套 Splay)
下一篇:[luoguP2659] 美丽的序列(单调栈)
模拟









