I hereby claim:
- I am ekzhang on github.
- I am ekzhang (https://keybase.io/ekzhang) on keybase.
- I have a public key whose fingerprint is 5216 7129 355E EA04 54F6 9A63 4E1F 0DCD FFFD 28DD
To claim this, I am signing this object:
#include <bits/stdc++.h> | |
using namespace std; | |
typedef pair<int, int> pii; | |
typedef pair<pii, int> state; // ((x y) o) | |
typedef pair<int, state> tstate; | |
#define MAXN 1005 | |
#define MAXM 1005 | |
#define INF 1<<30 | |
int N, M; |
#include <bits/stdc++.h> | |
using namespace std; | |
#define MAX_N 30000 | |
int N, M; | |
int word[MAX_N]; | |
int fenwick_sum[MAX_N + 1]; | |
int fenwick_min[MAX_N + 1]; | |
int word_sum; |
function hashCode(e){var s,a,t,o=0;if(0===e.length)return o;for(s=0,t=e.length;t>s;s++)a=e.charCodeAt(s),o=(o<<5)-o+a,o|=0;return o}var players="",playing=!1,night=!1,dead=!1,my_name=$("div.message-wrapper.is-me")[0].children[0].innerHTML.trim().slice(0,-1),god="eygmath",voted=!1,_send=Classroom.send,new_send=function(e){e.message.toLowerCase().startsWith("->join")&&(e.message="->join|"+hashCode(my_name+"_join")),_send(e)},_onPluginMessage=Classroom.socket.onPluginMessage,newmsg=function(e){var s=e.message;if(my_name=my_name.toLowerCase(),"undefined"!=typeof e.message&&0===e.message.indexOf("->")){if(e.message=e.message.substring(5),e.speaker===god)if(e.message.toLowerCase().startsWith("players"))-1!==e.message.toLowerCase().indexOf(my_name)&&(playing=!0,players=e.message.substring(8));else if(e.message.toLowerCase().startsWith("end"))playing=!1,dead=!1;else if(e.message.toLowerCase().startsWith("toggle")){if(night=!night,voted=!1,night&&!dead){for(var a=prompt("Who would you like to target?");-1===p |
'use strict'; | |
var ROOM_ID = prompt('What Room ID to use?'); | |
var playing = false; | |
var cqueue = []; | |
var mqueue = []; | |
var votes = {}; | |
var players = new Set([]); | |
var joinInterval; | |
var prevMsg = ''; |
I hereby claim:
To claim this, I am signing this object:
{ | |
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}", "-std=c++0x", "-O2"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "source.c, source.c++, source.cpp", | |
"variants": | |
[ | |
{ | |
"name": "Run", |
#include <bits/stdc++.h> | |
using namespace std; | |
/* Minimum-Cost, Maximum-Flow solver using Successive Shortest Paths with Dijkstra and SPFA-SLF. | |
* Requirements: | |
* - No duplicate or antiparallel edges with different costs. | |
* - No negative cycles. | |
* Time Complexity: O(Ef lg V) average-case, O(VE + Ef lg V) worst-case. | |
*/ | |
template<int V, class T=long long> |
#include <bits/stdc++.h> | |
using namespace std; | |
/* Maximum-Flow solver using Dinic's Blocking Flow Algorithm. | |
* Time Complexity: | |
* - O(V^2 E) for general graphs, but in practice ~O(E^1.5) | |
* - O(V^(1/2) E) for bipartite matching | |
* - O(min(V^(2/3), E^(1/2)) E) for unit capacity graphs | |
*/ | |
template<int V, class T=long long> |
#include <bits/stdc++.h> | |
using namespace std; | |
#define MAXN 100013 | |
#define MAXW 262144 | |
int N, M, K; | |
int A[MAXN]; | |
int nums[MAXN]; | |
vector<int> wt[MAXW]; |
#include <bits/stdc++.h> | |
using namespace std; | |
/** | |
* 2D, dynamic range tree based on GNU policy-based data structures. | |
* Allows for fast, O(lg^2 N) range queries and updates, using O(N lg N) memory. | |
* The first dimension must be in the interval [0..sx] passed into the constructor, | |
* while the second dimension can be anything. Update adds a point at (x, y), | |
* while Query finds the number of unique points with coordinates (x' <= x, y' <= y). | |
*/ |