This file contains hidden or 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
{"lastUpload":"2020-03-17T22:59:36.165Z","extensionVersion":"v3.4.3"} |
This file contains hidden or 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
// Run this in the console of that page | |
[...document.querySelectorAll('.p-drama-grid a.c555')].map(a => a.href.split('?')[0]).join(' ') |
This file contains hidden or 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 <sys/types.h> | |
#include <signal.h> | |
#include <stdlib.h> | |
#include <err.h> | |
#include <termios.h> | |
int main(int argc, char *argv[]) | |
{ |
This file contains hidden or 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
uint64_t gcd(uint64_t n1, uint64_t n2) | |
{ | |
while (n2) | |
swap(n1 %= n2, n2); | |
return n1; | |
} |
This file contains hidden or 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
// return (b ^ e) % m | |
uint64_t modexp(uint64_t b, uint64_t e, uint64_t m = 1000000007) { | |
uint64_t r = 1; | |
while (e) { | |
if (e & 1) | |
r = (r * b) % m; | |
b = (b * b) % m; | |
e >>= 1; | |
} | |
return r; |
This file contains hidden or 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
uint64_t modinv_1000000007(uint64_t a) | |
{ | |
a %= 1000000007; | |
uint64_t r = a; | |
a = (a * a) % 1000000007; | |
a = (a * a) % 1000000007; | |
r = (r * a) % 1000000007; | |
a = (a * a) % 1000000007; | |
a = (a * a) % 1000000007; | |
a = (a * a) % 1000000007; |
This file contains hidden or 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
// quicksort | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"sort" | |
"time" | |
) | |
This file contains hidden or 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 <iostream> | |
#include <cstring> | |
#include <functional> | |
#include <chrono> | |
#include <windows.h> | |
#define N 1024 | |
uint64_t TestTime(std::function<void()> f) |
This file contains hidden or 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 <iostream> | |
#pragma pack(4) | |
struct name | |
{ | |
short a; | |
char b; | |
short c; | |
int d; | |
short e; |