Skip to content

Instantly share code, notes, and snippets.

View Wizmann's full-sized avatar
⚙️
不好好学习,只能。。。

Wizmann Wizmann

⚙️
不好好学习,只能。。。
View GitHub Profile
import sys
import random
from random import randint
INF = 10 ** 10
P1 = 860939810732536850
P2 = 937467793908762347

README


How to use

Paste the js code to Tampermonkey(Chrome) or Greasemonkey(Firefox). Paste the css code to Stylish, and set the matching url pattern as "https://workflowy.com/".

Open a new workflowy page, it works!

@Wizmann
Wizmann / workflowy-with-image.js
Last active June 14, 2023 13:29
workflowy-with-image.js
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://workflowy.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
#include "KVTree.hpp"
void TreeIterator::next() {
return;
}
bool TreeIterator::has_next() {
while (!_stack.empty() || _cur) {
if (_cur == nullptr) {
_cur = _stack.top();
@Wizmann
Wizmann / longest_suffix_match.md
Last active August 29, 2015 14:16
longest_suffix_match.md

最长后辍匹配 Max suffix match

Description

最长后辍匹配指的是在一个单词中,一个任意非后辍的子串与后辍的最长匹配。

如单词banana,其最长后辍匹配为:b"ana"na和ban"ana"。(引号内的部分即为匹配的部分)

所以,MaxSuffixMatch("banana") = 3

@Wizmann
Wizmann / continental divider.cc
Created February 22, 2015 03:32
continental divider.cc
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define input(x) cin >> x
@Wizmann
Wizmann / gist:35ebc4da3b8c074a0fb3
Created December 13, 2014 07:59
simple_lexer.cc
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <unordered_map>
using namespace std;
print 'Hello World!'
@Wizmann
Wizmann / comma_matrix.cc
Last active August 29, 2015 14:01
comma_matrix.cc
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define print(x) do {cout << x << endl;} while(0)
#define input(x) do {cin >> x;} while(0)
@Wizmann
Wizmann / 4834.cc
Created May 25, 2014 11:55
HDU 4834 - JZP Set
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
#define print(x) cout << x << endl