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
// ==UserScript== | |
// @name 知乎暗色 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description add theme=dark to uri automaticlly | |
// @author Niltok | |
// @match https://*.zhihu.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=zhihu.com | |
// @grant none | |
// ==/UserScript== |
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
/* 使用方法:在教评页面把侧栏教学班显示从每页15改成每页5000,打开控制台粘贴本段代码,喝杯咖啡,等所有教师评完后点击提交 */ | |
(async () => { | |
let wait = 1000; /* 点击侧栏后的等待时间,单位毫秒,根据网络状况选取 */ | |
let delay = t => new Promise((res, rej) => setTimeout(res, t)); | |
document.querySelectorAll("#tempGrid > tbody > .ui-widget-content")[0].click(); | |
await delay(wait); | |
let list = document.querySelectorAll("#tempGrid > tbody > .ui-widget-content"); | |
for (let i = 1; ; i++) { | |
await delay(wait); | |
//try { |
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; | |
struct node { | |
node *l, *r; | |
int v, s, t = 0; | |
node(int val = 0, int sz = 1, node *ls = NULL, node *rs = NULL): | |
v(val), s(sz), l(ls), r(rs) { } | |
} pool[200000]; |