摘要: 第一次做TC。。。只做上了2道题(是我太菜了吗?)还行ranting一下子就成1500+了。Div2 p1 BlackAndWhiteSolitaireint BlackAndWhiteSolitaire::minimumTurns(string cardFront) { int i, n = cardFront.size(), ret = 0; for (i = 0; i < n; ++i) if (1 & i) ret += cardFront[i] == 'W'; else ret += cardFront[i] == 'B'; return 阅读全文
posted @ 2013-06-05 11:48 hsuppr 阅读(215) 评论(0) 推荐(0) 编辑
摘要: A. Ilya and Bank Account 水题B. Ilya and Queries 水,维护区间和C. Ilya and Matrix贪心。大的明显会被多次取。/** * Problem:313C * Author:Shun Yao * Time:2013.5.31 * Result:Accepted * Memo:greedy */#include <cstdio>#include <algorithm>#include <functional>const long MaxN = 2000001;long n, N, a[MaxN];long l 阅读全文
posted @ 2013-06-05 11:36 hsuppr 阅读(290) 评论(0) 推荐(0) 编辑