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
// Compile with C++ 17 | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <tuple> | |
#include <cassert> | |
using namespace std; | |
typedef long long int64; |
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 <bits/stdc++.h> | |
using namespace std; | |
class Solution { | |
private: | |
vector<int> primes; | |
unordered_map<int, vector<int>> factors; | |
unordered_map<int, vector<size_t>> revFactors; | |
void computePrimes(int max) { |
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> | |
template<typename T> | |
T read() { | |
T var; | |
std::cin >> var; | |
return var; | |
} | |
const int kMax = 100005; |
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> | |
typedef long long int64; | |
template<typename T> | |
T read() { | |
T var; | |
std::cin >> var; | |
return var; | |
} |
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
/* Copyright 2018 Rafael Rendón Pablo <[email protected]> */ | |
// region Template | |
#include <iostream> | |
#include <iomanip> | |
#include <fstream> | |
#include <sstream> | |
#include <string> | |
#include <bitset> | |
#include <vector> | |
#include <queue> |
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
package mx.letmethink; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class Main { | |
public static void main(String[] args) { | |
String text = "{}"; | |
// System.out.println(new JsonParser(text).parse()); | |
// System.out.println(new JsonParser("{\"key\": \"value\", \"num\": 1234}").parse()); |
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
/* Copyright 2017 Rafael Rendón Pablo <[email protected]> */ | |
// region Template | |
#include <iostream> | |
#include <iomanip> | |
#include <fstream> | |
#include <sstream> | |
#include <string> | |
#include <bitset> | |
#include <vector> | |
#include <queue> |
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
/* Copyright 2017 Rafael Rendón Pablo <[email protected]> */ | |
// region Template | |
#include <iostream> | |
#include <iomanip> | |
#include <fstream> | |
#include <sstream> | |
#include <string> | |
#include <bitset> | |
#include <vector> | |
#include <queue> |
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
1 --> 1 | |
2 --> 4 | |
3 --> 9 | |
11 --> 121 | |
22 --> 484 | |
101 --> 10201 | |
111 --> 12321 | |
121 --> 14641 | |
202 --> 40804 | |
212 --> 44944 |
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
" Clojure plugins | |
Plugin 'tpope/vim-classpath' | |
Plugin 'guns/vim-clojure-static' | |
Plugin 'tpope/vim-fireplace' | |
Plugin 'guns/vim-clojure-highlight' |