1
Name:
Anonymous
2013-01-07 12:41
THE CHALLENGE:
Implement ``Tohosort'' (
http://www.freewebs.com/tohosort/ )
66 in Lisp99 in your programming language of choice.
Post the source code of your implementation. It should
at least read the input from stdin and print a sorted list after making the comparisons.
Deadline :
2013-01-21 00:00.
The programs will be judged by elegance, speed and number of comparisons made using a random list that will be published the day of the deadline. The winner will be awarded with
Ten (10) שקליםSuss (that's Suss-shekels for you goyim) , which is enough to pay the fee needed to cross the Sanzu River by ferry.
64
Name:
Anonymous
2013-01-17 14:20
Splitting into four posts since it was too large and I don't know the max post length.
#include <ctype.h>
#include <locale.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#define PC98 0xf8000000
#define HRtP 0x80000000
#define STG 0x7fff0000
#define PC98_STG 0x78000000
#define SoEW 0x40000000
#define LLS 0x20000000
#define MS 0x10000000
#define PHANTASMAGORIA 0x0c000000
#define PoDD 0x08000000
#define WINDOWS 0x07fff000
#define WINDOWS_STG 0x07ff0000
#define PoFV 0x04000000
#define EoSD 0x02000000
#define PCB 0x01000000
#define IN 0x00800000
#define MoF 0x00400000
#define SA 0x00200000
#define UFO 0x00100000
#define FW 0x00080000
#define TD 0x00040000
#define AYA_GAMES 0x00030000
#define StB 0x00020000
#define DS 0x00010000
#define FIGHTER 0x0000f000
#define IaMP 0x00008000
#define SWR 0x00004000
#define SOKU 0x00002000
#define HM 0X00001000
#define MUSIC 0x00000e00
#define ZUN_MUSIC_COL 0x00000c00
#define DiPP 0x00000800
#define GFC 0x00000400
#define AUS 0x00000200
#define PRINT_WORKS 0x000001ff
#define COMICS 0x000001f4
#define KOURINDOU 0x00000100
#define MOON_WORKS 0x00000080
#define FAIRY_WORKS 0x00000040
#define WaHH 0x00000020
#define FS 0x00000010
#define LORE 0x0000000f
#define BAiJR 0x00000008
#define PMiSS 0x00000004
#define GoM 0x00000002
#define SoPM 0x00000001
#define REIMU 0xfffdfbff
#define MARI 0x7ffdfbff
#define PATCHY 0x07a2f0fe
#define REMI 0x07c2d0df
#define AYA 0x046b41ef
#define YUKARI 0x01a2d1fe
#define PADS 0x0782f0de
#define YUYU 0x0586c0ef
#define YOUMU 0x0586c1cf
#define ALICE 0x11a260fe
#define CIRNO 0x070a20ef
#define SUIKA 0x0023c0fe
#define RAN 0x0182d0de
#define CHEN RAN
#define SUWAKO 0x007120e3
#define KANAKO SUWAKO
#define SANAE 0x007520a3
#define NITORI 0x006100f3
#define FLANDRE 0x028200de
#define TEI 0x048200de
#define HONG 0x0202a0ce
#define EIRIN 0x048240ce
#define UDONGE EIRIN
#define KOMACHI 0x040240f6
#define LUNA 0x000811fc
#define MYSTIA 0x048000e7
#define NAZRIN 0x00111073
#define OKUU 0x00312063
#define NUE 0x00151071
#define STAR 0x000811dc
#define SUNNY STAR
#define LILY 0x050c10c4
#define AKI 0x004100d3
#define HINA AKI
#define KUMOI 0x00911071
#define KEINE 0x008200ce
#define WRIGGLE KEINE
#define MOKOU KEINE
#define KAGUYA KEINE
#define LETTY 0x010200ce
#define RUMIA 0x020200ce
#define PRISM 0x0500108e
#define YUUKA 0x3c0008c4
#define KISUME 0x00210053
#define TENSHI 0x00014063
#define YUUGI 0x00210063
#define PARSEE YUUGI
#define KOMEIJI YUUGI
#define MURASA 0x00111061
#define KOGASA 0x00150061
#define YAMA 0x040200c6
#define MIMA 0xd8000a00
#define ORIN 0x00210043
#define YAMAME ORIN
#define SHOU 0x00110061
#define MOMIJI 0x00410061
#define UNZAN 0x00111041
#define MEDI 0x04020086
#define IKU 0x00014003
#define SEIGA 0x00040031
#define YOSHIKA SEIGA
#define MAMIZOU SEIGA
#define HATATE 0x00010061
#define HIJIRI 0x00110041
#define GENJI PC98_STG
#define SHANGHAI 0x01008000
#define AKYU 0x00000205
#define FUTO 0x00040011
#define KYOUKO 0x00040021
#define RINNOSUKE 0x0000010c
#define DAICHAN 0x02080040
#define MIKO 0x00040001
#define TOJIKO MIKO
#define KASEN 0x00000060
#define KOA 0x02000040
#define HOURAI 0x0180c000
#define AYA_CROW 0x08004000
#define EVIL_EYE 0x60000000
#define FAIRY_MAID 0x020011c0
#define BAKEBAKE 0x78000040
#define HAIRBALL 0x03c00000
#define ZOMBIE_FAIRY 0x00210002
#define SUNFLOWER_FAIRY 0x04780000
typedef struct th th;
struct th {
unsigned char _;
#define UNKNOWN 0x01
const uint32_t app;
const char *const name;
th *tie;
th *win;
th *pre;
};
typedef struct {
th *btm;
th *top;
} thls;
#define _2HU(x,y) {0,x,y}
#define NHU(x,y) _2HU(x,"Nameless "y)
#define UHU(x,y) _2HU(x,"Unnamed "y)
#define NM(x,y) NHU(x,"Midboss "y)
#define PHU(x) _2HU(PRISM,x" Prismriver")
#define KHU(x) _2HU(KOMEIJI,x" Komeiji")
#define MHU(x) _2HU(MOON_WORKS,x)
#define WHU(x) MHU("Watatsuki no "x)
#define _PoDD(x) _2HU(PoDD,x)
#define _MS(x) _2HU(MS,x)
#define _LLS(x) _2HU(LLS,x)
#define _SoEW(x) _2HU(SoEW,x)
#define _HRtP(x) _2HU(HRtP,x)
#define _GFC(x) _2HU(GFC,x)
#define _AKI(x) _2HU(AKI,x" Aki")