摘要:All about pruning and duplication removal. Took me several submissions to get it AC:#include #include #include #include #include #include using namesp...
阅读全文
02 2015 档案
摘要:An iterative 'simulation' problem:#include #include #include #include #include using namespace std;int main() { int t, n, c, m; cin >> t; whi...
阅读全文
摘要:The punch line to this problem is the support to very very large int handling. I tried C++ code for multiple times, but it only passed first 13~ cases
阅读全文
摘要:You may also have seen this problem in interview questions. Two cases:1. all chars have even numbers of it2. only 1 char have odd numbers of it#includ...
阅读全文
摘要:https://www.hackerrank.com/challenges/angry-childrenAmong N ints, pick K with min 'unfairness' (max of k - min of k). Here's the strategy: larger numb...
阅读全文
摘要:Typical rolling-hash solution. That is, Boyer-Moore algorithm variation.class Solution {public: inline int encode(char c) { switch (c) ...
阅读全文