Skip to content

Instantly share code, notes, and snippets.

View KoStard's full-sized avatar
👾

Ruben Kostandyan KoStard

👾
View GitHub Profile
squares = []
mx = 0
class Square:
def __init__(self, height, val = 0):
if val == 0:
self.val = height
else:
self.val = val
self.height = height
def cont(self):
@KoStard
KoStard / Longest pallindrom length
Created August 18, 2017 14:19
Dynamic programming
#include <iostream>
#include <vector>
using namespace std;
int main(){
int q;
cout << "Type the queries number: ";
cin >> q;
while(q--){
string str;
#include <iostream>
#include <vector>
using namespace std;
int calc(int temp, vector<int> &input, vector<int> &L, vector<vector<int>> &mem){
if(L.size()==0){
L.push_back(1);
mem.push_back(*new vector<int>(1,0));
return 1;
}