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; | |
inline const char* tf(bool b){ | |
return ((b) ? "true" : "false"); | |
} | |
int main() | |
{ |
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
// User Script for displaying Ranks | |
'use strict'; | |
const MAP_ULEVEL = { | |
'user': '[', | |
'setter': '[S/', | |
'admin': '[A/' | |
}; |
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> | |
#include <ext/pb_ds/assoc_container.hpp> | |
#include <ext/pb_ds/tree_policy.hpp> | |
#include <ext/pb_ds/priority_queue.hpp> | |
using namespace std;using namespace std::placeholders;using namespace __gnu_pbds; | |
#define pb push_back | |
#define eb emplace_back | |
#define mp make_pair | |
#define f first | |
#define s second |
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
import heapq | |
class PriorityQueue: | |
def __init__(self, key=None, heap=[]): | |
self.key = key | |
self.heap = heapq.heapify(heap) if heap else [] | |
def __bool__(self): return bool(self.heap) | |
def __len__(self): return len(self.heap) | |
def __iter__(self): | |
if self.key: return map(lambda x: x[1], self.heap) | |
else: return iter(self.heap) |
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
class BIT: | |
def __init__(self, leng): | |
self.length = leng | |
self.tree = [0] * (leng + 1) | |
self.arr = [0] * (leng + 1) | |
self.max_bit = 1 | |
while self.max_bit <= self.length: self.max_bit <<= 1 | |
def sum(self, x): | |
ttl = 0 |
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
import urllib.request as request | |
import json | |
import tkinter | |
from collections import namedtuple | |
from bisect import bisect | |
# This is the code of the contest you want to check | |
# Change this constant if you want to see the changes from a different contest. | |
# Note that there is a lack of info on many earlier contests so it's best to try | |
# on a currently running one. |
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
//============================================================================ | |
// Name : BinarySearchTreeTest.cpp | |
// Author : Daxi the Taxi | |
// Version : | |
// Copyright : ALL YOUR CODE IS BELONG TO US | |
// Description : Hello World in C++, Ansi-style | |
//============================================================================ | |
#include <bits/stdc++.h> |
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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.LinkedList; | |
import java.util.StringTokenizer; | |
public class Main { | |
public static void main(String[] args) throws IOException{ |
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
from random import choice, sample, randint | |
suj = ['Je', 'Tu', 'Il', 'Elle', 'Nous', 'Vous', 'Ils', 'Elles', 'On'] | |
ends = ['ais', 'ais', 'ait', 'ait', 'ions', 'iez', 'aient', 'aient', 'ait'] | |
vb = ['aller', 'avoir', 'être', 'faire', 'pouvoir', 'devoir', 'savoir', 'venir', 'voir', 'vouloir'] | |
pt = ['ir', 'aur', 'ser', 'fer', 'pourr', 'devr', 'saur', 'viendr', 'verr', 'voudr'] | |
assert len(suj) == len(ends) | |
assert len(vb) == len(pt) |
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
// ./difference.yml | |
#include "bits/stdc++.h" | |
using namespace std; | |
// Defines | |
#define fs first | |
#define sn second | |
#define pb push_back | |
#define eb emplace_back | |
#define mpr make_pair |
OlderNewer