某种编程挑战,例如Suduko [英] Some sort of programming challenge, like Suduko

查看:84
本文介绍了某种编程挑战,例如Suduko的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好,我希望创建一个26x26的网格.以最大规模思考数独.我不想使用数字,而是要使用字母.英文字母更具体.这是挑战.使用字母创建26x26的网格.在任何给定的方块中,最多只能使用一次字母.垂直或水平都不能复制字母.做到这一点本身并不是一个挑战.挑战在于能够创造所有可能性并能够保存每个26x26的正方形.有17576种可能性.

Ok, I am looking to create a 26x26 grid. Think sudoku on the largest scale. Instead of using numbers I want to use letters. The English alphabet more specifically. Here is the challenge. To create a 26x26 grid, using the alphabet. No letter can be used more than once in any given square. No replication of a letter either vertically or horizontally. To do this in and of itself isn''t really a challenge. The challenge is to be able to create all possibilities and be able to save each of the 26x26 squares. There are 17576 possibilities. Any takers?

推荐答案

这是家庭作业,有偿工作还是您对编程挑战的想法?在我看来,这并不难.就像suduko一样,但是以26为底.
Is this homework, paid work, or your thought on a programming challenge ? It doesn''t seem that hard, to me. It''s just like suduko, but base 26.


是什么让您认为只有26种可能的组合就有17576种! (403291461126605635584000000)可以在一行中重新排列26个字母的方法!
What makes you think there are only 17576 possible combinations, when there are 26! (403291461126605635584000000) ways to rearrange the 26 letters of the alphabet in a single line!!


因为大多数组合都不符合标准,这就是挑战.它们必须排成一行,这样您才能有一个完整的字母,并且在每一行和每一列中都没有重复.
Because most of those combinations won''t meet the criteria, that''s the challenge. They have to line up so you have a full alphabet with no repeats in each row and each column.


这篇关于某种编程挑战,例如Suduko的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆