摘要: Given a binary string S[1,…,N]S[1,…,N] (i.e. a sequence of 0’s and 1’s), and QQ queries on the string. There are two types of queries: Flippin... 阅读全文
posted @ 2017-09-19 21:17 黑码的博客 阅读(83) 评论(0) 推荐(0) 编辑
摘要: In computer vision, a chain code is a sequence of numbers representing directions when following the contour of an object. For example, the fo... 阅读全文
posted @ 2017-09-19 21:17 黑码的博客 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Lulu has a sweet tooth. Her favorite food is ring donut. Everyday she buys a ring donut from the same bakery. A ring donut is consists of nn p... 阅读全文
posted @ 2017-09-19 21:17 黑码的博客 阅读(117) 评论(0) 推荐(0) 编辑
摘要: https://loj.ac/problem/528不含平方因子的数才会有 -1 和 1才会对结果造成影响, 所有排除掉所有含有平方因子的数就好开始的时候平方是1 就是没有平方因子的情况,减去所有平方因子的情况#include using namespace std;const in... 阅读全文
posted @ 2017-09-19 21:17 黑码的博客 阅读(158) 评论(0) 推荐(0) 编辑
摘要: int miniexpress (char* s, int n) { int p = 0, q = 1; while (p 0) j=j+k+1; else i=i+k+... 阅读全文
posted @ 2017-09-19 21:17 黑码的博客 阅读(127) 评论(0) 推荐(0) 编辑