glasses专题

UVA - 10334 Ray Through Glasses

题意:在n次的反射后一共有几条线,这里解释的很好点击打开链接 #include <iostream>#include <cstdio>#include <cstring>#include <cmath>using namespace std;const int MAXN = 1005;int n,f[MAXN][MAXN];void init(){f[1][0] = 1;f[

uva 10334 - Ray Through Glasses(斐波那契数)

题目链接:uva 10334 - Ray Through Glasses 题目大意:在2块玻璃中反射k次的光线条数。 解题思路:斐波那契数列。(大数) #include <stdio.h>#include <string.h>#include <iostream>using namespace std;const int N = 1005;struct bign

uva 10334 Ray Through Glasses

原题: Suppose we put two panes of glass back-to-back. How many ways a n are there for light rays to pass through or be reflected after changing direction n times? Following figure shows the situations