- Dockerfile
FROM ruby:2.3.3
# install necessary packages
RUN apt-get update -qq && apt-get install -y build-essential nodejs npm sqlite3 --no-install-recommends
use std::io; | |
// fn tokenize(line: CharIndices) { | |
// } | |
// | |
// fn parse(line: &str, l: usize) { | |
// let n = line.len(); | |
// let mut idx = l; | |
// | |
// let indices = line.char_indices(); |
use std::io; | |
use std::collections::HashMap; | |
#[derive(Debug)] | |
enum JSONToken { | |
OpenObject, | |
CloseObject, | |
OpenArray, | |
CloseArray, | |
Colon, |
package data_structure; | |
import utils.BitVector; | |
import java.util.*; | |
public class WaveletTree { | |
BitVector[] which; | |
public int z; | |
public int level; |
import data_structure.fenwick.FenwickTree; | |
import java.util.Arrays; | |
public class CountRangeCoveringRange { | |
/** | |
* Counts how many ranges in [l,r). | |
* Answers multiple query. | |
* | |
* O((n+q)log(n+q) where q = query.length, n = ranges.length |
import data_structure.persistent.PersistentSegmentTree; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.TreeMap; | |
public class CountRangeCoveringRangeOnlinePersistent { | |
TreeMap<Integer,Integer> endMap; | |
PersistentSegmentTree segmentTree; |
import java.util.*; | |
public class BitVector { | |
public int n; | |
public int m; | |
public long[] bits; | |
public BitVector(int length) { | |
n = length; | |
bits = new long[(n+63)>>>6]; |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import java.util.Arrays; | |
import java.util.InputMismatchException; | |
public class F { | |
public static void main(String[] args) { | |
InputReader in = new InputReader(System.in); | |
PrintWriter out = new PrintWriter(System.out); |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import java.util.Arrays; | |
import java.util.InputMismatchException; | |
public class F { | |
public static void main(String[] args) { | |
InputReader in = new InputReader(System.in); | |
PrintWriter out = new PrintWriter(System.out); |