Monthly Archives: October 2013

uva 10130, knapsack, optimize space complexity

UVa 10130 is a classical 0-1 knapsack issue. no doubt to use DP, but there are 2 ways to do it: #include <iostream> #include <fstream> #include<memory.h> using namespace std; int objects[1100][2]; int mat[1100][40]; int nObjects; int nPeople; void DP(int nLoad) … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

some thoughts about TLE of uva 674

uva 674, coin change issue, a classical DP, I submit this question twice, use the same algorithm, but the first time it failed, time limit exceeded. Here is my code, the first edition: version 1: #include <stdio.h> #include <string.h> #define … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

re-generate a ssh key for github

my ssh private key used to store at my opensuse vm /home/weixin/.ssh/id_rsa when I generate ssh keys for nitrous.io to login to a free cloud machine, I forgot the github key and override it. I have to re-generate a key … Continue reading

Posted in System | Tagged | Leave a comment