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
// The text to decipher. It was created using a substitution cipher | |
var text = """ | |
Fxr nb, ekb dmrdxjb xf upfb pj, ie ubije direuo, ex kizb txo. | |
Drxlrinnbrj xfeby fbbu txo akby ekbo qiy qxyqbyerieb xy ekb qrbiepzb | |
jpwb xf drxlrinnpyl, Jx Rmho pj wbjplybw ex nigb drxlrinnbrj kiddo. | |
Rmho pykbrpebw ekb Dbru dkpuxjxdko xf kizpyl nxrb ekiy xyb aio | |
ex wx ekb jinb ekpyl. P pykbrpebw ekie dkpuxjxdko frxn Uirro Aiuu, | |
akx pj no kbrx iqemiuuo. P aiye ex nigb Rmho mjbrj frbb. P aiye ex | |
lpzb ekbn ekb frbbwxn ex qkxxjb. Dbxdub irb wpffbrbye. Dbxdub qkxxjb | |
wpffbrbye qrpebrpi. Hme pf ekbrb pj i hbeebr aio inxyl niyo |
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
// The text to decipher. It was created using a substitution cipher | |
var text = [[ | |
Uid nx, aex jcdjipx iu wzux zp, ta wxtpa jtdaws, ai etkx vis. | |
Dcos zyexdzaxr aex Jxdw jezwipijes iu etkzyg nidx aety iyx hts | |
ai ri aex ptnx aezyg. Z zyexdzaxr aeta jezwipijes udin Wtdds Htww, | |
hei zp ns exdi tqactwws. Z htya ai ntfx Dcos cpxdp udxx. Z htya ai | |
gzkx aexn aex udxxrin ai qeiipx. Jxijwx tdx rzuuxdxya. Jxijwx qeiipx | |
rzuuxdxya qdzaxdzt. Oca zu aexdx zp t oxaaxd hts tniyg ntys | |
twaxdytazkxp, Z htya ai xyqicdtgx aeta hts os ntfzyg za qinuidatowx. |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Euler 393</title> | |
</head> | |
<body> | |
<div style="text-align: center;"> | |
<canvas height="902" id="canvas" width="660"></canvas></div> |
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
var count // number of final positions | |
var N // total cells in the board | |
var n // grid partition | |
function dfs(now, next) { | |
for (var k = 0; k < N; k += 1) { | |
// Find an ant to move. | |
if (now[k] > 0) { | |
// Try to move it to the right. | |
if ((k % n < n - 1) && (next[k + 1] == 0) |
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
//--------------------------------------------------------------- | |
// Mandel.c | |
//--------------------------------------------------------------- | |
// Fractal de Mandelbrot - Esau R.O | |
//--------------------------------------------------------------- | |
#include "mandel.h" | |
#include "graficos.h" | |
extern double gf_x1; |
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
public function solve():void { | |
txtResult.text = ""; | |
// Create array of permutations of students. | |
var p:Array = permutations(students.split("")); | |
// Check every possibility. | |
for (var k:int = 0; k <= p.length; ++k) { | |
var s1:int = singleCorrectPredictions(p[k], guess1.split("")) | |
var d1:int = doubleConsecutivePredictions(p[k], guess1.split("")) | |
var s2:int = singleCorrectPredictions(p[k], guess2.split("")) | |
var d2:int = doubleConsecutivePredictions(p[k], guess2.split("")) |
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
def permutations(array) | |
n = array.length | |
return [array] if n < 2 | |
rt = Array.new | |
for i in 0...n | |
## Create a new array from [array] where the | |
## [i]-th term has been ignored. | |
t = Array.new(array) | |
t.delete_at(i) |
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
public function solve():void { | |
txtResult.text = ""; | |
var k:int = 1; | |
var k_up:int = 10; // Minimum (10^p) greater that k. | |
while (true) { | |
var n:int = (10 * k) + 6; | |
var m:int = (6 * k_up) + k; | |
// Check | |
if (m == 4 * n) { | |
txtResult.text += "ANSWER: " + n; |
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
public function solve():void { | |
txtResult.text = ""; | |
var count:int = 1; | |
var k:int = 10; | |
while (k * 11 < 1000) { | |
// Calculate sum of the squares of the digits | |
var sumSquares:int = 0; | |
var n:int = k * 11; | |
while (n > 0) { | |
var digit:int = n % 10; |
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
@echo off | |
SET count=1 | |
#FOR /f "tokens=*" %%G IN ('dir /B /A-D') DO ( | |
FOR /f "tokens=*" %%G IN ('dir *.as /B') DO ( | |
call :move_svn %%G target_dir | |
) | |
GOTO :eof | |
:move_svn | |
echo %count%: %1 %2 |