
Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
History is littered with hundreds of conflicts over the future of a community, group, location or business that were "resolved" when one of the parties stepped ahead and destroyed what was there. With the original point of contention destroyed, the debates would fall to the wayside. Archive Team believes that by duplicated condemned data, the conversation and debate can continue, as well as the richness and insight gained by keeping the materials. Our projects have ranged in size from a single volunteer downloading the data to a small-but-critical site, to over 100 volunteers stepping forward to acquire terabytes of user-created data to save for future generations.
The main site for Archive Team is at archiveteam.org and contains up to the date information on various projects, manifestos, plans and walkthroughs.
This collection contains the output of many Archive Team projects, both ongoing and completed. Thanks to the generous providing of disk space by the Internet Archive, multi-terabyte datasets can be made available, as well as in use by the Wayback Machine, providing a path back to lost websites and work.
Our collection has grown to the point of having sub-collections for the type of data we acquire. If you are seeking to browse the contents of these collections, the Wayback Machine is the best first stop. Otherwise, you are free to dig into the stacks to see what you may find.
The Archive Team Panic Downloads are full pulldowns of currently extant websites, meant to serve as emergency backups for needed sites that are in danger of closing, or which will be missed dearly if suddenly lost due to hard drive crashes or server failures.
A 3 x 3 magic square is a 3 x 3 grid filled with distinct numbers from 1 to 9 such that each row, column, and both diagonals all have the same sum.
Given an
grid
of integers, how many 3 x 3 "magic square" subgrids are there? (Each subgrid is contiguous).Example 1:
Note:
1 <= grid.length <= 10
1 <= grid[0].length <= 10
0 <= grid[i][j] <= 15
这道题定义了一种神奇正方形,是一个3x3大小,且由1到9中到数字组成,各行各列即对角线和都必须相等。那么其实这个神奇正方形的各行各列及对角线之和就已经被限定了,必须是15才行,而且最中间的位置必须是5,否则根本无法组成满足要求的正方形。博主也没想出啥特别巧妙的方法,就老老实实的遍历所有的3x3大小的正方形呗,我们写一个子函数来检测各行各列及对角线的和是否为15,在调用子函数之前,先检测一下中间的数字是否为5,是的话再进入子函数。在子函数中,先验证下该正方形中的数字是否只有1到9中的数字,且不能由重复出现,使用一个一维数组来标记出现过的数字,若当前数字已经出现了,直接返回true。之后便是一次计算各行各列及对角线之和是否为15了,若全部为15,则返回true,参见代码如下:
参考资料:
https://leetcode.com/problems/magic-squares-in-grid/
LeetCode All in One 题目讲解汇总(持续更新中...)
The text was updated successfully, but these errors were encountered: