[tex](x+y)^n = C_{n}^0x^ny^0+C_{n}^1x^{n-1}y^1+...+C_{n}^{n}x^0y^n\\ \\S = C_{10}^0+3C_{10}^1+3^2C_{10}^2+...+3^{10}C_{10}^{10}\\ \\(1+3)^{10} = C_{10}^0\cdot 1^{10}\cdot 3^{0}+C_{10}^1\cdot 1^{9}\cdot 3^{1}+...+C_{10}^{10}\cdot 1^0\cdot 3^{10}\\ \\ \Rightarrow 4^{10} = C_{10}^0+3C_{10}^1+3^2C_{10}^2+...+3^{10}C_{10}^{10}\\ \\ \Rightarrow S = 4^{10} \Rightarrow \boxed{S = 2^{20}}[/tex]