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 sys | |
opening = '([{<' | |
closing = ')]}>' | |
values = [3, 57, 1197, 25137] | |
answer1 = 0 | |
scores2 = [] | |
stack = [] | |
while ch := sys.stdin.read(1): |
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 <bits/stdc++.h> | |
using namespace std; | |
#define FOR(i,a,b) for (int i = int(a), _end_##i = int(b); i < _end_##i; ++i) | |
#define REP(i,n) FOR(i,0,n) | |
const int MOD = 998244353; | |
int Solve(int N, const vector<int> &A) { |
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
# Maintainer: Kyle Sferrazza <kyle.sferrazza@gmail.com> | |
# Contributor: Maks Verver <maksverver@geocities.com> | |
# Contributor: p2k <Patrick.Schneider@uni-ulm.de> | |
# Contributor: nokangaroo <nokangaroo@aon.at> | |
pkgname=golly | |
pkgver=4.0 | |
pkgrel=1 | |
pkgdesc="A simulator for Conway's Game of Life and other cellular automata" |
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
SQLite version 3.32.0 (2020-02-03 12:25:18 8130bbb4217bd4a4db1f6bf97115a60bee8b29943bed0c7bdf54bba5edbed8fc) | |
Input: 6600 6f00 6f00 2000 2400 2000 6200 6100 7200 (UTF-16) | |
Expected output: 66 6f 6f 20 24 20 62 61 72 (UTF-8) | |
Actual output: 66 6f 6f 20 24 20 62 61 72 (UTF-8) | |
Expected output: 6600 6f00 6f00 2000 2400 2000 6200 6100 7200 (UTF-16) | |
Actual output: 6600 6f00 6f00 2000 2400 2000 6200 6100 7200 (UTF-16) | |
Test passed. | |
Input: 6600 6f00 6f00 2000 3dd8 a9dc 2000 6200 6100 7200 (UTF-16) |
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
# Maintainer: Dan Beste <drb@wishalloy.io> | |
pkgname='gog-stardew-valley' | |
pkgver=1.4.3.379 | |
pkgrel=1 | |
# Fix upstream versioning shenanigans: | |
epoch=1 | |
pkgdesc="You’ve inherited your grandfather’s old farm plot in Stardew Valley. | |
Armed with hand-me-down tools and a few coins, you set out to begin your new | |
life." |
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 <stdio.h> | |
#include <stdlib.h> | |
static int *scores; | |
static size_t size; | |
static size_t capacity; | |
static int current; | |
void AddScore(int x) { | |
if (size == capacity) { |
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 itertools import islice | |
import sys | |
def Generate(): | |
scores = [3, 7] | |
yield scores[0] | |
yield scores[1] | |
i = 0 | |
j = 1 | |
while True: |
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 <stdio.h> | |
#include <stdlib.h> | |
int Solve(int players, int marbles) { | |
int *scores = calloc(players, sizeof(int)); | |
int *prev = calloc(marbles, sizeof(int)); | |
int *next = calloc(marbles, sizeof(int)); | |
int i = 0; | |
for (int j = 1; j < marbles; ++j) { | |
if (j%23 != 0) { |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sqlite3.h> | |
void insert_utf8(sqlite3 *db, const char *text) { | |
sqlite3_stmt *stmt = NULL; | |
int err = sqlite3_prepare(db, "INSERT INTO tab(col) VALUES (?)", -1, &stmt, NULL); | |
assert(err == SQLITE_OK); |
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
// https://code.google.com/codejam/contest/9234486/dashboard#s=p2&a=2 | |
#include <bits/stdc++.h> | |
using namespace std; | |
namespace { | |
struct Key { | |
char first, last; |