Skip to content

Instantly share code, notes, and snippets.

@chengluyu
Last active August 29, 2015 14:05
Show Gist options
  • Save chengluyu/4e53e2c3ccaaf789aca5 to your computer and use it in GitHub Desktop.
Save chengluyu/4e53e2c3ccaaf789aca5 to your computer and use it in GitHub Desktop.
Problems to solve.
var fs = require("fs");
var content = fs.readFileSync(process.argv[2], "utf8");
var url_makers = {
"poj": function (id) {
return "http://poj.org/problem?id=" + id;
},
"hdu": function (id) {
return "http://acm.hdu.edu.cn/showproblem.php?pid=" + id;
},
"tyvj": function (id) {
return "http://www.tyvj.cn/Problem_Show.aspx?id=" + id;
},
"vijos": function (id) {
return "https://www.vijos.org/p/" + id;
}
};
content = content.replace(/^(?:\* )?([a-z]+) ?(\d{3,4}) ?(\(.+\))?$/mg, function (str) {
var result = str.match(/(?:\* )?([a-z]+) ?(\d{3,4}) ?(\(.+\))?/);
// console.log(result);
// return str;
var website = result[1], pid = result[2], attach = result[3];
return '* [' + website.toUpperCase() + ' ' + pid +
(attach || '') +
'](' + url_makers[website](pid) + ')';
});
fs.writeFileSync("./output.txt", content);

Day 1 数

高精度算法

  • hdu 1002
  • hdu 1042
  • hdu 1316
  • tyvj 1382
  • poj 1001(*)
  • tyvj 1651(**)

数学相关

最大公约数

  • poj 1061
  • poj 2115

素数

  • poj 2689

高斯消元

  • poj 1222
  • vijos 1052
  • tyvj 1822

快速幂

  • tyvj 1118
  • tyvj 1119

Day 2 基础数据结构

  • poj 1028
  • poj 1363
  • tyvj 1393

队列

  • poj 3125
  • tyvj 1066

单调栈 单调队列

  • poj 2823(引例)
  • poj 2796
  • poj 3250
  • poj 2559

  • tyvj 1607
  • poj 2442

Day 3 树

  • poj 1655(引例)
  • tyvj 1520(引例)
  • poj 1308
  • tyvj 1033
  • tyvj 2039(*)

并查集

  • tyvj 1251
  • tyvj 1017
  • tyvj 1700(*)
  • tyvj 1680(*)
  • poj 1703(*)

Day 4 图论

基本知识

图的遍历

拓扑排序

  • tyvj 1202
  • tyvj 2004

最小生成树

  • tyvj 1831
  • tyvj 1307

最短路径

  • tyvj 1221
  • tyvj 1238(*)

强连通分量(*)

  • tyvj 1111
  • poj 1236
  • poj 2553
  • poj 2186

Day 5 动态规划

  • tyvj 1004

  • tyvj 1254

  • poj 1080(*)

  • tyvj 1213(*)

  • tyvj 1050

  • tyvj 1055

  • tyvj 1073

  • tyvj 1097(*)

  • tyvj 1005

  • tyvj 1202 (数数食物链)

  • tyvj 1258

  • tyvj 1052

  • tyvj 1051

  • tyvj 1513

  • poj 1947(**)

  • tyvj 1305

  • tyvj 1144(弱化)

  • tyvj 1313

  • poj 2373

  • tyvj 1044

  • tyvj 1124

  • tyvj 1195

  • tyvj 1198

  • tyvj 1046(*)

  • tyvj 1061(*)

  • tyvj 1114(*)

  • tyvj 1209(*)

  • tyvj 1365(*)

  • tyvj 1387

  • tyvj 1402

  • tyvj 1416(*)


Day 6 字符串

字符串简单处理

  • tyvj 1009
  • tyvj 1029
  • tyvj 1053(*)
  • tyvj 1152
  • poj 2141
  • poj 1488

字符串匹配

  • poj 3461
  • poj 2406
  • poj 1961

字典树

  • poj 3630

Day 7 算法思想

贪心

  • tyvj 1112
  • tyvj 1315(*)
  • tyvj 2046

分治

  • poj 2299
  • tyvj 1384(*)

二分答案

  • noip 2001 一元三次方程求解(引例)
  • tyvj 1696(引例)
  • tyvj 1938
  • tyvj 1609
  • tyvj 1176
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment