# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Name |
---|
I remember someone solved this problem using int_128 in C++ very easily . You can try that .
give the link of your submisson please
I made a few moderations to your code.I hope you get that well. - Check mainly two number's.If they overflow then check the condition.
... ~~~~~
include<bits/stdc++.h>
using namespace std;
/* ###################################################################### ####################### THE BIG INT ########################## */
const int base = 1000000000; const int base_digits = 9;
struct Int {
}; /* ####################### THE BIG INT ########################## ###################################################################### */
int main(){
} ~~~~~
Why dont you just use python or java
I'm very sure that if you write OP's code in Java it will also get TLE. OP just multiplies the numbers together and allows the result to grow to $$$(10^{18})^{10^5)} \approx 10^{10^6}$$$. Doing $$$10^5$$$ multiplications with such numbers is too slow even if you use smart multiplication algorithms.
The problem statement isn't "can you work with bigints", it's "are you smart enough to break if the number grows too big".