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 <assert.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
static uint8_t random_data[240]; | |
static size_t random_size = 0; | |
uint8_t GetRandomByte() { |
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
494106250 | |
494112500 | |
494281250 | |
494287500 | |
494456250 | |
494631250 | |
494806250 | |
494975000 | |
494981250 | |
495150000 |
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
# Almost-correct solution | |
from functools import cmp_to_key | |
import sys | |
order = dict() | |
sort_key = cmp_to_key(lambda p, q: order.get((p, q), 0)) | |
for line in sys.stdin: |
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
#!/usr/bin/d8 --single-threaded | |
// d8 defines print() and printErr() which write to stdout and stderr. | |
// In Node.js, we can use console.log() and console.error() for this. | |
const print = globalThis.print || console.log; | |
const printErr = globalThis.printErr || console.error; | |
// Global player initialization | |
let myColor = undefined; | |
let firstMove = undefined; |
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
#!/usr/bin/d8 --single-threaded | |
// Voor Caia: | |
// 'D' voor een deterministische speler | |
// 'R' voor een nondeterministische speler | |
printErr('D', 'voorbeeldspeler'); | |
const mijnKleur = Number(readline()); | |
printErr('Mijn kleur:', mijnKleur); |
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
/** | |
* \file MinimaxCPU.js | |
* | |
* \section LICENSE | |
* | |
* Copyright (C) 2024 Maks Verver | |
* | |
* This file is part of StackAndConquer. | |
* | |
* StackAndConquer is free software: you can redistribute it and/or modify |
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
#!/usr/bin/env python3 | |
import io | |
import libxml2 | |
import xml.sax.xmlreader | |
from drv_libxml2 import LibXml2Reader | |
def parse_binary(): | |
source = xml.sax.xmlreader.InputSource() | |
source.setByteStream(io.BytesIO(b'<?xml version="1.0" encoding="UTF-8"?>\n<root />\n')) |
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
==> Making package: mingw-w64-curl 8.8.0-1 (Sat 22 Jun 2024 10:42:22 PM CEST) | |
==> Checking runtime dependencies... | |
==> Checking buildtime dependencies... | |
==> Retrieving sources... | |
-> Found curl-8.8.0.tar.xz | |
==> Validating source files with sha256sums... | |
curl-8.8.0.tar.xz ... Passed | |
==> Extracting sources... | |
-> Extracting curl-8.8.0.tar.xz with bsdtar | |
==> Starting build()... |
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
import java.util.*; | |
import java.util.stream.Collectors; | |
import com.google.common.collect.SortedMultiset; | |
import com.google.common.collect.TreeMultiset; | |
class Test { | |
static List<Integer> solvePriorityQueue(List<Integer> list, int m) { | |
PriorityQueue<Integer> pq = new PriorityQueue<>(list.subList(0, m)); | |
List<Integer> res = new ArrayList<>(list.size() - m + 1); | |
Integer mth = pq.peek(); |
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
ihgfeiyxhgfvutonkhfedzylkhgklxwvutsrijknxwtspofgjknorsghklopstwxyzutonmlihgcbaghirqptqpvwnokjiihgfdefghijklmabcedcbfghijklmkjihgbcmnqruvwwvutsrnmlkjbcnmlihsrqnmihgfqpcpondeflmpqruvwxyefijlmnopqwvutsrq | |
jklmrsvwijewaspmjigbcexmjifjzyrsfedqonlmyvurqnehilmpqtfijmnqruvefghspbakjefddefzjknosrourqployjkdecuvcdrqponfedfnmdecdehyxnlmnofedlopstyxlkhgnqotuhiedopkjgfepoljcdenojilmcjgknoqrtsrklmghkkbutsrnojkijp | |
hgfnqtumlkdcbrqljihjifwnopedfpqhglkppmjihopklmdcadeyxuedcbawpocdmlirqcpqrdbecopyxlmmnantsutmnxmlcbbtwfestwxygnogolkjigficwvurqpjifkjibcznojifoppsvwgfsrqefghdcjkkbpomlkfkjbihjihponmqponxblscdghlmpighko | |
ijeopponuvynoijkklmkhgvutqbcgonijmnoqlkfgnqjefijbcfzwvjionuvqnmonkjgddodihgfmnqrwvklobmlwvsrqwnefklsrghiuvgfhmphpqfghhkjdihtsqrkhgnmhgdlmpqredcqryzhutpodcaijhimlblnefgghidcbgfeijdlkpqrwvmrqefikjghajkn | |
lkdcbqrstwxmlhgfeonljklmsrtuhimlkaabrsbelmridghksrghmlkhlmtsrklpqonfeenkjedalkjstujqpcjkxdeopvodgjmpqekjliheiljisredjilmefgxypslqpolkfekfedszrstwxnisrqnmlblkgoncbkjdihqrfeijkpohklijonstunopnmjfifcbilm | |
mpqraijsrbajkbacdpn |
NewerOlder