This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 00:0100 Start | |
| 00:0150 _Start | |
| 00:09da Init | |
| 00:0167 DisableLCD | |
| 00:0181 EnableLCD | |
| 00:0a8c ClearVram | |
| 00:3718 FillMemory | |
| 00:0188 ClearSprites | |
| 00:0193 HideSprites | |
| 00:0787 ClearBgMap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # リストlistの置換permによる像を求める | |
| ImageUnderPermutation := function(list, perm) | |
| return List(list, x -> x^perm); | |
| end; | |
| # 置換群groupのある元によってlistが動くならtrueを返す | |
| VarianceUnderSomePerm := function (group, list) | |
| local perm; | |
| for perm in Elements(group) do | |
| if Set(ImageUnderPermutation(list, perm)) <> Set(list) then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "pp" | |
| require "set" | |
| require "prime" | |
| def generator?(p, g) | |
| gg = 1 | |
| (1..p-2).all? do | |
| gg = (gg * g) % p | |
| gg != 1 | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "pp" | |
| require "set" | |
| require "prime" | |
| def generator?(p, g) | |
| gg = 1 | |
| (1..p-2).all? do | |
| gg = (gg * g) % p | |
| gg != 1 | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Run this in https://editor.p5js.org/ | |
| // https://qiita.com/aa_debdeb/items/e416ae8a018692fc07eb | |
| function randomOnSphere() { | |
| const cosTheta = -2.0 * Math.random() + 1.0; | |
| const sinTheta = Math.sqrt(1.0 - cosTheta * cosTheta); | |
| const phi = 2.0 * Math.PI * Math.random(); | |
| return [ | |
| sinTheta * Math.cos(phi), | |
| sinTheta * Math.sin(phi), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function DualizeError() {} | |
| DualizeError.prototype = new Error(); | |
| function parseInequality(str) { | |
| var m = str.match(/^(.+?)(\s*(?:\\leq?|=)\s*)(.+)$/); | |
| if (m) { | |
| return [m[1], m[2], m[3]]; | |
| } else { | |
| throw new DualizeError("cannot parse it"); | |
| } |
OlderNewer