@@ -12,9 +12,7 @@ long long solve(){
1212}
1313if (!exist[][]){
1414long long answer = 0 ;
15- // ----type your code here----
1615
17- // ---------------------------
1816dp[][] = answer;
1917exist[][] = true ;
2018}
@@ -25,8 +23,7 @@ long long solve(){
2523 * Description: Digit DP
2624 */
2725
28- template <typename T> string toString (T value)
29- {
26+ template <typename T> string toString (T value){
3027string s;
3128while (value) {
3229s.push_back (value % 10 + ' 0' );
@@ -40,8 +37,7 @@ template<typename T> string toString(T value)
4037bool exist[][][];
4138long long dp[][][];
4239
43- long long solve (const string &s, int digit, bool bound, )
44- {
40+ long long solve (const string &s, int digit, bool bound, ){
4541if (digit == s.size ()) {
4642return ;
4743}
@@ -60,8 +56,8 @@ long long solve(const string &s, int digit, bool bound, )
6056
6157/* *
6258 * Description: Binary exponentiation DP (Non standard)
63- * Note: Most of the same target problems can be solved through matrix exponentiation.
64- * It helped me once doing a Div2-E (http://codeforces.com/problemset/problem/621/E)
59+ * Note: Most of the same target problems can be solved through matrix exponentiation.
60+ * It helped me once doing a Div2-E (http://codeforces.com/problemset/problem/621/E)
6561 */
6662
6763 long long dp[105 ][105 ] = {};
@@ -105,7 +101,7 @@ long long solve(const string &s, int digit, bool bound, )
105101
106102/* *
107103 * Description: Bitwise combinatorial DP
108- * Note: Target problems include no of pairs (x, y)
104+ * Note: Target problems include no of pairs (x, y)
109105such that x <= A, y <= B, (x op y) <= C, where op is a bitwise operator.
110106 */
111107
@@ -157,4 +153,4 @@ int main(){
157153scanf (" %lld%lld%lld" , &a, &b, &c);
158154A = toBinaryString (a); B = toBinaryString (b); C = toBinaryString (c);
159155printf (" %lld\n " , solve (0 , true , true , true , true ));
160- }
156+ }
0 commit comments