17.(本小题满分12分)
在$\triangle ABC$中,角A,B,C所对的边分别为a,b,c,且满足$c\sin A=a\cos C$.
(I)求角C的大小;
(II)求$\sqrt{3}\sin A-\cos\left(B+\dfrac{\pi}{4}\right)$的最大值,并求取得最大值时角A、B的大小.
参考答案
(1)$\dfrac{\pi}{4}$;(2)最大值为2,此时$A=\dfrac{\pi}{3}$,$B=\dfrac{5\pi}{12}$