This file contains 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
This has been replaced by https://dustapi.readthedocs.io/ |
This file contains 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
#include <iostream> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <vector> | |
#include <map> | |
#include <cstring> | |
#include <algorithm> | |
#include <set> | |
#include <fstream> | |
#include <sstream> |
This file contains 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
template<class T> struct splnode { | |
typedef splnode<T> node_t; | |
splnode() : P(NULL) { | |
C[0] = C[1] = NULL; | |
pull(); | |
} | |
/* Add extra state here. */ |
This file contains 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
from dustmaker import * | |
import sys | |
import math | |
import os.path | |
import glob | |
for fname in glob.glob("/home/msg555/Dustforce/content/levels2_orig/*"): | |
with open(fname, "rb") as f: | |
map = read_map(f.read()) |
This file contains 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
ah_ = attack heavy | |
al_ = attack light | |
_f = front | |
_u = up | |
_b = back | |
_ah = aerial front | |
_au = aerial up | |
_ad = aerial down | |
_of = offset relative to bottom center of character |
This file contains 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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <map> | |
#include <cstring> | |
using namespace std; | |
#define MAXN 1010 |
This file contains 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
<?php | |
/* Create an array and populate some values. */ | |
$arr = array(); | |
for ($i = 0; $i < 100000; $i++) { | |
$arr[$i] = $i; | |
} | |
$foo = &$arr; // comment out me | |
for ($i = 0; $i < 100000; $i++) { | |
$bar = $arr; // or comment out me |
This file contains 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
Apple+Any% on dustkid.com | |
Rules | |
* This is NG+ (all levels are unlocked already) | |
* You must start on downhill and may not use tomes. | |
* You must hit every apple in the stage: the apple counts are listed below. You may use a super to hit an apple. | |
* You only need to complete stages with apples. | |
* You must complete the stage after hitting all apples. | |
* You may die/and or deathwarp. It doesn't matter if you die immediately after hitting an apple. | |
* You may enable/disable checkpoints at will (though all levels are possible with checkpoints always on). |
This file contains 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
/* Correct answer is "OK". Most solutions incorrectly identify | |
* (4, 5) as a deadlock despite it not being reachable. | |
*/ | |
int NumberOfOperations(long long i) { | |
return 8; | |
} | |
int GetOperation(long long i, long long index) { | |
int op1[] = {1, 2, -2, 3, 2, -2, -1, -3}; |
This file contains 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
#!/bin/sh | |
DIR="/home/msg555/Dustforce" | |
BIN="$DIR/Dustforce.bin.x86_64" | |
BINESC=$(echo "$BIN" | sed -e 's/[]\/$*.^|[]/\\&/g') | |
if ps aux | grep "$BINESC" > /dev/null; then | |
/bin/echo -en '\xe1\x0d\x00\x00'"$@"'\x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' | head -c 256 > "$DIR/IPC.sock" | |
else | |
"$BIN" $@ | |
fi |