随笔分类 -  其他算法 —— 基础题

Codeforces Round #379 (Div. 2) D. Anton and Chess —— 基础题
摘要:题目链接:http://codeforces.com/contest/734/problem/DD. Anton and Chesstime limit per test4 secondsmemory limit per test256 megabytesinputs... 阅读全文

posted @ 2017-06-11 10:26 h_z_cong 阅读(144) 评论(0) 推荐(0)

Codeforces Round #376 (Div. 2) A. Night at the Museum —— 循环轴
摘要:题目链接: http://codeforces.com/contest/731/problem/AA. Night at the Museumtime limit per test1 secondmemory limit per test256 megabytesin... 阅读全文

posted @ 2017-05-31 16:14 h_z_cong 阅读(528) 评论(0) 推荐(0)

Codeforces Round #374 (Div. 2) B. Passwords —— 基础题
摘要:题目链接:http://codeforces.com/contest/721/problem/BB. Passwordstime limit per test2 secondsmemory limit per test256 megabytesinputstandar... 阅读全文

posted @ 2017-05-13 14:58 h_z_cong 阅读(202) 评论(0) 推荐(0)

Codeforces Round #374 (Div. 2) A. One-dimensional Japanese Crossword —— 基础题
摘要:题目链接:http://codeforces.com/contest/721/problem/AA. One-dimensional Japanese Crosswordtime limit per test1 secondmemory limit per test2... 阅读全文

posted @ 2017-05-13 14:05 h_z_cong 阅读(41076) 评论(0) 推荐(0)

CSU - 1530 Gold Rush —— 二进制
摘要:题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1530对于一块2^n质量的gold。需要把它分成a质量和b质量(a+b=2^n),且每次分时是平分。问至少要平分多少次?其实只需要知道最小分块的质量,就能... 阅读全文

posted @ 2017-04-25 14:04 h_z_cong 阅读(206) 评论(0) 推荐(0)

UVALive - 4867 —— dp
摘要:题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2868用暴力也过了:#include#includ... 阅读全文

posted @ 2017-03-27 22:13 h_z_cong 阅读(219) 评论(0) 推荐(0)

POJ2389 —— 高精度乘法
摘要:直接上代码了:#include#include#include#include#include#include#include#include#include#include#define LL long long#define MAX(a,b) (a>b?a:b)#... 阅读全文

posted @ 2017-03-27 21:58 h_z_cong 阅读(184) 评论(0) 推荐(0)

Gym - 100676E —— 基础题
摘要:题目链接:https://odzkskevi.qnssl.com/1110bec98ca57b5ce6aec79b210d2849?v=1490453767题解:这种方法大概跟离散化扯上点关系:首先直接用数组去接这组输入,然后对数组进行排序。之后把相等的数并在一起,并... 阅读全文

posted @ 2017-03-27 21:54 h_z_cong 阅读(161) 评论(0) 推荐(0)

Gym - 100676D Sudoku 基础题
摘要:题目链接:https://odzkskevi.qnssl.com/1110bec98ca57b5ce6aec79b210d2849?v=1490453767题解:方法1:用STL的set,把每个数放到相应的集合。在放之前如果找到相同的数,则invalid。方法2:由于... 阅读全文

posted @ 2017-03-27 21:35 h_z_cong 阅读(161) 评论(0) 推荐(0)

Codeforces Round #261 (Div. 2) B. Pashmak and Flowers 水题
摘要:题目链接:http://codeforces.com/problemset/problem/459/B题意:给出n支花,每支花都有一个漂亮值。挑选最大和最小漂亮值得两支花,问他们的差值为多少,并且有多少种选法(无先后顺序)。现场做时,想到的是:用multimap记录每... 阅读全文

posted @ 2017-03-24 15:02 h_z_cong 阅读(196) 评论(0) 推荐(0)

导航