Assuming p=71 for all below problems.
- Find the elements in a finite field that are congruent to the following values:
- -1 ≅ 70 (since -1 mod 71 = 70 and 70-(-1) = 71, 71 % 71 == 0;
- -4 ≅ 67. 67 - (-4) = 71;
- -160 ≅ 53;
- 500 ≅ TBE.
| class Solution { | |
| public: | |
| int longestValidParentheses(string s) { | |
| uint count = 0; | |
| char lp = '('; | |
| char emptyChar = '\0'; | |
| char rp = ')'; |
Assuming p=71 for all below problems.