how to be confident while solving math problems?

I feel very unconfident while solving any math problem.

What to do?

# | User | Rating |
---|---|---|

1 | tourist | 3803 |

2 | Benq | 3783 |

3 | Radewoosh | 3602 |

4 | Um_nik | 3541 |

5 | fantasy | 3526 |

6 | maroonrk | 3504 |

7 | ko_osaga | 3500 |

8 | jiangly | 3465 |

9 | orzdevinwang | 3460 |

10 | cnnfls_csy | 3427 |

# | User | Contrib. |
---|---|---|

1 | awoo | 180 |

2 | -is-this-fft- | 178 |

3 | nor | 169 |

4 | Um_nik | 168 |

5 | SecondThread | 164 |

6 | maroonrk | 163 |

6 | adamant | 163 |

8 | kostka | 161 |

9 | YouKn0wWho | 158 |

10 | antontrygubO_o | 155 |

how to be confident while solving math problems?

I feel very unconfident while solving any math problem.

What to do?

is Chinese Remainder Theorem necessary to solve the System of linear congruence?

`gcd(a,m) == 1`

then there exists module multiplicative inverse, and also there exists only 1 inverse

suggest me some good problem archive of (CF level >= 1700). Thank you

how to find n such that n % x == 0 and (n + 1) % y == 0 ?

like we do ceil division like this

```
int64_t ceil_div(int64_t a, int64_t b) {
return a / b + ((a ^ b) > 0 && a % b != 0);
}
```

how to do floor division with negative numbers also.

how can i prove my solution both Dp and greedy.

We know that Time Complexity of `std::sort`

is `O(N·log(N))`

. and

Time Complexity of `std::stable_sort`

is `O(N·log^2(N))`

.

The `std::sort`

doesn't preserves the relative order of equal elements while `std::stable_sort`

does. But it is little slower. Can't we just write custom comparator to preserve order like this

```
int N = 1e5;
std::vector<int> A(N, 1);
std::vector<int> order(N);
std::iota(order.begin(), order.end(), 0);
std::sort(order.begin(), order.end(), [&](int i, int j) {
if (A[i] == A[j]) {
return i < j;
}
return A[i] < A[j];
});
```

now the `std::sort`

will also preserve relative order of equal elements than why to use `std::stable_sort`

let array `A = {1,3,1,1,1,4,0,0,2,3,1,}`

We have to do following 2 operations on it

`1.)Decrease all elements from L to R by 1`

`2.)Given i find right most element j such that for each k. i <= k <= j. A[k] > 0`

how can i do this in `log(N)`

?

is there any formula to calculate this in `O(1)`

?

```
int N;
cin >> N;
int answer = 0;
while (N > 1) {
N = sqrt(N);
answer++;
}
cout << answer;
```

what is fractional knapsack. is this a dp problem or greedy ?

Codeforces (c) Copyright 2010-2023 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jan/30/2023 02:29:10 (h3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|