Time limit for this test was 1 hour
150 points
200 points
250 points
My solution for 250 points (sorry for bad formatting)
Comments
Feel free to share your ideas/code on how to solve them.
# | 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 |
Uber Hiring Test Problems (India 2022)
Time limit for this test was 1 hour
const vector<vector> M = { {21,1,0,0,0,0}, {5,21,2,0,0,0}, {0,4,21,3,0,0}, {0,0,3,21,4,0}, {0,0,0,2,21,5}, {0,0,0,0,1,21} };
const vector<vector> I = { {1,0,0,0,0,0}, {0,1,0,0,0,0}, {0,0,1,0,0,0}, {0,0,0,1,0,0}, {0,0,0,0,1,0}, {0,0,0,0,0,1}, };
const int MOD = 1e9 + 7;
vector<vector> multiply(vector<vector> a,vector<vector> b){ vector<vector> c(6,vector(6,0)); for(int i = 0; i < 6; ++i) for(int j = 0; j < 6; ++j) for(int k = 0; k < 6; ++k) c[i][j] += a[i][k] * b[k][j], c[i][j] %= MOD; return c; }
vector<vector> power(int N){
vector<vector> ret = I, a = M;
while(N > 0){ if(N&1) ret = multiply(ret,a); N /= 2; a = multiply(a,a); }
return ret; }
int solve(int N){
auto M = power(N);
return M[5][0];
}
I was only able to solve 250 pointer using Matrix exponentiation, 150 pointer seemed like DP but was not able to implement. I have no idea about 200 pointer.
Feel free to share your ideas/code on how to solve them.
Rev. | Lang. | By | When | Δ | Comment | |
---|---|---|---|---|---|---|
en1 | codebuster_10 | 2022-03-14 09:49:38 | 1826 | Initial revision (published) |
Name |
---|