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.
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
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. | Язык | Кто | Когда | Δ | Комментарий | |
---|---|---|---|---|---|---|
en1 | codebuster_10 | 2022-03-14 09:49:38 | 1826 | Initial revision (published) |
Название |
---|