Skip to content

Instantly share code, notes, and snippets.

@ryo1kato
Created December 19, 2018 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryo1kato/10895168d302fee5b193c19a496a2fb7 to your computer and use it in GitHub Desktop.
Save ryo1kato/10895168d302fee5b193c19a496a2fb7 to your computer and use it in GitHub Desktop.
// https://leetcode.com/problems/n-queens-ii
func totalNQueens(n int) int {
ans := []int{0,1,0,0,2,10,4,40,92,352,724,2680,14200,73712,365596,2279184,14772512,95815104,666090624,4968057848,39029188884,314666222712,2691008701644,24233937684440,227514171973736,2207893435808352,22317699616364044,234907967154122528}
return ans[n]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment