Skip to content

Instantly share code, notes, and snippets.

View cbdavide's full-sized avatar

David Castelblanco cbdavide

View GitHub Profile
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def mergeKLists(self, lists: List[ListNode]) -> ListNode:
self.lists = lists
@cbdavide
cbdavide / 10622.cpp
Created February 14, 2019 01:16
UVa - 10622 - Perfect P-th Powers
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define PB push_back
typedef long long ll;
typedef vector<ll> vll;
@cbdavide
cbdavide / 583.cpp
Created February 5, 2019 00:08
UVa 583 - Prime Factors
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define PB push_back
typedef long long ll;
typedef vector<ll> vll;
@cbdavide
cbdavide / 10819.cpp
Created January 25, 2019 03:12
UVa 10819 - Trouble of 13-Dots
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define PB push_back
typedef long long ll;
typedef vector<ll> vll;
@cbdavide
cbdavide / 128.cpp
Created January 25, 2019 03:09
UVa 128 - Software CRC
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define PB push_back
typedef long long ll;
typedef vector<ll> vll;
@cbdavide
cbdavide / 10003.cpp
Created January 24, 2019 00:26
UVa - 10003 - Cutting Sticks
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define PB push_back
typedef long long ll;
typedef vector<ll> vll;
@cbdavide
cbdavide / 10126.cpp
Created January 20, 2019 17:21
UVa 10126 - Zipf's Law
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define PB push_back
typedef long long ll;
typedef vector<ll> vll;
@cbdavide
cbdavide / 10149.cpp
Created January 20, 2019 17:19
UVa 10149 - Yahtzee
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define PB push_back
typedef long long ll;
typedef vector<ll> vll;
@cbdavide
cbdavide / 10719.cpp
Created January 20, 2019 17:15
UVa 10719 - Quotient Polynomial
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define PB push_back
typedef long long ll;
typedef vector<ll> vll;
@cbdavide
cbdavide / MSE06H.cpp
Created January 20, 2019 17:12
SPOJ MSE06H - Japan
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define PB push_back
typedef long long ll;
typedef vector<ll> vll;