上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: n-皇后问题是指将 n 个皇后放在 n∗n 的国际象棋棋盘上,使得皇后不能相互攻击到,即任意两个皇后都不能处于同一行、同一列或同一斜线上。 现在给定整数n,请你输出所有的满足条件的棋子摆法。 输入格式 共一行,包含整数n。 输出格式 每个解决方案占n行,每行输出一个长度为n的字符串,用来表示完整的棋 阅读全文
posted @ 2021-02-17 19:55 coderJ_ONE 阅读(84) 评论(0) 推荐(0) 编辑
摘要: The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program t 阅读全文
posted @ 2021-02-17 15:49 coderJ_ONE 阅读(70) 评论(0) 推荐(0) 编辑
摘要: Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which cou 阅读全文
posted @ 2021-02-14 18:19 coderJ_ONE 阅读(47) 评论(0) 推荐(0) 编辑
摘要: One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call between A and B, we say that A and B is re 阅读全文
posted @ 2021-02-14 18:01 coderJ_ONE 阅读(52) 评论(0) 推荐(0) 编辑
摘要: A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years 阅读全文
posted @ 2021-02-14 15:23 coderJ_ONE 阅读(59) 评论(0) 推荐(0) 编辑
摘要: A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each inp 阅读全文
posted @ 2021-02-14 15:19 coderJ_ONE 阅读(46) 评论(0) 推荐(0) 编辑
摘要: As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some ro 阅读全文
posted @ 2021-02-14 15:15 coderJ_ONE 阅读(30) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1: Input: nums = [1,2, 阅读全文
posted @ 2021-02-13 18:13 coderJ_ONE 阅读(50) 评论(0) 推荐(0) 编辑
摘要: Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and ino 阅读全文
posted @ 2021-02-12 23:57 coderJ_ONE 阅读(67) 评论(0) 推荐(0) 编辑
摘要: Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push ( 阅读全文
posted @ 2021-02-12 23:40 coderJ_ONE 阅读(54) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 下一页