Skip to content

Instantly share code, notes, and snippets.

View Ryoga-exe's full-sized avatar
💭

Ryoga Ryoga-exe

💭
View GitHub Profile
@Ryoga-exe
Ryoga-exe / RangeSet.cpp
Last active October 23, 2022 18:27
WIP
# include <cstdint>
# include <iostream>
# include <vector>
# include <cassert>
# include <set>
namespace Ryoga_exe
{
using int32 = std::int32_t;
using int64 = std::int64_t;
# include <Siv3D.hpp> // OpenSiv3D v0.6.4
enum class State {
None,
Swapping,
Pivot,
};
class QuickSortVisualizer {
public:
@Ryoga-exe
Ryoga-exe / fetch.gs
Last active July 12, 2022 15:46
国立国会図書館サーチAPIを用いたISBNからの書籍情報取得
function fetchBookData(isbn) {
const url = `https://iss.ndl.go.jp/api/opensearch?isbn=${isbn}`;
const xml = UrlFetchApp.fetch(url).getContentText();
const document = XmlService.parse(xml);
const items = document.getRootElement().getChildren('channel')[0].getChildren('item');
if (items.length == 0) {
return;
}
else {
const item = items[0];
inline unsigned int randxor() {
static unsigned int x=123456789,y=362436069,z=521288629,w=88675123;
unsigned int t;
t=(x^(x<<11));x=y;y=z;z=w; return( w=(w^(w>>19))^(t^(t>>8)) );
}