Skip to content

Instantly share code, notes, and snippets.

#[derive(Debug, Clone, Copy)]
enum Token {
Num(i64),
Add,
Sub,
Mul,
Div,
}
enum AST {
@MikuroXina
MikuroXina / TicTacToe.cpp
Created March 24, 2020 10:48
MVCD で三目並べ
#include <optional>
class Stone {
public:
// クラスの中にクラス定義
class Pos {
int _x, _y;
Pos(int x, int y) : _x(x), _y(y) {}
@MikuroXina
MikuroXina / sustainPlusPlus.java
Last active March 31, 2025 09:03 — forked from sam830917/Mili_sustainPlusPlus.java
Mili - sustain++; / Ghost In The Shell: SAC_2045 Ending Theme
package extraLarge;
/**
* The goal of this program is to obtain a HEALTHY
* and SUSTAINABLE relationship, darling.
*
* @author Cassie Wei from Mili
*/
public class sustainPlusPlus {
public static void main(String[] args) {
fn make_counter<T, Identity>(init: T, step: Identity) -> impl FnMut() -> T
where
Identity: Clone,
T: std::ops::AddAssign<Identity> + Clone,
{
let mut counter = init;
move || {
let to_return = counter.clone();
counter += step.clone();
to_return
@MikuroXina
MikuroXina / glyph.hpp
Last active September 25, 2020 00:40
M+ Bitmap Font 12x12 glyphs, Katakana-only
// katakana glyph header
// Copyright (c) MikuroXina
// SPDX-License-Identifier: Apache-2.0
#ifndef GLYPH_HPP
#define GLYPH_HPP
/**
* Glyph represents Katakana as a 12x12 bitmap.
@MikuroXina
MikuroXina / cherry-petals.css
Last active October 11, 2020 16:17
My theme for Marp
/* @theme cherry-petals */
@import 'default';
:root {
background: linear-gradient(#0a0d0a, #1a1d1a);
color: #eee;
font-family: serif;
text-align: center;
}

Keybase proof

I hereby claim:

  • I am MikuroXina on github.
  • I am mikuroxina (https://keybase.io/mikuroxina) on keybase.
  • I have a public key whose fingerprint is E170 81C5 C39A 2B37 A8D6 E385 0805 526B 773D 510B

To claim this, I am signing this object:

@MikuroXina
MikuroXina / abc_167.rs
Last active December 12, 2020 17:31
The notebook of doubling.
use proconio::input;
fn main() {
input! {
n: usize,
k: u64,
a: [usize; n],
}
let result = solve(n, &a, k);
@MikuroXina
MikuroXina / dft.c
Last active December 5, 2021 11:32
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
double const PI_2 = 6.28318530718;
float calc_time(unsigned idx, unsigned len) {
return 2.0 * idx / len - 1;
}
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
using Point = std::pair<double, double>;
using Target = std::function<double(Point)>;
struct Solver {
std::function<double(Point, double)> method;