Skip to content

Instantly share code, notes, and snippets.

Rafael Rendón Pablo rendon

Block or report user

Report or block rendon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View largest_component_size_by_common_factor.cpp
#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) {
View MovieCollection.cpp
#include <iostream>
#include <cstring>
template<typename T>
T read() {
T var;
std::cin >> var;
return var;
}
const int kMax = 100005;
View AboveTheMedian.cpp
#include <iostream>
typedef long long int64;
template<typename T>
T read() {
T var;
std::cin >> var;
return var;
}
@rendon
rendon / D.cpp
Created Mar 6, 2018
Educational Codeforces Round 39 (Rated for Div. 2) -- D
View D.cpp
/* Copyright 2018 Rafael Rendón Pablo <rafaelrendonpablo@gmail.com> */
// region Template
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include <bitset>
#include <vector>
#include <queue>
@rendon
rendon / Parser.java
Last active Feb 18, 2018
Basic JSON parser (super incomplete)
View Parser.java
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());
View AveragePartitionning.cpp
/* Copyright 2017 Rafael Rendón Pablo <rafaelrendonpablo@gmail.com> */
// region Template
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include <bitset>
#include <vector>
#include <queue>
@rendon
rendon / B.cpp
Created Jan 31, 2018
Google Code Jam QR 2014 B
View B.cpp
/* Copyright 2017 Rafael Rendón Pablo <rafaelrendonpablo@gmail.com> */
// region Template
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include <bitset>
#include <vector>
#include <queue>
@rendon
rendon / pattern.txt
Created Jan 24, 2018
Fair and square pattern
View pattern.txt
1 --> 1
2 --> 4
3 --> 9
11 --> 121
22 --> 484
101 --> 10201
111 --> 12321
121 --> 14641
202 --> 40804
212 --> 44944
@rendon
rendon / vim_plugin_for_clojure.txt
Created Jan 12, 2018
List of vim plugins for working with Clojure
View vim_plugin_for_clojure.txt
" Clojure plugins
Plugin 'tpope/vim-classpath'
Plugin 'guns/vim-clojure-static'
Plugin 'tpope/vim-fireplace'
Plugin 'guns/vim-clojure-highlight'
@rendon
rendon / equal.cpp
Created Aug 3, 2017
Equal from Hacker Rank
View equal.cpp
/* Copyright 2017 Rafael Rendón Pablo <rafaelrendonpablo@gmail.com> */
// region Template
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
using namespace std;
typedef long long int64;
typedef unsigned long long uint64;
You can’t perform that action at this time.