Sobre nós Artigos Blog Multimídia Biblioteca Eventos Loja Virtual Contato
Pelo direito de dirigir alcoolizado por Lew Rockwell, terça-feira, 24 de junho de 2008
var robots = new Array(); | |
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.start = function( ev ){ |
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.clone(); |
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.clone(); |
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.clone(); |
//11512 | |
//GATTACA | |
//Misc;String Matching;Suffix Array;Longest Common Prefix | |
#include <iostream> | |
#include <iomanip> | |
#include <cstring> | |
#include <string> | |
#include <sstream> | |
#include <cmath> | |
#include <set> |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Security.Cryptography; | |
namespace License | |
{ | |
public class LicenseServiceImpl | |
{ |
# monkey patch to have base62 encoding over Integers and Strings | |
class Integer | |
def to_base62() | |
char = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[self%62,1] | |
return char if self < 62 | |
return (self/62).to_base62 + char | |
end | |
end |
ALPHABET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" | |
def base62_encode(num, alphabet=ALPHABET) | |
base = alphabet.size | |
char = ALPHABET[num%base,1] | |
return char if num < base | |
return char + base62_encode(num/base, alphabet) | |
end | |
def base62_decode(string, alphabet=ALPHABET) |
function mod10(numbers) { | |
var M = [2,1]; | |
var result = numbers.split('').reverse().map(function(v, i) { | |
return parseInt(v)*multipliers[i % M.length]; | |
}).reduce(function(a,b){return a+b}); | |
return (10 - result % 10) % 10; | |
} |
Sobre nós Artigos Blog Multimídia Biblioteca Eventos Loja Virtual Contato
Pelo direito de dirigir alcoolizado por Lew Rockwell, terça-feira, 24 de junho de 2008