├── .gitignore ├── CodeForces ├── Competitions │ ├── Round #373 (Div 2) │ │ ├── a.cpp │ │ ├── b.cpp │ │ └── c.cpp │ ├── Round #374 (Div 2) │ │ ├── a.cpp │ │ └── b.cpp │ ├── Round #380 (Div 2) │ │ ├── a.cpp │ │ └── b.cpp │ ├── Round #382 (Div 2) │ │ ├── a.cpp │ │ ├── b.cpp │ │ └── c.cpp │ ├── Round #395 (Div 2) │ │ └── b.cpp │ └── Round #396 (Div 2) │ │ ├── A.cpp │ │ └── B.cpp └── Practices │ └── Noldbach problem.cpp ├── HackerRank ├── Competitions │ ├── RookieRank │ │ ├── Antiprime Numbers.cpp │ │ ├── Birthday Cake Candles.cpp │ │ ├── Counting Valleys.cpp │ │ ├── Extremely Dangerous Virus.cpp │ │ └── Magic Square Forming.cpp │ ├── Week Code 23 │ │ ├── Gears of War.cpp │ │ ├── Tresure Hunting.cpp │ │ ├── Unexpected Problem.cpp │ │ └── lighthouse.cpp │ ├── World Codesprint 6 │ │ ├── Abbreviation.cpp │ │ ├── Beautiful 3 Set.cpp │ │ ├── Bon Appétit.cpp │ │ ├── Bonetrousle.cpp │ │ ├── Combination Lock.cpp │ │ ├── Flipping the Matrix.cpp │ │ └── README.md │ └── World Codesprint 9 │ │ ├── Grading Students.cpp │ │ ├── Queen's Attack 2.cpp │ │ └── Weighted Uniform Strings.cpp ├── Practices │ ├── Algorithms │ │ ├── Bit Manipulation │ │ │ ├── flippingBits.c │ │ │ ├── lonelyInteger.c │ │ │ └── maxXOR.c │ │ ├── Dynamic Programming │ │ │ ├── Candies.cpp │ │ │ ├── Fibonacci Modified.java │ │ │ ├── Maximum Subarray.cpp │ │ │ └── The Longest Increasing Subsequence.cpp │ │ ├── Graph Theory │ │ │ ├── Breadth First Search _ Shortest Reach.cpp │ │ │ ├── Dijkstra_Shortest Reach 2.cpp │ │ │ ├── Even Tree.c │ │ │ └── Floyd City of Blinding Lights.cpp │ │ ├── Greedy │ │ │ └── Mark and Toys.cpp │ │ ├── Implementation │ │ │ ├── Cavity Map.c │ │ │ ├── Chocolate Feast.c │ │ │ ├── Divisible Sum Pairs.cpp │ │ │ ├── Equal Stacks.cpp │ │ │ ├── Extra Long Factorial.cpp │ │ │ ├── Jumping on the Clouds Revisited.c │ │ │ ├── Jumping on the Clouds.cpp │ │ │ ├── Kangaroo.cpp │ │ │ ├── Lisa's Workbook.cpp │ │ │ ├── Minimum Distances.cpp │ │ │ ├── Sherlock and Array.c │ │ │ └── Taum and B'day.c │ │ ├── Search │ │ │ └── Ice Cream Parlor.cpp │ │ └── Sorting │ │ │ ├── Correctness and the Loop Invariant.cpp │ │ │ ├── Counting Sort 1.cpp │ │ │ ├── Counting Sort 2.cpp │ │ │ ├── Counting Sort 3.cpp │ │ │ ├── CountingSort4.java │ │ │ ├── Find the Median.cpp │ │ │ ├── Insertion Sort - Part 1.cpp │ │ │ ├── Insertion Sort - Part 2.cpp │ │ │ ├── Quicksort 1 - Partition.cpp │ │ │ ├── Quicksort 2 - Sorting.cpp │ │ │ └── Running Time of Algorithms.cpp │ └── Math │ │ ├── PowerOfLargeNumbers.py │ │ └── Sherlock and GCD.cpp └── RookieRank 2 │ ├── HackerRank in a String!.cpp │ └── KnightL on a Chessboard.cpp ├── README.md ├── SPOJ └── Medium Factorization.cpp ├── TopCoder ├── Practices │ └── SRM │ │ ├── BinaryCode.cpp │ │ ├── SRM 395 Div 2 │ │ ├── 250.cpp │ │ └── 500.cpp │ │ ├── SRM 396 Div 2 │ │ └── 500_notCompleted.cpp │ │ ├── SRM 450 Div 1 │ │ └── OrderedNim.cpp │ │ ├── SRM 612 Div 2 │ │ ├── question1.cpp │ │ ├── question2.cpp │ │ └── question3.cpp │ │ ├── SRM 613 Div 2 │ │ ├── 250.cpp │ │ └── 500.cpp │ │ ├── SRM 635 Div 2 │ │ ├── IdentifyingWood.cpp │ │ └── QuadraticLaw.cpp │ │ └── SRM 702 Div 2 │ │ └── SecondQuestin.cpp └── README.md ├── USACO ├── q1_ride.cpp ├── q2_gift1.cpp ├── q3_friday.cpp ├── q4_beads.cpp ├── q5_milk2.cpp └── test.cpp └── UVa ├── Complete Search ├── 10487-Closest Sums.cpp ├── 11236-Grocery-Store.cpp ├── 11565-Simple-Equations.cpp ├── 12455-Bars.cpp ├── 4142-Expert Enough?.cpp ├── 524-Prime-Ring-Problem.cpp └── input ├── Divide & Conquer ├── 00183-Bit-Maps.cpp ├── 12032-The-Monkey and-the-Oiled-Bamboo.cpp ├── 12192-Grapevine.cpp ├── input.txt └── output.txt ├── Dynamic ├── 10306-eCoins.cpp ├── 10616-Divisible-Group-Sums.cpp ├── 10819-Trouble-of-13-Dots.cpp ├── 10943-How-do-you-add?.cpp ├── 11456-Trainsorting.cpp ├── 11517-Exact-Change.cpp ├── 11566-Let's-Yum-Cha!.cpp ├── 11790-Murcia's-Skyline.cpp ├── 357-Let-Me-Count-The-Ways.cpp ├── 481-What-Goes-Up.cpp ├── input.txt └── output.txt └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | *.smod 19 | 20 | # Compiled Static libraries 21 | *.lai 22 | *.la 23 | *.a 24 | *.lib 25 | 26 | # Executables 27 | *.exe 28 | *.out 29 | *.app 30 | 31 | # For Mac 32 | *.DS_Store 33 | -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #373 (Div 2)/a.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | 9 | int main(){ 10 | int n; 11 | cin >> n; 12 | int arr[n+1]; 13 | for(int i = 0; i < n ; i++){ 14 | cin >> arr[i]; 15 | } 16 | if(arr[n-1] == 15) cout << "DOWN\n"; 17 | else if(arr[n-1] == 0) cout << "UP\n"; 18 | else if(n <= 1) cout << "-1\n"; 19 | else if(arr[n-1] < arr[n-2]) cout << "DOWN\n"; 20 | else cout << "UP\n"; 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #373 (Div 2)/b.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | int main(){ 5 | int n ,diff0 = 0, diff1 = 0, diff3 = 0, diff4 = 0; 6 | cin >> n; 7 | int bin[n+1], opt1[n+1], opt2[n+1]; 8 | char c, cond = 'b'; 9 | for(int i = 0 ; i < n; ++i){ 10 | cin >> c; 11 | if(c != cond && (i%2)) diff0++; 12 | else if(c != cond && !(i%2))diff1++; 13 | else if(c == cond && !(i%2))diff3++; 14 | else diff4++; 15 | cond == 'b' ? cond = 'r' : cond = 'b'; 16 | } 17 | cout << min(max(diff0 , diff1), max(diff4 , diff3)) << endl; 18 | 19 | return 0; 20 | } -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #373 (Div 2)/c.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | string s; 6 | int toi(char c){ 7 | return c - '0'; 8 | } 9 | 10 | void checker(int i){ 11 | // cout << i << " 1 " << s << endl; 12 | if(i == 0){ 13 | if(s[i] == '9'){ 14 | s[i] = '0'; 15 | s.insert(0, "1"); 16 | }else{ 17 | s[i] = (toi(s[i]) + 1) + '0'; 18 | } 19 | return; 20 | }else{ 21 | if(s[i] == '9'){ 22 | s[i] = '0'; 23 | checker(i-1); 24 | }else{ 25 | s[i] = (toi(s[i]) + 1) + '0'; 26 | } 27 | } 28 | // cout << i << " 2 " <> n >> t; 34 | cin >> s; 35 | long dot = s.find('.'); 36 | //cout << dot+1 << endl; 37 | for(long i = dot+1; i < s.size() && t ; ++i){ 38 | if(toi(s[i]) >= 5){ 39 | //cout << s[i] << " " << i << dot+1 << endl; 40 | if(i == dot+1){ 41 | s.erase(s.begin()+i-1, s.end()); 42 | checker(s.size()-1); 43 | break; 44 | } 45 | else{ 46 | s.erase(s.begin()+i, s.end()); 47 | s[s.size()-1] = (toi(s[s.size()-1]) + 1) + '0' ; 48 | t--; 49 | i -= 2; 50 | } 51 | } 52 | } 53 | cout << s << endl; 54 | return 0; 55 | } 56 | -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #374 (Div 2) /a.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace std; 10 | int main (){ 11 | int n , ans = 0; 12 | std::vector vc; 13 | string s; 14 | cin >> n >> s; 15 | 16 | for(int i = 0 ; i < s.size() ; ++i){ 17 | int j = 0; 18 | while(s[i+j] == 'B'){ 19 | j++; 20 | } 21 | if(j){ 22 | ans++; 23 | vc.push_back(j); 24 | } 25 | i+=j; 26 | } 27 | cout << ans << endl; 28 | for(int i = 0; i < vc.size(); ++i){ 29 | cout << vc[i] << " "; 30 | } 31 | cout << endl; 32 | } 33 | -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #374 (Div 2) /b.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | int arr[110]; 9 | using namespace std; 10 | int main (){ 11 | int n , k; 12 | string s; 13 | map m; 14 | 15 | cin >> n >> k; 16 | 17 | for(int i = 0; i < n; ++i){ 18 | cin >> s; 19 | if(m[s] != 1) arr[s.size()]++; 20 | m[s] = 1; 21 | } 22 | cin >> s; 23 | int total = 0, i = 0; 24 | while(i < s.size()) total += arr[i++]; 25 | 26 | n = floor(total/k) * 5 + total; 27 | cout << n+1 << " " ; 28 | n = total + arr[s.size()] - 1; 29 | cout << ((floor(n/k)) * 5) + n + 1 << endl; 30 | 31 | } -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #380 (Div 2)/a.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | bool used[104]; 10 | int main (){ 11 | string s; 12 | int n; 13 | cin >> n; 14 | cin >> s; 15 | for (int i = 2; i < s.size(); ++i){ 16 | if(s[i-2] == 'o' && s[i-1] == 'g' && s[i] == 'o'){ 17 | int temp = i; 18 | int j = 0; 19 | while(s[i-1] == 'g' && s[i] == 'o'){ 20 | i+=2; 21 | j+=2; 22 | } 23 | s.replace(temp-2,j+1,"***"); 24 | i = temp; 25 | } 26 | } 27 | cout << s << endl; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #380 (Div 2)/b.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | int arr[1005][1005]; 10 | int main (){ 11 | int n , m , res = 0; 12 | cin >> n >> m; 13 | 14 | for(int i = 1; i <= n; ++i) 15 | for(int j = 1; j <= m; ++j) 16 | cin >> arr[i][j]; 17 | 18 | for(int i = 1; i <= n; i++) 19 | for(int j = 1; j <= m; ++j){ 20 | if(arr[i][j]){ 21 | for(int k = i+1; k <= n; ++k) 22 | if(!arr[k][j] && k <= n)res++; 23 | else break; 24 | for(int k = i-1; k > 0; --k) 25 | if(!arr[k][j] && k > 0)res++; 26 | else break; 27 | for(int k = j+1; k <= m; ++k) 28 | if(!arr[i][k] && k <= m)res++; 29 | else break; 30 | for(int k = j-1; k > 0; --k) 31 | if(!arr[i][k] && k > 0)res++; 32 | else break; 33 | } 34 | 35 | } 36 | cout << res << endl; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #382 (Div 2)/a.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | int main () { 6 | 7 | int n , k, G, T; 8 | string s; 9 | cin >> n >> k; 10 | cin >> s; 11 | for(int i =0 ; i < s.size() ; ++i){ 12 | if(s[i] == 'G'){ 13 | G = i; 14 | } 15 | else if(s[i] == 'T'){ 16 | T = i; 17 | } 18 | } 19 | if(T < G){ 20 | int temp = T; 21 | T = G; 22 | G = temp; 23 | } 24 | int i; 25 | for( i = G ; i <= T ; i+=k){ 26 | if(s[i] == '#'){ 27 | cout << "NO" << endl; 28 | exit(0); 29 | } 30 | } 31 | if(i == T+k)cout << "YES" << endl; 32 | else cout << "NO" << endl; 33 | } -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #382 (Div 2)/b.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | 10 | int main() 11 | { 12 | 13 | int n , n1, n2, a; 14 | vector vc; 15 | cin >> n >> n1 >> n2; 16 | for(int i = 0; i < n ; ++i){ 17 | cin >> a; 18 | vc.push_back(a); 19 | } 20 | sort(vc.begin() , vc.end()); 21 | reverse(vc.begin(), vc.end()); 22 | int mn = min(n1, n2); 23 | int mx = max(n1, n2); 24 | double sum1 = 0, sum2 = 0; 25 | for(int i = 0; i < mn ; ++i){ 26 | sum1 += vc[i]; 27 | } 28 | for(int i = mn; i < mx+mn ; ++i){ 29 | sum2 += vc[i]; 30 | } 31 | printf("%.6f", sum1/mn + sum2/mx); 32 | return 0; 33 | 34 | } -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #382 (Div 2)/c.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | 10 | int main(){ 11 | long long n, x1 = 1, x2 = 1, step = 0; 12 | cin >> n; 13 | while(x1 <= n){ 14 | long long temp = x1; 15 | x1 = x1 + x2; 16 | x2 = temp; 17 | step++; 18 | } 19 | cout << --step << endl; 20 | } -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #395 (Div 2)/b.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | int main () { 7 | 8 | long n; 9 | cin >> n; 10 | long a[n+3]; 11 | for(long i = 1; i <= n; ++i) cin >> a[i]; 12 | bool ok = false; 13 | int left = 1, right = n; 14 | while (left <= right) { 15 | if (!ok) { 16 | swap(a[left], a[right]); 17 | ok = true; 18 | } 19 | else { 20 | ok = false; 21 | } 22 | left++, right--; 23 | } 24 | for(long i = 1; i <= n; ++i) cout << a[i] << ' '; 25 | } -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #396 (Div 2)/A.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | int main(){ 7 | string s1, s2; 8 | cin >> s1 >> s2; 9 | if(s1.size() != s2.size()) cout << max(s1.size(), s2.size()); 10 | else if(s1 != s2) cout << s1.size(); 11 | else cout << "-1"; 12 | } -------------------------------------------------------------------------------- /CodeForces/Competitions/Round #396 (Div 2)/B.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | int main(){ 7 | 8 | cin >> n; 9 | int a[n]; 10 | for (int i = 0; i < n; ++i) cin >> a[i]; 11 | sort(a, a+n); 12 | for (int i = 2; i < n; ++i){ 13 | int x = a[i]; 14 | int y = a[i-1]; 15 | int z = a[i-2]; 16 | if(x > y+z){ 17 | cout << "YES"; 18 | exit(0); 19 | } 20 | } 21 | cout << "NO"; 22 | } -------------------------------------------------------------------------------- /CodeForces/Practices/Noldbach problem.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include // STL 5 | #include // STL 6 | #include // STL 7 | 8 | using namespace std; 9 | 10 | vector primes; 11 | map m; 12 | int n, k; 13 | 14 | void check(){ 15 | int res = 0; 16 | for(int i = 1; i < primes.size(); ++i) 17 | if(m[primes[i] + primes[i-1] + 1]) res++; 18 | if(res < k) cout << "NO\n"; 19 | else cout << "YES\n"; 20 | } 21 | 22 | void sieve(int size) { 23 | bitset<100010> was; 24 | was.set(); 25 | was[0] = was[1] = 0; 26 | for (int i = 2; i <= size; i++) 27 | if (was[i]) { 28 | primes.push_back(i); 29 | m[i] = 1; 30 | for (int j = i * i; j <= size; j += i) was[j] = 0; 31 | } 32 | check(); 33 | } 34 | 35 | int main(){ 36 | 37 | cin >> n >> k; 38 | sieve(n); 39 | 40 | } -------------------------------------------------------------------------------- /HackerRank/Competitions/RookieRank/Antiprime Numbers.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/contests/rookierank/challenges/antiprime-numbers 2 | #include 3 | #include 4 | #include 5 | using namespace std; 6 | int main() { 7 | 8 | int arr[80] = {1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260,1680,2520,5040,7560,10080 9 | ,15120,20160,25200,27720,45360,50400,55440,83160,110880,166320,221760,277200,332640,498960 10 | ,554400,665280,720720,1081080,1441440,2162160,2882880,3603600,4324320,6486480,7207200,8648640 11 | ,10810800,14414400,17297280,21621600,32432400,36756720,43243200,61261200,73513440,110270160,122522400,147026880}; 12 | 13 | int a, b; 14 | cin >> a; 15 | while(a--){ 16 | cin >> b; 17 | for(int i = 0; i < 80; ++i){ 18 | if(arr[i] >= b){ 19 | cout << arr[i] << endl; 20 | break; 21 | } 22 | } 23 | } 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /HackerRank/Competitions/RookieRank/Birthday Cake Candles.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/contests/rookierank/challenges/birthday-cake-candles 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | 9 | 10 | int main() { 11 | int n, mm, max = 0, count= 0; 12 | cin >> n; 13 | for(int i = 0 ; i < n ; ++i){ 14 | int a ; 15 | cin >> a; 16 | if(a >= max){ 17 | mm = a; 18 | if(mm != max)count = 0; 19 | max = a; 20 | count++; 21 | } 22 | } 23 | cout << count; 24 | 25 | return 0; 26 | } 27 | 28 | -------------------------------------------------------------------------------- /HackerRank/Competitions/RookieRank/Counting Valleys.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/contests/rookierank/challenges/counting-valleys 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | 9 | 10 | int main() { 11 | int n; 12 | cin >> n; 13 | int place = 0; 14 | bool was = true; 15 | int valley = 0; 16 | for(int i = 0 ; i < n ; ++i){ 17 | char a; 18 | cin >> a; 19 | if(a == 'U'){ 20 | place++; 21 | }else if(a == 'D'){ 22 | place--; 23 | } 24 | if(place < 0 && was){ 25 | valley++; 26 | was = false; 27 | }if(place >= 0){ 28 | was = true; 29 | } 30 | } 31 | cout << valley; 32 | 33 | return 0; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /HackerRank/Competitions/RookieRank/Extremely Dangerous Virus.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/contests/rookierank/challenges/extremely-dangerous-virus 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | 9 | int main() { 10 | unsigned long long int a,b,t,x,res=1; 11 | unsigned int M = 1000000007; 12 | 13 | scanf ("%llu %llu %llu", &a, &b, &t); 14 | x = (a+b)/2; 15 | while (t > 0) { 16 | if (t%2) 17 | res = (res*x)%M; 18 | t = t/2; 19 | x = (x*x)%M; 20 | } 21 | printf ("%llu",res); 22 | 23 | return 0; 24 | 25 | } -------------------------------------------------------------------------------- /HackerRank/Competitions/RookieRank/Magic Square Forming.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/contests/rookierank/challenges/magic-square-forming 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | int arr[4][4]; 9 | int main() { 10 | int m = 99999; 11 | int matrix1[8][3][3] ={{{4,9,2}, 12 | {3,5,7}, 13 | {8,1,6}}, 14 | {{8,1,6}, 15 | {3,5,7}, 16 | {4,9,2}}, 17 | {{2,7,6}, 18 | {9,5,1}, 19 | {4,3,8}}, 20 | {{8,3,4}, 21 | {1,5,9}, 22 | {6,7,2}}, 23 | {{4,3,8}, 24 | {9,5,1}, 25 | {2,7,6}}, 26 | {{6,7,2}, 27 | {1,5,9}, 28 | {8,3,4}}, 29 | {{6,1,8}, 30 | {7,5,3}, 31 | {2,9,4}}, 32 | {{2,9,4}, 33 | {7,5,3}, 34 | {6,1,8}} 35 | }; 36 | 37 | for(int i= 0 ; i < 3 ; ++i){ 38 | for(int j= 0 ; j < 3 ; ++j){ 39 | cin >> arr[i][j]; 40 | } 41 | } 42 | int dif, holdK; 43 | for(int k = 0 ; k < 8 ; ++k){ 44 | dif = 0; 45 | for(int i= 0 ; i < 3 ; ++i){ 46 | for(int j= 0 ; j < 3 ; ++j){ 47 | if(arr[i][j] != matrix1[k][i][j]){ 48 | dif += abs(matrix1[k][i][j] - arr[i][j]); 49 | } 50 | } 51 | } 52 | if(dif < m){ 53 | m = dif; 54 | } 55 | } 56 | cout << m; 57 | 58 | 59 | return 0; 60 | } 61 | 62 | -------------------------------------------------------------------------------- /HackerRank/Competitions/Week Code 23/Gears of War.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | int t, n; 8 | 9 | int main() { 10 | 11 | cin >> t; 12 | while(t--){ 13 | cin >> n; 14 | if(n % 2 == 1) cout << "No" << endl; 15 | else cout << "Yes" << endl; 16 | } 17 | 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /HackerRank/Competitions/Week Code 23/Tresure Hunting.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | 9 | 10 | int main() { 11 | 12 | double a,b,x,y; 13 | double k,t; 14 | 15 | cin >> x >> y >> a >> b; 16 | 17 | k = (a*y-b*x)/(a*a+b*b); 18 | t = (x+b*k)/a; 19 | cout << fixed; 20 | cout << setprecision(12) << t << endl << setprecision(12) << k; 21 | 22 | return 0; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /HackerRank/Competitions/Week Code 23/Unexpected Problem.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | #define mxNUM 100099 6 | 7 | string T, P; 8 | 9 | int b[mxNUM], n, m; 10 | 11 | void kmp_pre(){ 12 | int i = 0, j = -1; b[0] = -1; 13 | while (i < m) { while (j >= 0 && P[i] != P[j]) j = b[j]; i++; j++; b[i] = j; } 14 | } 15 | 16 | bool KMP(string sttr) { 17 | 18 | int i = 0, j = 0, y = -m; 19 | 20 | while (i < n){ 21 | while (j >= 0 && T[i] != P[j]) j = b[j]; i++; j++; 22 | if (j == m) { if (y + m != i - j) return false; y = i - j; j = b[j]; } 23 | } 24 | 25 | if (y + m == n) return true; 26 | else return false; 27 | } 28 | 29 | int main(){ 30 | int x, key; 31 | 32 | cin >> T >> x; 33 | 34 | n = T.length(); 35 | 36 | int counter = 0; 37 | while (counter < n){ 38 | 39 | P += T[counter]; 40 | m = counter + 1; 41 | memset(b, 0, sizeof(b)); 42 | kmp_pre(); 43 | if (KMP(T)){ key = m; break; }counter++; 44 | 45 | } 46 | 47 | cout << x / key << endl; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /HackerRank/Competitions/Week Code 23/lighthouse.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace std; 7 | 8 | char graph[53][53]; 9 | bool was[53][53]; 10 | int n, check, maxx = 0; 11 | 12 | int bn(int x, int y){ 13 | 14 | int i = 0; 15 | while(true){ 16 | if (x + i < n && graph[x+i][y] == '.' && x - i >= 0 && graph[x-i][y] == '.' && 17 | y + i < n && graph[x][y+i] == '.' && y - i >= 0 && graph[x][y-i] == '.') 18 | i++; 19 | else break; 20 | } 21 | return i; 22 | } 23 | 24 | void bfs (int i, int j, int r, int cX, int cY) { 25 | double lenght = sqrt((i - cX)*(i - cX) + (j - cY)*(j - cY)); 26 | 27 | if (graph[i][j] != '.' && lenght<=r){ 28 | check = -1; 29 | return; 30 | } 31 | 32 | if( i < 0 33 | || i >= n 34 | || j < 0 35 | || j >= n 36 | || was[i][j] 37 | || graph[i][j] != '.' 38 | || lenght > r) 39 | return; 40 | 41 | was[i][j] = true; 42 | 43 | bfs(i-1, j, r, cX, cY); 44 | bfs(i+1, j, r, cX, cY); 45 | bfs(i, j-1, r, cX, cY); 46 | bfs(i, j+1, r, cX, cY); 47 | } 48 | 49 | int main(){ 50 | cin >> n; 51 | for (int i = 0; i < n ; ++i) 52 | for (int j = 0 ; j < n ; ++j) 53 | cin >> graph[i][j]; 54 | 55 | for (int i = 0 ; i < n ; ++i) 56 | for (int j = 0 ; j < n ; ++j){ 57 | if (graph[i][j] == '.'){ 58 | 59 | int b = bn(i, j) - 1; 60 | 61 | check = 1; 62 | 63 | memset(was, false, sizeof(was)); 64 | 65 | 66 | bfs(i, j, b, i, j); 67 | 68 | if (check == 1){ 69 | maxx = max(maxx, b); 70 | } 71 | } 72 | } 73 | 74 | cout << maxx << endl; 75 | 76 | return 0; 77 | } -------------------------------------------------------------------------------- /HackerRank/Competitions/World Codesprint 6/Abbreviation.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | - Hackerrank World CodeSprint 6 3 | - Abbreviation 4 | 5 | https://www.hackerrank.com/contests/world-codesprint-6/challenges/abbr 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | using namespace std; 15 | string s1,s2; 16 | int t; 17 | vector s1_uppers; 18 | bool was[1001]; 19 | int main() { 20 | 21 | cin >> t; 22 | while(t--){ 23 | cin >> s1 >> s2; 24 | for(int i = 0; i < s1.size() ; ++i){ 25 | if(isupper(s1[i])) s1_uppers.push_back(s1[i]); 26 | s1[i] = toupper(s1[i]); 27 | } 28 | bool check, NOO = true; 29 | memset(was, false, sizeof was); 30 | for(vector::iterator it = s1_uppers.begin(); it != s1_uppers.end(); ++it){ 31 | check = true; 32 | for(int i = 0; i < s2.size() ; ++i){ 33 | //cout << s2[i] << " " << *it << endl; 34 | if(s2[i] == *it && !was[i]){ 35 | check = false; 36 | was[i] = true; 37 | //cout << endl; 38 | break; 39 | } 40 | 41 | } 42 | if(check){ 43 | NOO = false; 44 | break; 45 | } 46 | } 47 | 48 | int m = 0; 49 | int i = 0; 50 | for(int j = 0 ; j < s1.size() ; ++j){ 51 | if(s1[j] == s2[i]){ 52 | i++; 53 | if(i == s2.size()) break; 54 | } 55 | } 56 | 57 | if(i == s2.size() && NOO) cout << "YES" << endl; 58 | else cout << "NO" << endl; 59 | 60 | s1_uppers.clear(); 61 | s1.clear(); 62 | 63 | } 64 | 65 | return 0; 66 | } -------------------------------------------------------------------------------- /HackerRank/Competitions/World Codesprint 6/Beautiful 3 Set.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | - Hackerrank World CodeSprint 6 3 | - Beautiful 3 Set 4 | 5 | https://www.hackerrank.com/contests/world-codesprint-6/challenges/beautiful-3-set 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | using namespace std; 14 | int n, z; 15 | int counterX[301], counterY[301], counterZ[301]; 16 | int arr[301][3]; 17 | int main() { 18 | 19 | cin >> n; 20 | int ans = 0; 21 | for(int i = 0 ; i <= n ; ++i){ 22 | for(int j = n-1 ; j >= 0 ; --j){ 23 | z = n-i-j; 24 | //cout << i << " " << j << " " << z << endl; 25 | if(!counterX[i] && !counterY[j] && !counterZ[z] && z >= 0){ 26 | counterX[i] = 1; 27 | counterY[j] = 1; 28 | counterZ[z] = 1; 29 | arr[ans][0] = i; 30 | arr[ans][1] = j; 31 | arr[ans++][2] = z; 32 | } 33 | } 34 | } 35 | 36 | cout << ans << endl; 37 | for(int i = 0 ; i < ans ; ++i){ 38 | for(int j = 0 ; j < 3 ; ++j){ 39 | cout << arr[i][j] << " "; 40 | }cout << endl; 41 | } 42 | 43 | return 0; 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /HackerRank/Competitions/World Codesprint 6/Bon Appétit.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | - Hackerrank World CodeSprint 6 3 | - Bon Appétit 4 | 5 | https://www.hackerrank.com/contests/world-codesprint-6/challenges/bon-appetit 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | using namespace std; 14 | int n, k, paid; 15 | 16 | int main() { 17 | 18 | cin >> n >> k; 19 | int arr[n]; 20 | int res = 0; 21 | for(int i = 0; i < n ; ++i){ 22 | cin >> arr[i]; 23 | if(i == k); 24 | else res += arr[i]; 25 | } 26 | res /= 2; 27 | cin >> paid; 28 | 29 | if(res == paid) cout << "Bon Appetit" << endl; 30 | else cout << paid-res << endl; 31 | 32 | 33 | return 0; 34 | } -------------------------------------------------------------------------------- /HackerRank/Competitions/World Codesprint 6/Bonetrousle.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | - Hackerrank World CodeSprint 6 3 | - Bonetrousle 4 | 5 | https://www.hackerrank.com/contests/world-codesprint-6/challenges/bonetrousle 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #define pb push_back 14 | using namespace std; 15 | typedef long long ll; 16 | ll n, k, f, s, rem; 17 | int t, b; 18 | vector v; 19 | int main() { 20 | 21 | cin >> t; 22 | while(t--){ 23 | 24 | cin >> n >> k >> b; 25 | ll div = n/b; 26 | rem = n%b; 27 | ll mx = 0; 28 | ll mn = 0x7fffffff; 29 | // b*div+rem = n 30 | for(int i = 0 ; i < b/2 ; ++i){ 31 | f = div + i + 1; 32 | s = div - i - 1; 33 | mx = max(f,s); 34 | mn = min(f,s); 35 | v.pb(f); 36 | v.pb(s); 37 | } 38 | if(b % 2 == 1) 39 | v.pb(div); 40 | 41 | ll maxK = k; 42 | ll pos = v.size()-1; 43 | bool ok = true; 44 | sort(v.begin(), v.end()); 45 | while(rem && pos != -1){ 46 | if(v[pos] < maxK){ 47 | v[pos]++; 48 | rem--; 49 | } 50 | else{ 51 | pos--; 52 | maxK--; 53 | } 54 | if(pos == -1) ok = false; 55 | } 56 | mx = max(mx, v.front()); 57 | if(mx > k || mn <= 0 || !ok) cout << "-1" << endl; 58 | else{ 59 | 60 | for(vector::iterator it = v.begin() ; it != v.end() ; ++it ){ 61 | 62 | if(*it == v[v.size()-1] ) 63 | cout << *it; 64 | else 65 | cout << *it << " "; 66 | }cout << endl; 67 | 68 | } 69 | v.clear(); 70 | } 71 | 72 | return 0; 73 | } 74 | 75 | -------------------------------------------------------------------------------- /HackerRank/Competitions/World Codesprint 6/Combination Lock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | - Hackerrank World CodeSprint 6 3 | - Combination Lock 4 | 5 | https://www.hackerrank.com/contests/world-codesprint-6/challenges/combination-lock 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | using namespace std; 14 | int ord[5], ord2[5], diff; 15 | 16 | int main() { 17 | 18 | for(int i = 0 ; i < 5 ; ++i) 19 | cin >> ord[i]; 20 | for(int i = 0 ; i < 5 ; ++i) 21 | cin >> ord2[i]; 22 | 23 | int res = 0; 24 | int diff; 25 | for(int i = 0 ; i < 5 ; ++i){ 26 | diff = abs(ord[i] - ord2[i]); 27 | //cout << diff << " " << 9-diff << " " << endl; 28 | res += min(10-diff, diff); 29 | } 30 | 31 | cout << res << endl; 32 | 33 | return 0; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /HackerRank/Competitions/World Codesprint 6/Flipping the Matrix.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | - Hackerrank World CodeSprint 6 3 | - Flipping the Matrix 4 | 5 | https://www.hackerrank.com/contests/world-codesprint-6/challenges/flipping-the-matrix 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | using namespace std; 14 | int t, n, a; 15 | int main() { 16 | 17 | cin >> t; 18 | while(t--){ 19 | cin >> n; 20 | int arr[2*n][2*n]; 21 | for(int i = 0; i < 2*n; ++i){ 22 | for(int j = 0; j < 2*n; ++j){ 23 | cin >> a; 24 | arr[i][j] = a; 25 | } 26 | } 27 | int m = 5; 28 | while(m--) 29 | for(int i = 0; i < n; ++i) 30 | for(int j = 0; j < n; ++j){ 31 | arr[i][j] = max(arr[i][j], max(arr[2*n-1-i][j], max(arr[i][2*n-1-j], arr[2*n-1-i][2*n-1-j]))); 32 | } 33 | 34 | 35 | int res = 0; 36 | for(int i = 0; i < n; ++i) 37 | for(int j = 0; j < n; ++j) 38 | res += arr[i][j]; 39 | 40 | cout << res << endl; 41 | } 42 | 43 | return 0; 44 | } -------------------------------------------------------------------------------- /HackerRank/Competitions/World Codesprint 6/README.md: -------------------------------------------------------------------------------- 1 | # Hackerrank World Codesprint 6 2 | 3 | Here are my solutions for Hackerrank - World Codesprint 6 4 | 5 | Here is the full contest if anyone interested https://www.hackerrank.com/contests/world-codesprint-6/challenge 6 | 7 | The _Beautiful 3 Set_ and _Bonetrousle_ solutions are not fully correct, I just put them to show how I think the solution might be. -------------------------------------------------------------------------------- /HackerRank/Competitions/World Codesprint 9/Grading Students.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | void calc(int x){ 9 | int t = x; 10 | if(x < 38) cout << x << endl; 11 | else{ 12 | while(t++ % 5 != 0); 13 | if(--t - x < 3) cout << t << endl; 14 | else cout << x << endl; 15 | } 16 | } 17 | 18 | int main() { 19 | int n, k; 20 | cin >> n; 21 | for (int i = 0; i < n ; ++i){ 22 | cin >> k; 23 | calc(k); 24 | } 25 | return 0; 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /HackerRank/Competitions/World Codesprint 9/Queen's Attack 2.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | 9 | int main() { 10 | int n , k , xq, yq, x ,y; 11 | cin >> n >> k >> xq >> yq; 12 | int d = yq-1, u = n-yq, l = xq-1, r = n-xq, ur = min(n-xq, n-yq), ul = min(xq-1, n-yq), dl = min(xq-1, yq-1), dr = min(n-xq, yq-1); 13 | // cout << u << " " << ur << " " << r << " " << dr << " " << d << " " << dl << " " << l << " " << ul << endl; 14 | for(int i = 0 ; i < k ; ++i){ 15 | cin >> x >> y; 16 | if(y == yq){ 17 | if(x < xq) l = min(l, xq - x - 1); 18 | else r = min(r, x - xq - 1); 19 | } 20 | 21 | if(x == xq){ 22 | if(y > yq) u = min(u, y - yq - 1); 23 | else d = min(d, yq - y - 1); 24 | } 25 | 26 | if(yq - xq == y - x){ 27 | if(y < yq) dl = min(dl, yq - y - 1); 28 | else ur = min(ur, y - yq - 1); 29 | } 30 | 31 | if(yq + xq == y + x){ 32 | if(y < yq) ul = min(ul, yq - y - 1); 33 | else dr = min(dr, y - yq - 1); 34 | } 35 | 36 | } 37 | // cout << u << " " << ur << " " << r << " " << dr << " " << d << " " << dl << " " << l << " " << ul << endl; 38 | cout << u + ur + r + dr + d + dl + l + ul << endl; 39 | 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /HackerRank/Competitions/World Codesprint 9/Weighted Uniform Strings.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | int ctArr[100000005]; 8 | 9 | int main() { 10 | string s; 11 | cin >> s; // ascii 'a' is #97 12 | char hold = s[0]; 13 | int times = 0; 14 | for(int i = 0; i < s.size() ; ++i){ 15 | if(s[i] == hold){ 16 | times++; 17 | ctArr[times * (int(s[i]) - 96)]++; 18 | } 19 | else{ 20 | times = 1; 21 | ctArr[int(s[i]) - 96]++; 22 | hold = s[i]; 23 | } 24 | } 25 | int n, t; 26 | cin >> n; 27 | for(int i = 0 ; i < n; ++i){ 28 | cin >> t; 29 | if(ctArr[t])cout << "Yes\n"; 30 | else cout << "No\n"; 31 | } 32 | 33 | return 0; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Bit Manipulation/flippingBits.c: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/flipping-bits 2 | #include 3 | #include 4 | #include 5 | int j,n; 6 | int main(){ 7 | 8 | int32_t i; 9 | scanf("%d",&n); 10 | for(j=0;j 3 | #include 4 | #include 5 | #include 6 | #include 7 | int a[1001], i, n, m; 8 | int main() { 9 | 10 | scanf("%d", &n); 11 | 12 | for(i=0;i 3 | #include 4 | #include 5 | #include 6 | #include 7 | int max, i, j; 8 | int maxXor(int l, int r) { 9 | 10 | for(i=l;i<=r;i++){ 11 | for(j=l;j<=r;j++){ 12 | if((i^j) >= max){ 13 | max = i^j; 14 | //printf("%d\n",max); 15 | } 16 | }//printf("\n%d\n",max); 17 | } 18 | return max; 19 | 20 | } 21 | int main() { 22 | int res; 23 | int l; 24 | scanf("%d", &l); 25 | 26 | int r; 27 | scanf("%d", &r); 28 | 29 | res = maxXor(l, r); 30 | printf("%d", res); 31 | 32 | return 0; 33 | } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Dynamic Programming/Candies.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | long int n , a, result = 0; 6 | 7 | int main() { 8 | 9 | cin >> n; 10 | vector vc; 11 | for(int i = 0 ; i < n ; ++i){ 12 | cin >> a; 13 | vc.push_back(a); 14 | } 15 | vector d(n, 1); 16 | for(long int i = 1 ; i < n ; ++i){ 17 | if(vc[i] > vc[i-1]) 18 | d[i] = d[i-1] + 1; 19 | } 20 | 21 | for(long int i = n-2 ; i >= 0 ; --i) 22 | if(vc[i] > vc[i+1]) 23 | d[i] = max(d[i],d[i+1] + 1); 24 | 25 | for(long int i: d) 26 | result += i; 27 | 28 | cout << result; 29 | return 0; 30 | } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Dynamic Programming/Fibonacci Modified.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | import java.math.BigInteger; 4 | 5 | public class Solution { 6 | 7 | public static void main(String[] args) { 8 | 9 | Scanner sc = new Scanner(System.in); 10 | 11 | BigInteger t1 = new BigInteger(sc.next()); 12 | BigInteger t2 = new BigInteger(sc.next()); 13 | int n = sc.nextInt(); 14 | BigInteger holder = new BigInteger("0"); 15 | 16 | for(int i = 0 ; i < n-2 ; ++i){ 17 | 18 | holder = t2; 19 | t2 = t1.add(t2.multiply(t2)); 20 | //System.out.println(t2); 21 | t1 = holder; 22 | 23 | } 24 | 25 | System.out.println(t2); 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Dynamic Programming/Maximum Subarray.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | int t, n; 8 | int kadane(int * arr, int n){ 9 | int cmx = arr[0], gmx = arr[0]; 10 | for(int i = 1 ; i < n ; ++i){ 11 | cmx = max(arr[i], arr[i]+cmx); 12 | if(cmx >= gmx) gmx = cmx; 13 | } 14 | return gmx; 15 | } 16 | 17 | int main() { 18 | 19 | cin >> t; 20 | while(t--){ 21 | cin >> n; 22 | int arr[n+1]; 23 | int maxx = 0; 24 | int topmin = -99999; 25 | for(int i = 0 ; i < n ; ++i){ 26 | cin >> arr[i]; 27 | if(arr[i] < 0 && topmin < arr[i]) topmin = arr[i]; 28 | if(arr[i] >= 0) maxx += arr[i]; 29 | } 30 | if(maxx == 0 && topmin != -99999) maxx = topmin; 31 | cout << kadane(arr, n) << " " << maxx << endl; 32 | 33 | } 34 | 35 | 36 | return 0; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Dynamic Programming/The Longest Increasing Subsequence.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Longest increasing Subsequence - O(NlogN) 3 | */ 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | int binSearch (vector v, int l, int h, int key){ 9 | while (h-l > 1) { 10 | int m = l + (h-l)/2; 11 | if (v[m] >= key) h = m; 12 | else l = m; 13 | } 14 | return h; 15 | } 16 | 17 | int main (){ 18 | int n; 19 | cin >> n; 20 | 21 | vector vc; 22 | int a; 23 | for(int i = 0; i < n; ++i) { 24 | scanf("%d", &a); 25 | vc.push_back(a); 26 | } 27 | 28 | vector last; 29 | 30 | int size = 1; 31 | 32 | last.push_back(0); 33 | last[0] = vc[0]; 34 | for (vector::iterator it = vc.begin()+1; it != vc.end(); ++it) { 35 | if (*it < last[0]) 36 | last[0] = *it; 37 | else if (*it > last[size-1]){ 38 | last.push_back(*it); 39 | size++; 40 | // last[size++] = *it; 41 | } 42 | else 43 | last[binSearch(last, -1, size-1, *it)] = *it; 44 | } 45 | 46 | printf("%d", size); 47 | //cout << size << endl; 48 | 49 | } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Graph Theory/Breadth First Search _ Shortest Reach.cpp: -------------------------------------------------------------------------------- 1 | #include #include #include #include #define maxNum 1001 using namespace std; vector ways[maxNum]; int line[maxNum]; int n, m, a, b, i, v, u, strt; queue holder; int main(){ int t; cin >> t; while(t--){ cin >> n >> m; memset(line, -1, sizeof(line)); for (i = 0 ; i < m ; ++i) { cin >> a >> b; ways[a].push_back(b); ways[b].push_back(a); } cin >> strt; line[strt] = 0; holder.push(strt); while (!holder.empty()) { u = holder.front(); for (int i = 0 ; i < ways[u].size() ; ++i) { v = ways[u][i]; if (line[v] == -1) { //cout << v << " "; line[v] = line[u] + 1; holder.push(v); } } holder.pop(); } // We will print how far is the nodes to the start point for (i = 1; i <= n ; ++i){ if(line[i] == 0)continue; else if(line[i] == -1)cout << line[i] << " "; else cout << line[i]*6 << " "; } cout << endl; for (i = 0 ; i < n ; ++i){ line[i] = -1; ways[i].clear(); } } } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Graph Theory/Dijkstra_Shortest Reach 2.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/dijkstrashortreach #include #include #include #define inf 0x7fffffff using namespace std; int arr[3001][3001]; bool was[3001]; int d[3001]; int main() { int t; cin >> t; while(t--){ int n, m, s, a ,b, k; cin >> n >> m; for(int i = 1 ; i <= n ; ++i){ d[i] = inf; was[i] = false; } memset(arr, -1, sizeof arr); for(int i = 0; i < m ; ++i){ cin >> a >> b >> k; if(arr[a][b] > k || arr[a][b] == -1){ arr[a][b] = k; arr[b][a] = k; } } cin >> s; d[s] = 0; int ct = n; while(ct--){ for(int i = 1; i <= n; ++i) if(arr[s][i] != -1 && d[i] > d[s] + arr[s][i]) d[i] = d[s] + arr[s][i]; was[s] = true; int min = inf; for(int i = 1; i <= n; ++i) if(min > d[i] && !was[i]){ min = d[i]; s = i; } } for(int i = 1 ; i <= n ; ++i){ if(d[i] == 0); else if(d[i] == inf) cout << "-1 "; else cout << d[i] << " "; }cout << endl; } return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Graph Theory/Even Tree.c: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/even-tree #include int g[1001][1001]; int cnt[1001]; int was[1001]; int a,b,i,result=0; void dfs(int x, int n, int m); int main () { int n,m; scanf("%d %d",&n,&m); for ( i=0 ; i 3 | #include 4 | #define INF 999999 5 | using namespace std; 6 | int arr[405][405]; 7 | int main () { 8 | 9 | int n, m; 10 | // Given a dataset 11 | cin >> n >> m; // Node, way 12 | 13 | for (int i = 0; i <= n+1; ++i) 14 | for (int j = 0; j <= n+1; ++j) 15 | arr[i][j] = INF; 16 | 17 | for (int i = 0; i < m; ++i) { 18 | int a, b, c; 19 | //cin >> a >> b >> c; 20 | scanf("%d%d%d", &a, &b, &c); 21 | arr[a][b] = c; 22 | } 23 | 24 | 25 | // Algo 26 | for (int k = 1; k <= n; ++k) 27 | for (int i = 1; i <= n; ++i) 28 | if (arr[i][k]) 29 | for (int j = 1; j <= n; ++j) 30 | if ( arr[k][j] && i != j ) 31 | if (arr[i][j] > arr[i][k] + arr[k][j]) 32 | arr[i][j] = arr[i][k] + arr[k][j]; 33 | // 34 | 35 | int t; 36 | cin >> t; 37 | while(t--){ 38 | // Distance between st - fin 39 | int st, fin; 40 | cin >> st >> fin; 41 | if(st == fin) // cout << "0" << endl; 42 | printf("0\n"); 43 | else if(arr[st][fin] >= INF) // cout << "-1" << endl; 44 | printf("-1\n"); 45 | else // cout << arr[st][fin] << endl; 46 | printf("%d\n", arr[st][fin]); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Greedy/Mark and Toys.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | int main() 7 | { 8 | long long n, k; cin >> n >> k; 9 | vector prices; 10 | for(int i = 0; i < n; i++) 11 | { 12 | int p; cin >> p; 13 | prices.push_back(p); 14 | } 15 | 16 | sort(prices.begin(), prices.end()); 17 | int answer = 0; 18 | int i = 0; 19 | while(k >= 0 && answer <= n){ 20 | k = k - prices[i++]; 21 | answer++; 22 | } 23 | 24 | cout << answer-1 << endl; 25 | 26 | return 0; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Cavity Map.c: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/cavity-map #include #include #include int grid[101][101]; int main() { int n,i,j; char arr[101]; scanf("%d",&n); for (i=0; igrid[i-1][j] && grid[i][j]>grid[i][j-1] && grid[i][j]>grid[i][j+1] && grid[i][j]>grid[i+1][j]) { printf("X"); } else printf("%d",grid[i][j]); } printf("\n"); } return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Chocolate Feast.c: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/chocolate-feast #include #include #include #include int myWrappers,leftWrappers,extraChoc,newWrappers; int t, n, c, m, i; int main() { scanf("%d", &t); for (i=0; i=m); printf("%d\n",answer); } return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Divisible Sum Pairs.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/divisible-sum-pairs #include #include using namespace std; int main(){ int n; int k; cin >> n >> k; vector a(n); for(int a_i = 0;a_i < n;a_i++){ cin >> a[a_i]; } int count = 0; for(int i = 0 ; i < n ; ++i){ for(int j = i+1 ; j < n ; ++j){ if((a[i]+a[j]) % k == 0)count++; } } cout << count << endl; return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Equal Stacks.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/equal-stacks #include #include #include using namespace std; int main(){ int n1; int n2; int n3; cin >> n1 >> n2 >> n3; queue que1; queue que2; queue que3; bool ok = false; int a, total1 = 0, total2 = 0, total3 = 0 ; for(int h1_i = 0;h1_i < n1;h1_i++){ cin >> a; que1.push(a); total1 += a; } for(int h2_i = 0;h2_i < n2;h2_i++){ cin >> a; que2.push(a); total2 += a; } for(int h3_i = 0;h3_i < n3;h3_i++){ cin >> a; que3.push(a); total3 += a; } while(!que1.empty() && !que2.empty() && !que3.empty()){ if(total1 == total2 && total2 == total3){ ok = true; cout << total1 << endl; break; }else{ int m = max(total1, max(total2, total3)); if(m == total1){ total1 -= que1.front(); que1.pop(); }else if(m == total2){ total2 -= que2.front(); que2.pop(); }else if(m == total3){ total3 -= que3.front(); que3.pop(); } } } if(!ok)cout << "0" << endl; return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Extra Long Factorial.cpp: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/extra-long-factorials?h_r=internal-search 2 | #include 3 | using namespace std; 4 | 5 | int num[3], fact[200], sum[200]; 6 | 7 | int main () 8 | { 9 | int n, number, hand = 0; 10 | int bNum, bFact, bSum, i, j, x; 11 | 12 | cin >> n; 13 | 14 | bFact = 1; 15 | fact[0] = 1; 16 | for (number=2; number<=n; number++) 17 | { 18 | for (i=0,j=number; j!=0; num[i]=j%10,j/=10,i++); 19 | bNum = i; 20 | 21 | for (i=0; i=0; i--) 39 | cout << fact[i]; 40 | cout << endl; 41 | 42 | return 0; 43 | } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Jumping on the Clouds Revisited.c: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/jumping-on-the-clouds-revisited #include int main(){ int n; int k; scanf("%d %d",&n,&k); int *c = malloc(sizeof(int) * n); for(int c_i = 0; c_i < n; c_i++){ scanf("%d",&c[c_i]); } int e= 100; int i = 0 ; do{ if(c[i] == 1) e -= 2; e -= 1; i = (i+k)%n; }while(i != 0); printf("%d\n", e); return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Jumping on the Clouds.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/jumping-on-the-clouds #include #include using namespace std; int main(){ int n; cin >> n; vector arr(n); for(int i = 0; i < n ; ++i){ cin >> arr[i]; } int count = 0; for(int i = 0; i < n ; ++i){ if(!arr[i+2]) i++; count++; } if(count == 1)cout << count; else cout << count-1 ; return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Kangaroo.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/kangaroo #include using namespace std; int main(){ int x1; int v1; int x2; int v2; cin >> x1 >> v1 >> x2 >> v2; set st; int count = 0; bool did = false; if((v1 >= v2 && x1 > x2) || (v1 <= v2 && x1 < x2)); else{ for(int i = 1; i <= 10000 ; ++i){ if(x1 + v1*i == x2 + v2*i){ did = true; break; } } } if(did) cout << "YES" << endl; else cout << "NO" << endl; return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Lisa's Workbook.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/lisa-workbook #include #include #include #include #include using namespace std; int main() { int n,k; cin >> n >> k; int holder[n]; for(int i = 0 ; i < n ; ++i){ cin >> holder[i]; } int count = 0; int pages[1001][1001]; int j = 1; bool ok = false; for(int i = 0 ; i < n ; ++i){ int a = 1; int f = 1; int ct = holder[i]; while(ct--){ ok = true; pages[j][f] = a++; // cout << j << " - page / f - " << f << " a - " << a-1 << endl; if(j == a-1)count++; if(f == k){ j++; f = 0; ok = false; } f++; } if(ok)j++; } cout << count; return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Minimum Distances.cpp: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/minimum-distances #include #define inf 9999 using namespace std; int main(){ int n; cin >> n; int A[100001]; int a; memset(A, -1, sizeof A); int mx = inf; for(int i = 1;i <= n;i++){ cin >> a; if(A[a] == -1) A[a]=i; else{ mx = min(mx , i - A[a]); A[a] = i; } } if( mx != inf) cout << mx; else cout << "-1"; return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Sherlock and Array.c: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/sherlock-and-array #include #include #include #include int k,i,j,n; int a[200001]; int main() { scanf("%d",&k); for( i = 0; i < k ; i++){ int sum[200001]={0}; scanf("%d",&n); for( j = 0; j < n ; j++){ scanf("%d",a+j); if (j == 0) sum[j]=a[j]; else sum[j]=sum[j-1]+a[j]; } // for (i=0; isum[n-1]-sum[mid]) fnsh=mid-1; else strt=mid+1; } if(posofans == -1) printf("NO\n"); else printf("YES\n"); } return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Implementation/Taum and B'day.c: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/taum-and-bday #include #include #include #include #include #include #include long res; int main(){ int t; scanf("%d",&t); while(t--){ long b; long w; scanf("%ld %ld",&b,&w); long x; long y; long z; scanf("%ld %ld %ld",&x,&y,&z); res = 0; res += x+z 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | 10 | int ar[1005]; 11 | vector > sortedVc; 12 | 13 | bool binSearch(vector > vc, int l, int r, int key, int i) { 14 | 15 | 16 | while(r-l > 1){ 17 | int mid = l + (r-l) / 2; 18 | if(vc[mid].first == key && vc[mid].second != i){ 19 | printf("%d %d\n", min(i+1,vc[mid].second+1), max(i+1,vc[mid].second+1)); 20 | return true; 21 | } 22 | else if(vc[mid].first >= key) r = mid; 23 | else l = mid; 24 | } 25 | 26 | return false; 27 | } 28 | 29 | int main () { 30 | 31 | int t, m, n; 32 | cin >> t; 33 | 34 | while(t--){ 35 | 36 | cin >> m >> n; 37 | 38 | // Input 39 | for (int i= 0 ; i < n ; ++i){ 40 | cin >> ar[i]; 41 | pair p(ar[i], i); // Pair for holding the position 42 | sortedVc.push_back(p); 43 | } 44 | 45 | // Sorting 46 | sort(sortedVc.begin(), sortedVc.end()); 47 | 48 | // Searching 49 | for (int i= 0 ; i < n ; ++i){ 50 | if(binSearch(sortedVc, 0, n-1, m-ar[i], i)) 51 | break; 52 | } 53 | 54 | sortedVc.clear(); 55 | } 56 | 57 | } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Sorting/Correctness and the Loop Invariant.cpp: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/correctness-invariant 2 | #include 3 | 4 | void insertionSort(int N, int arr[]) { 5 | int i,j; 6 | int value; 7 | for(i=1;i=0 && value= 0 12 | { 13 | arr[j+1]=arr[j]; 14 | j=j-1; 15 | } 16 | arr[j+1]=value; 17 | } 18 | for(j=0;j 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | int i,n; 9 | 10 | int main() { 11 | 12 | cin >> n; 13 | 14 | int arr[n]; 15 | int counter[100] = {0}; 16 | 17 | for (i=0 ; i> arr[i]; 19 | counter[arr[i]]++; 20 | } 21 | 22 | for (i=0 ; i<100 ; i++) { 23 | cout << counter[i] << " "; 24 | } 25 | 26 | return 0; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Sorting/Counting Sort 2.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/countingsort2 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | int i; 9 | void sort(int* arr, int n){ 10 | 11 | int counter[100] = {0}; 12 | 13 | for (i=0; i> n; 30 | 31 | int arr[n]; 32 | 33 | for(i=0;i> arr[i]; 35 | 36 | sort(arr, n); 37 | 38 | for(i=0;i 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | int i; 9 | void count_sort(int* arr, int n){ 10 | 11 | int counter[100] = {0}; 12 | 13 | for (i=0; i> n; // Array's size 30 | int arr[n]; 31 | string s; 32 | 33 | for(i = 0 ; i < n ; i++) 34 | cin >> arr[i] >> s; 35 | 36 | count_sort(arr, n); 37 | 38 | return 0; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Sorting/CountingSort4.java: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/countingsort4 2 | import java.io.*; 3 | import java.util.*; 4 | 5 | public class CountingSort4 { 6 | 7 | public static void main(String[] args) { 8 | 9 | Scanner in =new Scanner(System.in); 10 | int n=in.nextInt(); 11 | List ar=new ArrayList<>(); 12 | for(int i=0;i<100;i++){ 13 | StringBuilder a=new StringBuilder(); 14 | ar.add(a); 15 | } 16 | 17 | for(int i=0;i=n/2){ 21 | ar.get(num).append(word); 22 | ar.get(num).append(" "); 23 | }else{ 24 | ar.get(num).append("-"); 25 | ar.get(num).append(" "); 26 | } 27 | 28 | 29 | } 30 | for(int i=0;i<100;i++){ 31 | if(ar.get(i).length()>0){ 32 | System.out.print(ar.get(i)); 33 | } 34 | 35 | } 36 | 37 | } 38 | } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Sorting/Find the Median.cpp: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/find-the-median #include #include #include #include #include using namespace std; int main() { int n ; cin >> n; int arr[n]; for(int i = 0; i < n; ++i){ cin >> arr[i]; } int mid = ((n+1)/2)-1; int pivot = n-1,low = 0,high = n-1; while(true){ if (low < high) { int wall = low; for(int i = wall; i < high; ++i){ if(arr[i] < arr[high]){ swap(arr[i], arr[wall]); wall++; } } swap(arr[wall], arr[high]); if(wall > mid) high = wall - 1; else if(wall < mid) low = wall + 1; else if(wall == mid) break; } else break; } cout << arr[mid] << endl; return 0; } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Sorting/Insertion Sort - Part 1.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/insertionsort1 2 | #include 3 | using namespace std; 4 | void insertionSort(vector ar) { 5 | 6 | int theValue = ar[ar.size()-1]; 7 | for(int i = ar.size()-2 ; i >= -1 ; --i){ 8 | if(ar[i] > theValue) ar[i+1] = ar[i]; 9 | else { 10 | ar[i+1] = theValue; break; 11 | } 12 | for(int j = 0 ; j < ar.size() ; ++j) 13 | cout << ar[j] << " "; 14 | cout << endl; 15 | } 16 | for(int j = 0 ; j < ar.size() ; ++j) 17 | cout << ar[j] << " "; 18 | cout << endl; 19 | } 20 | 21 | int main(void) { 22 | vector arr; 23 | int size; 24 | cin >> size; 25 | for(int i=0; i> tmp; 28 | arr.push_back(tmp); 29 | } 30 | 31 | insertionSort(arr); 32 | 33 | 34 | return 0; 35 | } 36 | 37 | -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Sorting/Insertion Sort - Part 2.cpp: -------------------------------------------------------------------------------- 1 | //https://www.hackerrank.com/challenges/insertionsort2 2 | #include 3 | #include 4 | using namespace std; 5 | void insertionSort(int length, int * arr){ 6 | int j, temp; 7 | 8 | for (int i = 1; i < length; i++){ 9 | j = i; 10 | 11 | while (j > 0 && arr[j] < arr[j-1]){ 12 | temp = arr[j]; 13 | arr[j] = arr[j-1]; 14 | arr[j-1] = temp; 15 | j--; 16 | } 17 | 18 | for(int i = 0; i < length ; ++i) 19 | cout << arr[i] << " "; 20 | cout << endl; 21 | } 22 | } 23 | 24 | int main(void) { 25 | 26 | int size; 27 | cin >> size; 28 | //scanf("%d", &size); 29 | int arr[size], i; 30 | for(i = 0; i < size; i++) { 31 | cin >> arr[i]; 32 | //scanf("%d", &arr[i]); 33 | } 34 | 35 | insertionSort(size, arr); 36 | 37 | return 0; 38 | } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Sorting/Quicksort 1 - Partition.cpp: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/quicksort1 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | int i, j; 7 | 8 | int main() { 9 | 10 | int n; 11 | cin >> n; 12 | int arr[n],left[n],right[n],equal[n]; 13 | 14 | for (i = 0; i < n; i++){ 15 | cin >> arr[i]; 16 | } 17 | 18 | int pivot = arr[0]; 19 | int l=0,r=0,e=0; 20 | for (i = 0; i < n; i++) { 21 | if(arr[i] > pivot){right[r] = arr[i]; r++;} 22 | else if(arr[i] < pivot){left[l] = arr[i]; l++;} 23 | else {equal[e] = arr[i]; e++;} 24 | } 25 | 26 | for (i = 0; i < l; i++)cout << left[i] << " "; 27 | for (i = 0; i < e; i++)cout << equal[i] << " "; 28 | for (i = 0; i < r; i++)cout << right[i] << " "; 29 | 30 | return 0; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Sorting/Quicksort 2 - Sorting.cpp: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/quicksort2 2 | #include 3 | using namespace std; 4 | 5 | int partition(int *arr, int low, int high) { 6 | 7 | int pivot = arr[low]; 8 | int next[1000], tmp = 0, i; 9 | 10 | for (i = low + 1 ; i <= high ; i++) 11 | if (arr[i] <= pivot) 12 | next[tmp++] = arr[i]; 13 | next[tmp++] = pivot; 14 | 15 | int fin = tmp - 1 + low; 16 | 17 | for (i = low + 1 ; i <= high ; i++) 18 | if (arr[i] > pivot) 19 | next[tmp++] = arr[i]; 20 | 21 | for (i = low ; i <= high ; i++) 22 | arr[i] = next[i - low]; 23 | 24 | return fin; 25 | } 26 | 27 | void quickSort(int *arr, int left, int right) { 28 | 29 | if(left < right){ 30 | 31 | int p = partition(arr, left, right); 32 | quickSort(arr, left, p-1); 33 | quickSort(arr, p+1, right); 34 | 35 | for (int i = left; i <= right; i++) 36 | cout << arr[i] << " "; 37 | cout << endl; 38 | 39 | } 40 | } 41 | 42 | int main() 43 | { 44 | int n; 45 | 46 | cin >> n; 47 | 48 | int arr[n]; 49 | 50 | for (int i = 0; i < n; i++) 51 | cin >> arr[i]; 52 | 53 | quickSort(arr, 0, n - 1); 54 | 55 | } -------------------------------------------------------------------------------- /HackerRank/Practices/Algorithms/Sorting/Running Time of Algorithms.cpp: -------------------------------------------------------------------------------- 1 | // https://www.hackerrank.com/challenges/runningtime #include using namespace std; int counter = 0; // Counter added void insertionSort(int N, int arr[]) { int i,j; int value; for(i=1;i=0 && value 2 | using namespace std; 3 | 4 | int GCD(int a, int b){ 5 | if(b==0) return a; 6 | else return GCD(b, a%b); 7 | } 8 | 9 | int main() { 10 | 11 | int t; 12 | cin >> t; 13 | while(t--){ 14 | 15 | int n, res = 0; 16 | cin >> n; 17 | int arr[n]; 18 | for(int i = 0 ; i < n; ++i){ 19 | cin >> arr[i]; 20 | res = GCD(res, arr[i]); 21 | } 22 | 23 | if(res == 1) cout << "YES" << endl; 24 | else cout << "NO" << endl; 25 | 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /HackerRank/RookieRank 2/HackerRank in a String!.cpp: -------------------------------------------------------------------------------- 1 | //@Author ATukenov 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | using namespace std; 9 | 10 | string name, s; 11 | int n, j; 12 | 13 | int main() { 14 | cin >> n; 15 | name = "hackerrank"; 16 | for (int q = 1; q <= n; ++q) 17 | { 18 | cin >> s; 19 | j = 0; 20 | for (int i = 0; i < s.size(); ++i) 21 | if (s[i] == name[j]) 22 | j++; 23 | if (j >= name.size()) 24 | printf("YES\n"); 25 | else printf("NO\n"); 26 | } 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /HackerRank/RookieRank 2/KnightL on a Chessboard.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | int n, ans[26][26], used[26][26], way; 9 | struct qwe { 10 | int x, y; 11 | } q[1001]; 12 | 13 | int bfs(int a, int b) { 14 | int start = 1, finish = 1; 15 | q[start].x = 0; 16 | q[start].y = 0; 17 | while (start <= finish) { 18 | int X = q[start].x; 19 | int Y = q[start].y; 20 | if (X + a < n && Y + b < n && !used[X + a][Y + b]) 21 | used[X + a][Y + b] = used[X][Y] + 1, finish++, q[finish].x = X + a, q[finish].y = Y + b; 22 | if (X + a < n && Y - b > -1 && !used[X + a][Y - b]) 23 | used[X + a][Y - b] = used[X][Y] + 1, finish++, q[finish].x = X + a, q[finish].y = Y - b; 24 | if (X - a > -1 && Y + b < n && !used[X - a][Y + b]) 25 | used[X - a][Y + b] = used[X][Y] + 1, finish++, q[finish].x = X - a, q[finish].y = Y + b; 26 | if (X - a > -1 && Y - b > -1 && !used[X - a][Y - b]) 27 | used[X - a][Y - b] = used[X][Y] + 1, finish++, q[finish].x = X - a, q[finish].y = Y - b; 28 | if (X + b < n && Y + a < n && !used[X + b][Y + a]) 29 | used[X + b][Y + a] = used[X][Y] + 1, finish++, q[finish].x = X + b, q[finish].y = Y + a; 30 | if (X + b < n && Y - a > -1 && !used[X + b][Y - a]) 31 | used[X + b][Y - a] = used[X][Y] + 1, finish++, q[finish].x = X + b, q[finish].y = Y - a; 32 | if (X - b > -1 && Y + a < n && !used[X - b][Y + a]) 33 | used[X - b][Y + a] = used[X][Y] + 1, finish++, q[finish].x = X - b, q[finish].y = Y + a; 34 | if (X - b > -1 && Y - a > -1 && !used[X - b][Y - a]) 35 | used[X - b][Y - a] = used[X][Y] + 1, finish++, q[finish].x = X - b, q[finish].y = Y - a; 36 | start++; 37 | if (used[n - 1][n - 1]) 38 | return used[n - 1][n - 1]; 39 | } 40 | return -1; 41 | } 42 | 43 | int main() { 44 | cin >> n; 45 | for (int a = 1; a < n; a++) 46 | for (int b = a; b < n; ++b) { 47 | way = bfs(a, b); 48 | ans[a][b] = ans[b][a] = way; 49 | for (int i = 0; i < n; ++i) 50 | for (int j = 0; j < n; ++j) 51 | used[i][j] = 0; 52 | } 53 | for (int i = 1; i < n; ++i) { 54 | for (int j = 1; j < n; ++j) 55 | cout << ans[i][j] << ' '; 56 | cout << endl; 57 | } 58 | return 0; 59 | } 60 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Competitive-Programming 2 | All solutions that we have for competitive Programming websites. 3 | 4 | In this repository, we will have our lab members solutions for various websites, that are popular among competitive programmers. 5 | 6 | ### Content Table 7 | 8 | - HackerRank 9 | - Contests 10 | - Practices 11 | - TopCoder 12 | - Contests 13 | - Practices 14 | - CodeForces 15 | - Contests 16 | - Practices 17 | - UVa 18 | - HackerEarth 19 | - Contests 20 | - Practices 21 | - USACO 22 | - Contests 23 | - Practices 24 | 25 | -------------------------------------------------------------------------------- /SPOJ/Medium Factorization.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include // STL 5 | #include // STL 6 | #define mxNum 10000007 7 | using namespace std; 8 | vector was(mxNum, 0); 9 | void sieve(){ 10 | was[0] = was[1] = 1; 11 | for (int i = 2; i*i <= was.size(); i++) 12 | if (!was[i]) 13 | for (int j = i*i; j <= was.size(); j += i) 14 | if(!was[j]) was[j] = i; 15 | } 16 | 17 | void primeFactors(int N){ 18 | cout << "1 x" ; 19 | while(was[N] != 0 && N % was[N] == 0){ 20 | printf(" %d x", was[N]); 21 | if(was[N] == 0) break; 22 | N /= was[N]; 23 | } 24 | printf(" %d\n", N); 25 | } 26 | 27 | int main(){ 28 | 29 | sieve(); 30 | int n; 31 | while(scanf("%d", &n) == 1) 32 | if(n == 1){ 33 | printf("1\n"); 34 | continue; 35 | } 36 | else primeFactors(n); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/BinaryCode.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | using namespace std; 21 | 22 | class BinaryCode { 23 | public: 24 | vector decode(string); 25 | }; 26 | 27 | vector BinaryCode::decode(string message) { 28 | vector vc; 29 | string s; 30 | int num1 = 0, num2, temp; 31 | bool ok = true; 32 | num2 = (message[0] - '0') - num1; 33 | s = to_string(num1); 34 | //cout << s << endl; 35 | s += to_string(num2); 36 | //cout << s << endl; 37 | if(num2 > 1 || num2 < 0 || num1 > 1 || num1 < 0 ) ok = false; 38 | for(int i = 1; i < message.size()-1 ; ++i){ 39 | temp = num2; 40 | num2 = (message[i]-'0') - num1 - num2; 41 | //cout << num1 << endl; 42 | num1 = temp; 43 | //cout << num1 << " " <<(message[i]-'0') << " " << temp<< endl; 44 | if(num2 > 1 || num2 < 0 || num1 > 1 || num1 < 0){ 45 | ok = false; 46 | break; 47 | } 48 | s += to_string(num2); 49 | //cout << s << endl; 50 | } 51 | num2 = (message[message.size()-1]-'0') - num1 - num2; 52 | if(num2 > 1 || num2 < 0) ok = false; 53 | //cout << num2 << num1 << endl; 54 | if(ok) vc.push_back(s); 55 | else vc.push_back("NONE"); 56 | ok = true; 57 | num1 = 1; 58 | num2 = (message[0] - '0') - num1; 59 | s = to_string(num1); 60 | s += to_string(num2); 61 | if(num2 > 1 || num2 < 0 || num1 > 1 || num1 < 0 ) ok = false; 62 | for(int i = 1; i < message.size()-1 ; ++i){ 63 | temp = num2; 64 | num2 = (message[i]-'0') - num1 - num2; 65 | num1 = temp; 66 | if(num2 > 1 || num2 < 0 || num1 > 1 || num1 < 0){ 67 | ok = false; 68 | break; 69 | } 70 | s += to_string(num2); 71 | } 72 | num2 = (message[message.size()-1]-'0') - num1 - num2; 73 | if(num2 > 1 || num2 < 0) ok = false; 74 | if(ok) vc.push_back(s); 75 | else vc.push_back("NONE"); 76 | 77 | return vc; 78 | } 79 | -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 395 Div 2/250.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | using namespace std; 22 | 23 | class SquareDigitNumbers{ 24 | public: 25 | bool lookAtDigits(int x){ 26 | while(x >= 1){ 27 | int rem = x%10; 28 | if(!(rem == 0 | rem == 1 | rem == 4 | rem == 9)) return false; 29 | x /= 10; 30 | } 31 | return true; 32 | } 33 | 34 | int getNumber(int n) { 35 | vector vc; 36 | for (int i = 0; i < 999999; ++i) 37 | if(lookAtDigits(i)) vc.push_back(i); 38 | return vc[n]; 39 | } 40 | }; 41 | 42 | 43 | <%:testing-code%> -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 395 Div 2/500.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #define ll long long 21 | using namespace std; 22 | 23 | 24 | class StreetWalking { 25 | public: 26 | ll minTime(ll X, ll Y, ll walkTime, ll sneakTime) { 27 | ll diff = abs(X-Y), mn = min(X, Y); 28 | int rem = diff % 2; 29 | 30 | if(sneakTime < walkTime) return ((mn+diff-rem)*sneakTime + rem*walkTime); 31 | else if(walkTime * 2 > sneakTime) return mn*sneakTime + diff*walkTime; 32 | else return walkTime*(X+Y); 33 | } 34 | }; 35 | 36 | 37 | <%:testing-code%> -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 396 Div 2/500_notCompleted.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace std; 7 | 8 | int calculate (string s, int p) { 9 | 10 | int arr[200]; 11 | int need = 0; 12 | for(int j = 1; j <= p; ++j){ 13 | memset(arr, 0, sizeof(arr)); 14 | int mx = 0; 15 | for(int i = 0; i <= s.size() ; i+=p){ 16 | arr[s[i]]++; 17 | mx = max(arr[s[i]], mx); 18 | } 19 | cout << s.size()/p << " " << mx << endl; 20 | need += (s.size()/p) - mx; 21 | } 22 | if(need < 0) return 0; 23 | return need; 24 | 25 | } 26 | 27 | int main () { 28 | 29 | string s; 30 | int p, mn = 99999999; 31 | cin >> p >> s; 32 | for(int i = 1; i <= p; ++i) 33 | mn = min(calculate(s , i), mn); 34 | cout << mn << endl; 35 | 36 | } -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 450 Div 1/OrderedNim.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | using namespace std; 21 | 22 | class OrderedNim { 23 | public: 24 | string winner(vector ); 25 | }; 26 | 27 | string OrderedNim::winner(vector layout) { 28 | for(vector::iterator it = layout.begin(); it != layout.end()-1; ++it){ 29 | if(*it >= 2){ 30 | return "Alice"; 31 | } 32 | } 33 | (layout.size() == 1) return "Alice"; 34 | return "Bob"; 35 | } 36 | 37 | <%:testing-code%> 38 | //Powered by [KawigiEdit] 2.0! -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 612 Div 2/question1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | using namespace std; 22 | 23 | 24 | class LeftAndRightHandedDiv2 { 25 | public: 26 | int count(string S) { 27 | int ans = 0; 28 | for (int i = 0; i < S.size() - 1; ++i) 29 | if (S[i] == 'R' && S[i + 1] == 'L') 30 | ans++; 31 | return ans; 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 612 Div 2/question2.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | using namespace std; 22 | 23 | 24 | class EmoticonsDiv2 { 25 | public: 26 | int printSmiles(int smiles) { 27 | int ans = smiles; 28 | for (int x = 1; x < smiles; ++x) 29 | if (smiles % x == 0) 30 | ans = min(ans, printSmiles(x) + smiles / x); 31 | return ans; 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 612 Div 2/question3.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | using namespace std; 21 | 22 | class PowersOfTwo { 23 | public: 24 | long long count(vector powers) 25 | { 26 | long long a[60]; 27 | for (int i = 0; i <= 50; ++i) 28 | a[i] = 0; 29 | long long Power[60]; 30 | Power[0]=1; 31 | for (int i = 1; i <= 50; ++i) 32 | Power[i] = Power[i - 1] * 2; 33 | vector ::iterator it; 34 | for (it = powers.begin(); it < powers.end(); ++it) 35 | for (int j = 0; j <= 50; ++j) 36 | if (*it == Power[j]) ++a[j]; 37 | long long sum = 0; 38 | for (int i = 0; i <= 50; ++i) 39 | { 40 | sum += Power[i] * a[i]; 41 | for (int j = i + 1; j <= 50; ++j) 42 | if (sum >= Power[j]) 43 | { 44 | a[i] += Power[j - i] * a[j]; 45 | sum += Power[j] * a[j]; 46 | a[j] = 0; 47 | } 48 | } 49 | sum = 1; 50 | for (int i = 0; i <= 50; ++i) 51 | sum *= (a[i] +1); 52 | return sum; 53 | } 54 | }; 55 | 56 | -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 613 Div 2/250.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | using namespace std; 21 | 22 | class TaroString { 23 | public: 24 | string getAnswer(string); 25 | }; 26 | 27 | string TaroString::getAnswer(string S) { 28 | int a = 0, b = 0, c= 0; 29 | for(int i = 0; i < S.size() ; ++i){ 30 | if(S[i] == 'C') a++; 31 | if(S[i] == 'A') b++; 32 | if(S[i] == 'T') c++; 33 | } 34 | if(a == 1 && b == 1 && c == 1) return "Possible"; 35 | return "Impossible"; 36 | } -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 613 Div 2/500.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | using namespace std; 21 | 22 | class TaroFriends { 23 | public: 24 | int getNumber(vector , int); 25 | }; 26 | 27 | int TaroFriends::getNumber(vector vc, int x) { 28 | sort(vc.begin(), vc.end()); 29 | vector v; 30 | for(int i = 0 ; i < vc.size() ; ++i) vc[i] -= x; 31 | int res = vc[vc.size()-1] - vc[0]; 32 | for(int i = 0 ; i < vc.size() ; ++i){ 33 | vc[i] += 2*x; 34 | for(int j = 0; j < vc.size() ; ++j) v.push_back(vc[j]); 35 | sort(v.begin(), v.end()); 36 | res = min(res, v[v.size()-1] - v[0]); 37 | v.clear(); 38 | } 39 | return res; 40 | } -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 635 Div 2/IdentifyingWood.cpp: -------------------------------------------------------------------------------- 1 | // Gained: 238 points 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | using namespace std; 23 | 24 | class IdentifyingWood { 25 | public: 26 | string check(string, string); 27 | }; 28 | 29 | string IdentifyingWood::check(string s, string t) { 30 | int i = 0; 31 | for(int j =0; j < s.size() && t.size() != 0 ; ++j){ 32 | if(s[j] == t[0]){ 33 | t.erase(0, 1); 34 | //cout << t << endl; 35 | } 36 | } 37 | if(t.size() == 0) return "Yep, it's wood."; 38 | else return "Nope."; 39 | } -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 635 Div 2/QuadraticLaw.cpp: -------------------------------------------------------------------------------- 1 | // Gained: 403 points 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | using namespace std; 23 | 24 | class QuadraticLaw { 25 | public: 26 | long long getTime(long long); 27 | }; 28 | 29 | long long QuadraticLaw::getTime(long long d) { 30 | int i = 0; 31 | while(d >= i*(i+1)) i++; 32 | return --i; 33 | } -------------------------------------------------------------------------------- /TopCoder/Practices/SRM/SRM 702 Div 2/SecondQuestin.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | using namespace std; 22 | 23 | 24 | class GridSort { 25 | public: 26 | string sort(int n, int m, vector grid) { 27 | int N = n * m; 28 | int sum = 0; 29 | int c[m + m]; 30 | for (int i = 0; i <= m; ++i) 31 | c[i] = 0; 32 | map was; 33 | for (int i = 1; i <= N; ++i) 34 | { 35 | sum += i; 36 | if (i % m == 0) 37 | was[sum] = true, sum = 0; 38 | c[i % m] += i; 39 | } 40 | map was1; 41 | for (int i = 0; i < m; ++i) 42 | was1[c[i]] = true; 43 | for (int i = 0; i < n; ++i) 44 | { 45 | sum = 0; 46 | for (int j = 0; j < m; ++j) 47 | sum += grid[i * m + j]; 48 | if (!was[sum]) 49 | return "Impossible"; 50 | } 51 | for (int i = 0; i < m; ++i) 52 | { 53 | sum = 0; 54 | for (int j = 0; j < n; ++j) 55 | sum += grid[j * m + i]; 56 | if (!was1[sum]) 57 | return "Impossible"; 58 | } 59 | 60 | return "Possible"; 61 | } 62 | }; 63 | 64 | 65 | <%:testing-code%> 66 | //Powered by KawigiEdit 2.1.4 (beta) modified by pivanof! 67 | -------------------------------------------------------------------------------- /TopCoder/README.md: -------------------------------------------------------------------------------- 1 | # TopCoder 2 | Source: www.topcoder.com 3 | 4 | ### How to use it ? 5 | There are couple ways to use topcoder. This is not like the other websites that we have in the list, since it is really slow to use on browser we are using applications that will help us to dive into topcoder. Here are the applications: 6 | 7 | - [Topcoder Arena]() - _This is must for the others. Topcoder Arena's desktop application. All OS's are supported._ 8 | 9 | Since Topcoder wants us to use classes and functions, for making it easier and faster for us we can use some third party applications which will create these for us (They have other specialities too, just check given links): 10 | 11 | - [KawigiEdit](https://www.topcoder.com/contest/classes/KawigiEdit/KawigiEdit.html) 12 | - [ExampleBuilder](https://community.topcoder.com/contest/classes/ExampleBuilder/ExampleBuilder.html) 13 | 14 | or check for [moree](https://community.topcoder.com/tc?module=Static&d1=applet&d2=plugins) 15 | 16 | ### Content 17 | #### Contests 18 | 19 | #### Practices 20 | - [ ] [SRM #450 (Div1)](https://github.com/NAU-ACM/Competitive-Programming/tree/master/TopCoder/Practices/SRM/SRM%20450%20Div%201) 21 | - [ ] [SRM #612 (Div2)](https://github.com/NAU-ACM/Competitive-Programming/tree/master/TopCoder/Practices/SRM/SRM%20612%20Div%202) 22 | - [ ] [SRM #613 (Div2)](https://github.com/NAU-ACM/Competitive-Programming/tree/master/TopCoder/Practices/SRM/SRM%20613%20Div%202) 23 | - [ ] [SRM #635 (Div2)](https://github.com/NAU-ACM/Competitive-Programming/tree/master/TopCoder/Practices/SRM/SRM%20635%20Div%202) 24 | - [ ] [SRM #702 (Div2)](https://github.com/NAU-ACM/Competitive-Programming/tree/master/TopCoder/Practices/SRM/SRM%20702%20Div%202) 25 | -------------------------------------------------------------------------------- /USACO/q1_ride.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ID: bedir.t1 3 | PROG: ride 4 | LANG: C++11 5 | */ 6 | #include 7 | #include 8 | #include 9 | 10 | using namespace std; 11 | 12 | int main() { 13 | ofstream fout ("ride.out"); 14 | ifstream fin ("ride.in"); 15 | long long val1 = 1, val2 = 1; 16 | string a, b; 17 | fin >> a >> b; 18 | for(int i = 0 ; i < a.size() ; ++i) 19 | val1 *= (a[i] - 'A' + 1); 20 | for(int i = 0 ; i < b.size() ; ++i) 21 | val2 *= (b[i] - 'A' + 1); 22 | 23 | if(val1 % 47 == val2 % 47) fout << "GO" << endl; 24 | else fout << "STAY" << endl; 25 | return 0; 26 | } -------------------------------------------------------------------------------- /USACO/q2_gift1.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ID: bedir.t1 3 | PROG: gift1 4 | LANG: C++11 5 | */ 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | // #define fin cin 12 | // #define fout cout 13 | 14 | using namespace std; 15 | 16 | int main() { 17 | ofstream fout ("gift1.out"); 18 | ifstream fin ("gift1.in"); 19 | int n, k, t; 20 | string s; 21 | map m; 22 | vector vc; 23 | fin >> n; 24 | for(int i = 0; i < n ; ++i){ 25 | fin >> s; 26 | vc.push_back(s); 27 | } 28 | for(int i = 0; i < n ; ++i){ 29 | fin >> s >> k >> t; 30 | if(t){ 31 | m[s] -= k; 32 | m[s] += k%t; 33 | for(int j = 0; j < t; ++j){ 34 | fin >> s; 35 | m[s] += k/t; 36 | } 37 | } 38 | } 39 | for(int i = 0; i < vc.size(); ++i) 40 | fout << vc[i] << " " << m[vc[i]] << endl; 41 | return 0; 42 | } -------------------------------------------------------------------------------- /USACO/q3_friday.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ID: bedir.t1 3 | PROG: friday 4 | LANG: C++11 5 | */ 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | // #define fin cin 12 | // #define fout cout 13 | using namespace std; 14 | 15 | int ms[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 16 | int week[8] = {0,0,0,0,0,0,0,0}; 17 | 18 | bool isleap(int a){ 19 | if(a % 100 == 0){ 20 | if(a % 400 == 0) return true; 21 | else return false; 22 | } 23 | else if(a % 4 == 0) return true; 24 | else return false; 25 | } 26 | 27 | int main() { 28 | ofstream fout ("friday.out"); 29 | ifstream fin ("friday.in"); 30 | 31 | int n; 32 | fin >> n; 33 | int curday = 0; 34 | for(int i = 0; i < n; ++i){ 35 | if(isleap(i+1900)) ms[1] = 29; 36 | else ms[1] = 28; 37 | //cout << ms[1] << endl; 38 | for(int j = 0; j < 12 ; ++j){ 39 | //for(int k = 0; k < ms[i] ; ++k) cout << (curday+k) % 7 << " "; 40 | curday = (curday + 6) % 7; 41 | //cout << endl << curday << " "; 42 | week[curday]++; 43 | curday = (curday + ms[j] - 6) % 7; 44 | } 45 | } 46 | fout << week[6] << " "; 47 | for (int i = 0; i < 5; ++i) 48 | fout << week[i] << " "; 49 | fout << week[5] << endl; 50 | return 0; 51 | } -------------------------------------------------------------------------------- /USACO/q4_beads.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ID: bedir.t1 3 | PROG: beads 4 | LANG: C++11 5 | */ 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | using namespace std; 13 | 14 | 15 | int main (){ 16 | int n; 17 | string s; 18 | vector vc; 19 | freopen("beads.in", "r", stdin); 20 | freopen("beads.out", "w", stdout); 21 | cin >> n >> s; 22 | for(int i = 0; i < n ; ++i){ 23 | int total = 1; 24 | int j = i; 25 | if(s[i] == 'b'){ 26 | while(s[j++] != 'r' && total < n){ 27 | if(j >= n) j = 0; 28 | total++; 29 | } 30 | } 31 | else if(s[i] == 'r'){ 32 | while(s[j++] != 'b' && total < n){ 33 | if(j >= n) j = 0; 34 | total++; 35 | } 36 | } 37 | else{ 38 | char enemy = 'x'; 39 | while(s[j] != enemy && total < n){ 40 | if(s[j] == 'r' && enemy == 'x') enemy = 'b'; 41 | if(s[j] == 'b' && enemy == 'x') enemy = 'r'; 42 | j++; 43 | if(j >= n) j = 0; 44 | total++; 45 | } 46 | } 47 | j = i-1; 48 | if(i == 0) j = n-1; 49 | if(s[i-1] == 'b'){ 50 | 51 | while(s[j--] != 'r' && total < n){ 52 | if(j < 0) j = n-1; 53 | total++; 54 | } 55 | 56 | } 57 | else if(s[i-1] == 'r'){ 58 | while(s[j--] != 'b' && total < n){ 59 | if(j < 0) j = n-1; 60 | total++; 61 | } 62 | } 63 | else{ 64 | char enemy = 'x'; 65 | while(s[j] != enemy && total < n){ 66 | if(s[j] == 'r' && enemy == 'x' ) enemy = 'b'; 67 | if(s[j] == 'b' && enemy == 'x') enemy = 'r'; 68 | j--; 69 | if(j < 0) j = n-1; 70 | total++; 71 | } 72 | } 73 | // cout << total << " "; 74 | if(total != n) total--; 75 | vc.push_back(total); 76 | } 77 | 78 | cout << *max_element(vc.begin() , vc.end()) << endl; 79 | } 80 | -------------------------------------------------------------------------------- /USACO/q5_milk2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ID: bedir.t1 3 | PROG: milk2 4 | LANG: C++11 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | using namespace std; 14 | 15 | 16 | int main (){ 17 | int n,a,b; 18 | freopen("milk2.in", "r", stdin); 19 | freopen("milk2.out", "w", stdout); 20 | cin >> n; 21 | int mx = 0, mn = 0; 22 | vector > vc; 23 | while(n--){ 24 | cin >> a >> b; 25 | pair pp(a, b); 26 | vc.push_back(pp); 27 | } 28 | sort(vc.begin() , vc.end()); 29 | for(int i = 1 ; i < vc.size(); ++i){ 30 | if(vc[i].first <= vc[i-1].second){ 31 | vc[i-1].second = max(vc[i].second,vc[i-1].second); 32 | vc.erase (vc.begin()+(i)); 33 | // cout << vc[i-1].first << " " << vc[i-1].second << endl; 34 | i--; 35 | } 36 | 37 | } 38 | int oldb = vc[0].first; 39 | for(int i =0 ; i < vc.size(); ++i){ 40 | a = vc[i].first, b = vc[i].second; 41 | mx = max(b - a, mx); 42 | mn = max(a - oldb, mn); 43 | oldb = b; 44 | } 45 | cout << mx << " " << mn << endl; 46 | } 47 | -------------------------------------------------------------------------------- /USACO/test.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ID: bedir.t1 3 | PROG: test 4 | LANG: C++11 5 | */ 6 | #include 7 | #include 8 | #include 9 | 10 | using namespace std; 11 | 12 | int main() { 13 | ofstream fout ("test.out"); 14 | ifstream fin ("test.in"); 15 | int a, b; 16 | fin >> a >> b; 17 | fout << a+b << endl; 18 | return 0; 19 | } -------------------------------------------------------------------------------- /UVa/Complete Search/10487-Closest Sums.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Name: 10487 - Closest Sums 3 | Link: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1428 4 | Topic: Complete Search 5 | Algo Used: Binary Search 6 | Author: BT 7 | */ 8 | #include 9 | #include 10 | #include 11 | using namespace std; 12 | int n,m,key; 13 | int arr[1001]; 14 | vector vc; 15 | 16 | int binarySearch(vector v, int l, int r, int key){ 17 | int m; 18 | if(l == r) return v[0]; 19 | while(l != r-1){ 20 | m = (l+r)/2; 21 | if(v[m] <= key) l = m; 22 | else r = m; 23 | } 24 | return ((abs(key-v[l]) >= abs(key-v[r])) ? v[r] : v[l]); 25 | } 26 | 27 | int main (){ 28 | 29 | cin >> n; 30 | int casenum = 1; 31 | while(n != 0){ 32 | for (int i = 0; i < n; i++) cin >> arr[i]; 33 | for (int i = 0; i < n; i++) 34 | for (int j = i+1; j < n; j++) 35 | vc.push_back(arr[j]+arr[i]); 36 | cin >> m; 37 | cout << "Case " << casenum++ << ":\n"; 38 | sort(vc.begin(), vc.end()); 39 | //for (int i = 0; i < vc.size(); i++) cout << vc[i] << " "; 40 | while(m--){ 41 | cin >> key; 42 | cout << "Closest sum to " << key << " is "<< binarySearch(vc, 0, vc.size()-1, key) <<".\n"; 43 | } 44 | vc.clear(); 45 | cin >> n; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /UVa/Complete Search/11236-Grocery-Store.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Name: 11236 - Grocery store 3 | Link: https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2177 4 | Topic: Complete Search 5 | Algo Used: - 6 | */ 7 | #include 8 | #include 9 | #define tenSix 1000000 10 | using namespace std; 11 | 12 | int main (){ 13 | for (int i = 1; 4*i <= 2000; ++i) 14 | for (int j = i; 3*j+i <= 2000; ++j) 15 | for (int k = j; 2*k+i+j <= 2000; ++k) { 16 | 17 | int a = i*j*k; 18 | int b = i+j+k; 19 | 20 | if(a <= tenSix) continue; 21 | 22 | int d = (b * tenSix)/(a - tenSix); 23 | 24 | if(d >= k && b+d <= 2000 && (b * tenSix)%(a - tenSix) == 0 && fabs((b + d) / 100.0 - (a * d) / 100000000.0) < tenSix*2000) 25 | printf("%.2f %.2f %.2f %.2f\n", i/100.0, j/100.0, k/100.0, d/100.0); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /UVa/Complete Search/11565-Simple-Equations.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main () 5 | { 6 | int n; 7 | cin >> n; 8 | while (n--) { 9 | int a,b,c; 10 | bool done = false; 11 | cin >> a >> b >> c; 12 | for (int x=-22; !done && x<=22; x++) //x*x*x = B 13 | for (int y=x+1; !done && y<=100; y++) 14 | for (int z=y+1; !done && z<=100; z++) 15 | if ((x+y+z)==a && (x*y*z)==b && (x*x+y*y+z*z)==c) { 16 | cout << x <<" "<< y <<" "<< z << endl; 17 | done = true; 18 | break; 19 | } 20 | if (!done) 21 | cout << "No solution." << endl; 22 | } 23 | } -------------------------------------------------------------------------------- /UVa/Complete Search/12455-Bars.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Name: 12455 - Bars 3 | Link: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3886 4 | Topic: Complete Search 5 | Algo Used: Bit Manipulation 6 | */ 7 | #include 8 | using namespace std; 9 | int par[20], p, N , t; 10 | int main() { 11 | cin >> t; 12 | while(t--){ 13 | cin >> N >> p; 14 | bool ok = false; 15 | for (int i = 0; i < p; i++) cin >> par[i]; 16 | for (int i = 0; i < (1 << p); i++) { 17 | int sum = 0; 18 | for (int j = 0; j < p; j++) 19 | if (i & (1 << j)) 20 | sum += par[j]; 21 | if(sum == N) { 22 | ok = true; 23 | break; 24 | } 25 | } 26 | if(ok) cout << "YES" << endl; 27 | else cout << "NO" << endl; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /UVa/Complete Search/4142-Expert Enough?.cpp: -------------------------------------------------------------------------------- 1 | //Talgat Yegizbayev 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | int main() 8 | { 9 | int t,t2,t3,i,j; 10 | int min1[10001],max1[10001],price; 11 | int help=0; 12 | string s1[10001]; 13 | cin>>t; 14 | 15 | while( t-- ) 16 | { 17 | cin >>t2; 18 | for ( i=0; i>s1[i]>>min1[i]>>max1[i]; 20 | cin >>t3; 21 | while ( t3-- ) 22 | { 23 | cin>>price; 24 | for ( i=0; i 1 ) 30 | break; 31 | } 32 | } 33 | if ( help == 1 ) 34 | cout<< s1[j] < 2 | #include 3 | #include 4 | using namespace std; 5 | int primes[11] = {2,3,5,7,11,13,17,19,23,29,31}; // max=15+16 6 | bitset<20> used; 7 | int cycle[20]; 8 | int n; 9 | 10 | bool isPrime (int num) { 11 | for (int i=0; i<11; ++i) 12 | if (num == primes[i]) 13 | return true; 14 | return false; 15 | } 16 | 17 | bool place (int pos, int x) { 18 | if (pos != n-1) { 19 | if (isPrime(cycle[pos-1]+x)) 20 | return true; 21 | else 22 | return false; 23 | } 24 | else { 25 | if (isPrime(cycle[pos-1]+x) && isPrime(x+cycle[0])) 26 | return true; 27 | else 28 | return false; 29 | } 30 | } 31 | 32 | void backtrack (int k) { 33 | if (k == n) { 34 | for (int i=0; i < n; ++i) 35 | printf ("%d ", cycle[i]); 36 | printf("\n"); 37 | return; 38 | } 39 | for (int i=2; i <= n; ++i) { 40 | if (!used[i] && place(k,i)) { 41 | cycle[k] = i; 42 | used[i] = true; 43 | backtrack(k+1); 44 | used[i] = false; 45 | } 46 | } 47 | } 48 | 49 | int main () { 50 | int c=1; 51 | while (scanf("%d", &n) == 1) { 52 | printf("Case %d\n", c++); 53 | cycle[0] = 1; 54 | used[0] = true; 55 | backtrack(1); 56 | printf("\n"); 57 | } 58 | 59 | } -------------------------------------------------------------------------------- /UVa/Complete Search/input: -------------------------------------------------------------------------------- 1 | 6 8 10 2 | -------------------------------------------------------------------------------- /UVa/Divide & Conquer/00183-Bit-Maps.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | int m[201][201]; 5 | 6 | void BtoD (int Rl, int Rr, int Cl, int Cr, int ch) { 7 | // base case: 0-by-0 bitmap 8 | if (Rl == Rr || Cl == Cr) 9 | return; 10 | 11 | // make each line 50 ch 12 | if (ch > 0 && ch%50 == 0) 13 | cout << endl; 14 | ch++; 15 | 16 | int zero=0; 17 | for (int r = Rl; r < Rr; ++r) 18 | for (int c = Cl; c < Cr; ++c) 19 | if (m[r][c] == 0) zero++; 20 | 21 | // if all are 0 22 | if (zero == (Rr-Rl)*(Cr-Cl)) 23 | cout << "0"; 24 | // if all are 1 25 | else if (zero == 0) 26 | cout << "1"; 27 | // otherwise divide it 28 | else { 29 | 30 | cout << "D"; 31 | // mid of R and C 32 | int Rm = (Rl + Rr + 1) / 2; 33 | int Cm = (Cl + Cr + 1) / 2; 34 | 35 | // divide and conqure 36 | BtoD(Rl, Rm, Cl, Cm, ch); 37 | BtoD(Rl, Rm, Cm, Cr, ch); 38 | BtoD(Rm, Rr, Cl, Cm, ch); 39 | BtoD(Rm, Rr, Cm, Cr, ch); 40 | } 41 | } 42 | 43 | void DtoB (int Rl, int Rr, int Cl, int Cr) { 44 | // base case: 0-by-0 bitmap 45 | if (Rl == Rr || Cl == Cr) 46 | return; 47 | 48 | // Get 1 char from cin. 49 | int ch = cin.get(); 50 | 51 | // if all quarter is 0 or 1 52 | if (ch == '0' || ch == '1') 53 | { 54 | for (int r = Rl; r < Rr; ++r) 55 | for (int c = Cl; c < Cr; ++c) 56 | m[r][c] = ch - '0'; 57 | return; 58 | } 59 | // otherwise extend quarters - divided part 60 | else 61 | { 62 | int Rm = (Rl + Rr + 1) / 2; 63 | int Cm = (Cl + Cr + 1) / 2; 64 | DtoB(Rl, Rm, Cl, Cm); 65 | DtoB(Rl, Rm, Cm, Cr); 66 | DtoB(Rm, Rr, Cl, Cm); 67 | DtoB(Rm, Rr, Cm, Cr); 68 | } 69 | 70 | } 71 | 72 | int main () { 73 | char type; 74 | while (cin >> type, type != '#') { 75 | int row, col; 76 | cin >> row >> col; 77 | 78 | // print first line 79 | cout << (type == 'B'? "D" : "B") 80 | << right << setw(4) << row 81 | << right << setw(4) << col 82 | << endl; 83 | 84 | if (type == 'B') { 85 | string s; 86 | // read all lines 87 | while (s.size() < row * col) 88 | { 89 | string tmp; 90 | getline(cin, tmp); 91 | s = s + tmp; 92 | } 93 | 94 | // place to 2D map 95 | for (int r = 0; r < row; ++r) 96 | for (int c = 0; c < col; ++c) 97 | m[r][c] = s[r * col + c] - '0'; 98 | 99 | // start with entire map 100 | BtoD (0, row, 0, col, 0); 101 | cout << endl; 102 | } 103 | else { 104 | // start with entire map 105 | DtoB (0, row, 0, col); 106 | 107 | // print bit map 108 | for (int r = 0; r < row; ++r) 109 | for (int c = 0; c < col; ++c) 110 | { 111 | // make each line 50 char 112 | if (r + c > 0 && (r * col + c) % 50 == 0) 113 | cout << endl; 114 | cout << m[r][c]; 115 | } 116 | cout << endl; 117 | } 118 | } 119 | } -------------------------------------------------------------------------------- /UVa/Divide & Conquer/12032-The-Monkey and-the-Oiled-Bamboo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Name: 12032 - The Monkey and the Oiled Bamboo 3 | Link: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3183 4 | Topic: Divide & Conquer 5 | Algo Used: - 6 | */ 7 | #include 8 | #include 9 | using namespace std; 10 | 11 | int t, n, a; 12 | vector vc; 13 | 14 | int main () { 15 | 16 | cin >> t; 17 | int counter = 1; 18 | while (t--) { 19 | cin >> n; 20 | int maxx = 0, res; 21 | vc.push_back(0); 22 | for(int i = 0; i < n ; ++i){ 23 | cin >> a; 24 | vc.push_back(a); 25 | } 26 | for(int i = 1; i <= n ; ++i){ 27 | if(maxx < vc[i] - vc[i-1]){ 28 | maxx = vc[i] - vc[i-1]; 29 | } 30 | } 31 | 32 | res = maxx; 33 | for(int i = 1; i <= n; i++) { 34 | if(vc[i]-vc[i-1] == maxx) 35 | maxx--; 36 | else if(vc[i]-vc[i-1] > maxx) { 37 | res++; 38 | break; 39 | } 40 | } 41 | 42 | cout << "Case " << counter++ << ": " << res << endl; 43 | vc.clear(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /UVa/Divide & Conquer/12192-Grapevine.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Name: 12192 - Grapevine 3 | Link: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3344 4 | Topic: Divide & Conquer 5 | Algo Used: Binary Search (lower_bound) 6 | */ 7 | #include 8 | #include 9 | #include 10 | using namespace std; 11 | 12 | int n, m, q, arr[501][501], low, high, maxx, mIdx; 13 | 14 | int main () { 15 | 16 | cin >> n >> m; 17 | while(n != 0 && m != 0){ 18 | for(int i = 0 ; i < n ; ++i) 19 | for(int j = 0 ; j < m ; ++j) 20 | cin >> arr[i][j]; 21 | 22 | cin >> q; 23 | while(q--){ 24 | cin >> low >> high; 25 | maxx = -1; 26 | for (int i = 0; i < n; ++i){ 27 | mIdx = lower_bound(arr[i] , arr[i]+m, low) - arr[i]; 28 | for (int j = 0; j < n; ++j){ 29 | if(arr[i+j][mIdx+j] > high || i+j >= n || mIdx+j >= m) break; 30 | if(j >= maxx) maxx = j; 31 | } 32 | } 33 | cout << maxx+1 << endl; 34 | } 35 | cout << "-" << endl; 36 | cin >> n >> m; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /UVa/Divide & Conquer/output.txt: -------------------------------------------------------------------------------- 1 | 4 2 | 1 3 | 1 4 | 2 5 | 3 6 | 3 7 | 8 8 | 2 9 | 2 10 | 1 11 | 8 12 | 4 13 | 3 14 | 2 15 | 5 16 | 8 17 | 4 18 | 4 19 | 7 20 | 8 21 | 4 22 | 6 23 | 2 24 | 5 25 | 3 26 | 5 27 | 1 28 | 2 29 | 7 30 | 5 31 | 6 32 | 6 33 | 2 34 | 3 35 | 7 36 | 8 37 | 5 38 | 3 39 | 4 40 | 2 41 | 3 42 | 5 43 | 6 44 | 4 45 | 7 46 | 2 47 | 2 48 | 4 49 | 2 50 | 2 51 | 2 52 | 1 53 | 8 54 | 8 55 | 2 56 | 6 57 | 4 58 | 0 59 | 2 60 | 1 61 | 3 62 | 4 63 | 1 64 | 1 65 | 7 66 | 4 67 | 1 68 | 6 69 | 0 70 | 5 71 | 8 72 | 2 73 | 4 74 | 2 75 | 8 76 | 7 77 | 4 78 | 1 79 | 2 80 | 1 81 | - 82 | 2 83 | 2 84 | 2 85 | 2 86 | 3 87 | 6 88 | 9 89 | 2 90 | 2 91 | 5 92 | 2 93 | 9 94 | 14 95 | 4 96 | 4 97 | 10 98 | 5 99 | 3 100 | 4 101 | 4 102 | 2 103 | 4 104 | 5 105 | 2 106 | 6 107 | 2 108 | 0 109 | 1 110 | 5 111 | 1 112 | 10 113 | 4 114 | 3 115 | 4 116 | 6 117 | 9 118 | 1 119 | 1 120 | 4 121 | 10 122 | 4 123 | 6 124 | 6 125 | 2 126 | 5 127 | 7 128 | 3 129 | 2 130 | 3 131 | 3 132 | 5 133 | 8 134 | - 135 | 4 136 | 10 137 | 8 138 | 12 139 | 10 140 | 7 141 | 13 142 | 4 143 | - 144 | 0 145 | 6 146 | 2 147 | 8 148 | 2 149 | 4 150 | 2 151 | 2 152 | 5 153 | 10 154 | 5 155 | 3 156 | 3 157 | 1 158 | 5 159 | 4 160 | 0 161 | 3 162 | 4 163 | 3 164 | 3 165 | 1 166 | 3 167 | 1 168 | 1 169 | 8 170 | 4 171 | - 172 | 10 173 | 12 174 | 1 175 | 3 176 | 20 177 | 5 178 | 4 179 | 1 180 | 2 181 | 24 182 | 6 183 | 18 184 | 4 185 | 18 186 | 0 187 | 8 188 | 1 189 | 2 190 | 18 191 | 5 192 | 12 193 | 10 194 | 15 195 | 4 196 | 3 197 | 14 198 | 1 199 | 2 200 | 21 201 | 14 202 | 11 203 | 2 204 | 2 205 | 2 206 | 16 207 | 2 208 | 17 209 | 6 210 | 6 211 | 6 212 | 15 213 | 17 214 | 10 215 | 13 216 | 0 217 | 8 218 | 8 219 | 1 220 | 6 221 | 16 222 | 16 223 | 2 224 | 11 225 | 4 226 | 20 227 | 13 228 | 2 229 | 21 230 | 14 231 | 1 232 | 1 233 | 4 234 | 10 235 | 5 236 | 4 237 | 13 238 | 11 239 | 8 240 | 5 241 | 9 242 | 3 243 | 4 244 | 4 245 | 9 246 | 7 247 | 1 248 | 11 249 | 2 250 | 18 251 | 10 252 | 7 253 | 1 254 | 4 255 | 4 256 | 6 257 | 12 258 | 3 259 | 5 260 | 22 261 | 10 262 | 2 263 | 4 264 | 6 265 | 5 266 | 9 267 | 12 268 | 16 269 | 8 270 | 1 271 | 6 272 | 4 273 | 7 274 | 16 275 | 8 276 | 12 277 | 1 278 | 8 279 | 1 280 | 2 281 | 23 282 | - 283 | 4 284 | 2 285 | 9 286 | 6 287 | 5 288 | 5 289 | 11 290 | 9 291 | 3 292 | 5 293 | 3 294 | 7 295 | 3 296 | 14 297 | 8 298 | 1 299 | 2 300 | 1 301 | 3 302 | 2 303 | 4 304 | 9 305 | 2 306 | 7 307 | 0 308 | 3 309 | 1 310 | 4 311 | 5 312 | 3 313 | 4 314 | 1 315 | 4 316 | 13 317 | 12 318 | 8 319 | 14 320 | 0 321 | 2 322 | 2 323 | 1 324 | 2 325 | 0 326 | 9 327 | 10 328 | 2 329 | 8 330 | 12 331 | 9 332 | 9 333 | 3 334 | 2 335 | 3 336 | 7 337 | 9 338 | 4 339 | 7 340 | 4 341 | 9 342 | 2 343 | 5 344 | 0 345 | 0 346 | 4 347 | 7 348 | 8 349 | 5 350 | 5 351 | 5 352 | 9 353 | 3 354 | 13 355 | 7 356 | 3 357 | 3 358 | 2 359 | 14 360 | 10 361 | 14 362 | 8 363 | 9 364 | 2 365 | 2 366 | 10 367 | 3 368 | 1 369 | 5 370 | 11 371 | 1 372 | 1 373 | 6 374 | 2 375 | 2 376 | 2 377 | 10 378 | 8 379 | 1 380 | 1 381 | 8 382 | 14 383 | 1 384 | 1 385 | 14 386 | 14 387 | 1 388 | 2 389 | 13 390 | 10 391 | 14 392 | 6 393 | - 394 | 1 395 | 1 396 | 2 397 | 2 398 | 1 399 | 1 400 | 2 401 | 1 402 | 0 403 | 1 404 | 1 405 | 0 406 | 1 407 | 1 408 | 0 409 | - 410 | 1 411 | 7 412 | 2 413 | 7 414 | 0 415 | - 416 | 0 417 | 0 418 | 4 419 | 4 420 | 1 421 | 3 422 | 0 423 | 6 424 | 1 425 | 2 426 | 6 427 | 3 428 | 0 429 | 6 430 | 3 431 | 2 432 | 1 433 | 4 434 | 5 435 | 5 436 | 1 437 | 6 438 | 0 439 | 1 440 | 1 441 | 6 442 | 6 443 | 2 444 | 3 445 | 0 446 | 1 447 | 2 448 | 5 449 | 6 450 | 5 451 | 6 452 | 0 453 | 3 454 | 5 455 | 6 456 | 6 457 | 3 458 | 1 459 | 3 460 | 6 461 | 4 462 | 4 463 | 4 464 | 5 465 | 6 466 | 6 467 | 1 468 | - 469 | 0 470 | 1 471 | - 472 | 2 473 | 2 474 | 1 475 | 2 476 | 0 477 | 1 478 | - 479 | 25 480 | 25 481 | 3 482 | 25 483 | 3 484 | 25 485 | 25 486 | 13 487 | 4 488 | 25 489 | 23 490 | 25 491 | 2 492 | 5 493 | 25 494 | 1 495 | 16 496 | 9 497 | 2 498 | 25 499 | 24 500 | 10 501 | 25 502 | 12 503 | 1 504 | 16 505 | 4 506 | 5 507 | 3 508 | 24 509 | 25 510 | 25 511 | 23 512 | 0 513 | 13 514 | 24 515 | 10 516 | 8 517 | 1 518 | 25 519 | 20 520 | 25 521 | 9 522 | 4 523 | 15 524 | 25 525 | 25 526 | 25 527 | 7 528 | 6 529 | 25 530 | 8 531 | 1 532 | 8 533 | 11 534 | 7 535 | 25 536 | 1 537 | 13 538 | 25 539 | 13 540 | 25 541 | 12 542 | 25 543 | 24 544 | 19 545 | 6 546 | 3 547 | 6 548 | 3 549 | 15 550 | 3 551 | 11 552 | 5 553 | 8 554 | 24 555 | 12 556 | 25 557 | 19 558 | 25 559 | 6 560 | 11 561 | 25 562 | 23 563 | 25 564 | 19 565 | 10 566 | 5 567 | 9 568 | 4 569 | 8 570 | 12 571 | 17 572 | 16 573 | 25 574 | 8 575 | 15 576 | 13 577 | 4 578 | 16 579 | 20 580 | 12 581 | 6 582 | 3 583 | 17 584 | 6 585 | 7 586 | 16 587 | 4 588 | 6 589 | 4 590 | 1 591 | 20 592 | 25 593 | 25 594 | 14 595 | 2 596 | 24 597 | 24 598 | 15 599 | 25 600 | 24 601 | 5 602 | 25 603 | 9 604 | 25 605 | 14 606 | 12 607 | 25 608 | 21 609 | 25 610 | 7 611 | 25 612 | 25 613 | 25 614 | 2 615 | 6 616 | 16 617 | 7 618 | 23 619 | 6 620 | 25 621 | 19 622 | 25 623 | 8 624 | 25 625 | 24 626 | 11 627 | 5 628 | 18 629 | 20 630 | 5 631 | 3 632 | 11 633 | 25 634 | 25 635 | 11 636 | 25 637 | 15 638 | 13 639 | 7 640 | 20 641 | 6 642 | 11 643 | 25 644 | 3 645 | 14 646 | 6 647 | 14 648 | 18 649 | 25 650 | 7 651 | 4 652 | 25 653 | 12 654 | 24 655 | 12 656 | 25 657 | 25 658 | 3 659 | 25 660 | 11 661 | 20 662 | 25 663 | 15 664 | 25 665 | 25 666 | 6 667 | 3 668 | 10 669 | 18 670 | 25 671 | 5 672 | 25 673 | 15 674 | 25 675 | 7 676 | 5 677 | 25 678 | 25 679 | 25 680 | 25 681 | 18 682 | 10 683 | 23 684 | 1 685 | 25 686 | 7 687 | 4 688 | 25 689 | 3 690 | 14 691 | 19 692 | 25 693 | 25 694 | 14 695 | 13 696 | 25 697 | 25 698 | 25 699 | 3 700 | 25 701 | 1 702 | 7 703 | 3 704 | 9 705 | 6 706 | 18 707 | 24 708 | 13 709 | 6 710 | 25 711 | 12 712 | 8 713 | 7 714 | 25 715 | 7 716 | 18 717 | 25 718 | 5 719 | 23 720 | 10 721 | 1 722 | 2 723 | 5 724 | 25 725 | 25 726 | 25 727 | 19 728 | 10 729 | 15 730 | 25 731 | 17 732 | 25 733 | 25 734 | 25 735 | 2 736 | 11 737 | 3 738 | 2 739 | 24 740 | 23 741 | 11 742 | 18 743 | 23 744 | 4 745 | 21 746 | 13 747 | 4 748 | 19 749 | 5 750 | 24 751 | 16 752 | 24 753 | 25 754 | 12 755 | 25 756 | 25 757 | 21 758 | 4 759 | 24 760 | 7 761 | 23 762 | 1 763 | 12 764 | 16 765 | 25 766 | 20 767 | 25 768 | 8 769 | 25 770 | 25 771 | 4 772 | 17 773 | 4 774 | 25 775 | 25 776 | 4 777 | 25 778 | 13 779 | 25 780 | 25 781 | 4 782 | 23 783 | 25 784 | 8 785 | 6 786 | 4 787 | 8 788 | 25 789 | 5 790 | 5 791 | 25 792 | 24 793 | 25 794 | 19 795 | 6 796 | 5 797 | 25 798 | 5 799 | 3 800 | 25 801 | 12 802 | 9 803 | 25 804 | 2 805 | 24 806 | 17 807 | 25 808 | 8 809 | 2 810 | 15 811 | 3 812 | 1 813 | 1 814 | 15 815 | 2 816 | 13 817 | 18 818 | 25 819 | 23 820 | 24 821 | 25 822 | 21 823 | 7 824 | 9 825 | 15 826 | 25 827 | 25 828 | 12 829 | 2 830 | 19 831 | 7 832 | 4 833 | 1 834 | 6 835 | 8 836 | 5 837 | 13 838 | 20 839 | 1 840 | 25 841 | 25 842 | 6 843 | 25 844 | 3 845 | 18 846 | 25 847 | 25 848 | 17 849 | 25 850 | 7 851 | 13 852 | 3 853 | 25 854 | 23 855 | 14 856 | 15 857 | 20 858 | 24 859 | 24 860 | 25 861 | 16 862 | 12 863 | 25 864 | 7 865 | 5 866 | 19 867 | 16 868 | 21 869 | 1 870 | 2 871 | 23 872 | 16 873 | 25 874 | 20 875 | 25 876 | 7 877 | 1 878 | 17 879 | 1 880 | 8 881 | 25 882 | 14 883 | 3 884 | 25 885 | 25 886 | 25 887 | 5 888 | 1 889 | 4 890 | 12 891 | 1 892 | 14 893 | 12 894 | 7 895 | 3 896 | 19 897 | 5 898 | 13 899 | 25 900 | 25 901 | 15 902 | 11 903 | 25 904 | 12 905 | 25 906 | 17 907 | 4 908 | 9 909 | 20 910 | 25 911 | 25 912 | 4 913 | 8 914 | 12 915 | 25 916 | 9 917 | 4 918 | 25 919 | 9 920 | 25 921 | 9 922 | 22 923 | 7 924 | 2 925 | 1 926 | 11 927 | 25 928 | 20 929 | 18 930 | 19 931 | 6 932 | 8 933 | 5 934 | 6 935 | 7 936 | 15 937 | 5 938 | 3 939 | 25 940 | 25 941 | 25 942 | 2 943 | 25 944 | 3 945 | 25 946 | 1 947 | 19 948 | 5 949 | 25 950 | - 951 | 10 952 | 5 953 | 2 954 | 10 955 | 9 956 | 2 957 | 0 958 | 1 959 | 1 960 | 1 961 | 10 962 | 7 963 | 4 964 | 10 965 | 4 966 | 10 967 | 3 968 | 1 969 | 2 970 | 3 971 | 2 972 | 7 973 | 10 974 | 8 975 | 4 976 | 1 977 | 10 978 | 5 979 | 5 980 | 10 981 | 1 982 | 3 983 | 0 984 | 7 985 | 8 986 | 1 987 | 10 988 | 2 989 | 1 990 | 5 991 | 8 992 | 7 993 | 1 994 | 10 995 | 10 996 | 3 997 | 3 998 | 9 999 | 8 1000 | 5 1001 | 2 1002 | 1 1003 | 1 1004 | 10 1005 | 2 1006 | 10 1007 | 2 1008 | 10 1009 | 2 1010 | 2 1011 | 3 1012 | 4 1013 | 4 1014 | 1 1015 | 5 1016 | 2 1017 | 5 1018 | 4 1019 | 7 1020 | 9 1021 | 7 1022 | 10 1023 | 4 1024 | 1 1025 | 10 1026 | 4 1027 | 4 1028 | 10 1029 | 8 1030 | 7 1031 | 4 1032 | 1 1033 | - 1034 | 3 1035 | 1 1036 | 7 1037 | 1 1038 | 7 1039 | 1 1040 | 4 1041 | 1 1042 | 5 1043 | 2 1044 | 7 1045 | 2 1046 | 11 1047 | 2 1048 | 16 1049 | 9 1050 | 1 1051 | 1 1052 | 5 1053 | 9 1054 | 11 1055 | 6 1056 | 3 1057 | 3 1058 | 6 1059 | 8 1060 | 2 1061 | 9 1062 | 2 1063 | 3 1064 | 7 1065 | 2 1066 | 4 1067 | 4 1068 | 4 1069 | 2 1070 | 2 1071 | 1 1072 | 7 1073 | 3 1074 | 3 1075 | 3 1076 | 9 1077 | 3 1078 | 14 1079 | 2 1080 | 2 1081 | 7 1082 | 4 1083 | 16 1084 | 7 1085 | 4 1086 | 16 1087 | 3 1088 | 5 1089 | 3 1090 | 9 1091 | 10 1092 | 16 1093 | 1 1094 | 5 1095 | 1 1096 | 9 1097 | 2 1098 | - 1099 | 3 1100 | 4 1101 | 0 1102 | 7 1103 | 3 1104 | 1 1105 | 10 1106 | 2 1107 | 6 1108 | 6 1109 | 3 1110 | 2 1111 | 1 1112 | 4 1113 | 7 1114 | 11 1115 | 4 1116 | 14 1117 | 6 1118 | 12 1119 | 0 1120 | 5 1121 | 7 1122 | 5 1123 | 3 1124 | 12 1125 | 4 1126 | 10 1127 | 3 1128 | 15 1129 | 1 1130 | 14 1131 | 8 1132 | 2 1133 | 10 1134 | 8 1135 | 6 1136 | 4 1137 | 15 1138 | 11 1139 | 2 1140 | 10 1141 | 1 1142 | 5 1143 | 11 1144 | 2 1145 | 2 1146 | 9 1147 | 6 1148 | 6 1149 | 1 1150 | 4 1151 | 5 1152 | 13 1153 | 0 1154 | 1 1155 | 12 1156 | 3 1157 | 2 1158 | 6 1159 | 16 1160 | 1 1161 | 5 1162 | 6 1163 | 5 1164 | 8 1165 | 5 1166 | 3 1167 | 9 1168 | 0 1169 | 3 1170 | 7 1171 | 2 1172 | 7 1173 | 15 1174 | 1 1175 | 4 1176 | 7 1177 | 1 1178 | 3 1179 | 2 1180 | 20 1181 | 6 1182 | 4 1183 | 2 1184 | 7 1185 | 12 1186 | 13 1187 | 3 1188 | 4 1189 | 4 1190 | 2 1191 | 4 1192 | 14 1193 | 3 1194 | 4 1195 | 2 1196 | 3 1197 | 8 1198 | 12 1199 | 1 1200 | 0 1201 | 5 1202 | 1 1203 | 9 1204 | 2 1205 | 19 1206 | 20 1207 | 10 1208 | 10 1209 | 17 1210 | 4 1211 | 2 1212 | 2 1213 | 1 1214 | 2 1215 | 7 1216 | 11 1217 | 12 1218 | 7 1219 | 1 1220 | 7 1221 | 2 1222 | 14 1223 | 7 1224 | 7 1225 | 7 1226 | 5 1227 | 1 1228 | 1 1229 | 0 1230 | 10 1231 | 0 1232 | 4 1233 | 8 1234 | 4 1235 | 0 1236 | 16 1237 | - 1238 | 2 1239 | 2 1240 | 2 1241 | 1 1242 | 1 1243 | 2 1244 | 2 1245 | 0 1246 | 2 1247 | 1 1248 | 1 1249 | 2 1250 | 1 1251 | 1 1252 | 2 1253 | 2 1254 | 2 1255 | 2 1256 | 2 1257 | 1 1258 | 2 1259 | 0 1260 | - 1261 | 12 1262 | 14 1263 | 1 1264 | 9 1265 | 8 1266 | 13 1267 | 13 1268 | 4 1269 | 8 1270 | 11 1271 | 1 1272 | 1 1273 | 5 1274 | 5 1275 | 12 1276 | 3 1277 | 25 1278 | 7 1279 | 4 1280 | 6 1281 | 1 1282 | 6 1283 | 4 1284 | 2 1285 | 4 1286 | 5 1287 | 1 1288 | 19 1289 | 4 1290 | 11 1291 | 0 1292 | 4 1293 | 12 1294 | 10 1295 | 4 1296 | 8 1297 | 4 1298 | 4 1299 | 7 1300 | 6 1301 | 13 1302 | 9 1303 | 9 1304 | 3 1305 | 1 1306 | 1 1307 | 4 1308 | 4 1309 | 13 1310 | 3 1311 | 22 1312 | 9 1313 | 11 1314 | 1 1315 | 21 1316 | 4 1317 | 9 1318 | 1 1319 | 22 1320 | 2 1321 | 4 1322 | 3 1323 | 3 1324 | - 1325 | 3 1326 | 2 1327 | 6 1328 | 2 1329 | 4 1330 | 0 1331 | 3 1332 | 5 1333 | 5 1334 | 6 1335 | 1 1336 | 6 1337 | 1 1338 | 6 1339 | 6 1340 | 1 1341 | 2 1342 | 9 1343 | 3 1344 | 1 1345 | 0 1346 | 1 1347 | 0 1348 | 6 1349 | 7 1350 | 3 1351 | 3 1352 | 10 1353 | 2 1354 | 9 1355 | 2 1356 | 7 1357 | 3 1358 | 6 1359 | 0 1360 | 5 1361 | 10 1362 | 2 1363 | 0 1364 | 1 1365 | 7 1366 | 1 1367 | 5 1368 | 1 1369 | 5 1370 | 5 1371 | 3 1372 | 5 1373 | 4 1374 | 1 1375 | 3 1376 | 1 1377 | 5 1378 | 1 1379 | 4 1380 | 10 1381 | 4 1382 | 1 1383 | 7 1384 | 1 1385 | 2 1386 | 1 1387 | 2 1388 | 8 1389 | 7 1390 | 8 1391 | 2 1392 | 9 1393 | 8 1394 | 5 1395 | 7 1396 | 1 1397 | 7 1398 | - 1399 | 2 1400 | 3 1401 | 3 1402 | 3 1403 | 1 1404 | 1 1405 | 3 1406 | 1 1407 | 0 1408 | 3 1409 | 2 1410 | - 1411 | 12 1412 | 22 1413 | 3 1414 | 1 1415 | 9 1416 | 9 1417 | 25 1418 | 12 1419 | 3 1420 | 10 1421 | 1 1422 | 3 1423 | 16 1424 | 2 1425 | 15 1426 | 14 1427 | 7 1428 | 9 1429 | 3 1430 | 2 1431 | 10 1432 | 16 1433 | 1 1434 | 19 1435 | 0 1436 | 3 1437 | 8 1438 | 1 1439 | 4 1440 | 19 1441 | 2 1442 | 2 1443 | 8 1444 | 17 1445 | 6 1446 | 17 1447 | 6 1448 | 10 1449 | 1 1450 | 25 1451 | 16 1452 | 9 1453 | 6 1454 | 2 1455 | 16 1456 | 7 1457 | 11 1458 | 3 1459 | 3 1460 | 9 1461 | 5 1462 | 10 1463 | 16 1464 | 4 1465 | 7 1466 | 4 1467 | 13 1468 | 9 1469 | 9 1470 | 1 1471 | 11 1472 | 2 1473 | 4 1474 | 2 1475 | 7 1476 | 8 1477 | 21 1478 | 6 1479 | 6 1480 | 2 1481 | 2 1482 | 17 1483 | 5 1484 | 11 1485 | 5 1486 | 5 1487 | 2 1488 | 17 1489 | 2 1490 | 19 1491 | 4 1492 | 7 1493 | 25 1494 | 5 1495 | 9 1496 | 3 1497 | 3 1498 | 2 1499 | 7 1500 | 4 1501 | 12 1502 | 5 1503 | 2 1504 | 14 1505 | 5 1506 | 1 1507 | 8 1508 | 7 1509 | 2 1510 | 2 1511 | 16 1512 | 6 1513 | 3 1514 | 3 1515 | 2 1516 | 8 1517 | 23 1518 | 8 1519 | 2 1520 | 19 1521 | 17 1522 | 3 1523 | 11 1524 | 1 1525 | 4 1526 | 13 1527 | 13 1528 | 5 1529 | 19 1530 | 9 1531 | 6 1532 | 3 1533 | 2 1534 | 23 1535 | 23 1536 | 1 1537 | 0 1538 | 14 1539 | 2 1540 | 12 1541 | 6 1542 | 5 1543 | 15 1544 | 10 1545 | 5 1546 | 2 1547 | 3 1548 | 3 1549 | 15 1550 | 13 1551 | 18 1552 | 3 1553 | 6 1554 | 6 1555 | 6 1556 | 15 1557 | 3 1558 | 3 1559 | 26 1560 | 3 1561 | 16 1562 | 1 1563 | 6 1564 | 5 1565 | 15 1566 | 16 1567 | 7 1568 | 9 1569 | 9 1570 | 23 1571 | 6 1572 | 5 1573 | 6 1574 | 15 1575 | 18 1576 | 4 1577 | 2 1578 | 13 1579 | 1 1580 | 6 1581 | 7 1582 | 5 1583 | 6 1584 | 10 1585 | 21 1586 | 2 1587 | 3 1588 | 8 1589 | 3 1590 | 14 1591 | 3 1592 | 10 1593 | 2 1594 | 19 1595 | 10 1596 | 1 1597 | 6 1598 | 4 1599 | 2 1600 | 7 1601 | 2 1602 | 12 1603 | 12 1604 | 3 1605 | 11 1606 | 22 1607 | 2 1608 | 7 1609 | 16 1610 | 0 1611 | 15 1612 | 7 1613 | 3 1614 | - 1615 | 3 1616 | 10 1617 | 4 1618 | 8 1619 | 1 1620 | 3 1621 | 8 1622 | 10 1623 | 8 1624 | 2 1625 | 0 1626 | 4 1627 | 3 1628 | 3 1629 | 1 1630 | 2 1631 | 2 1632 | 9 1633 | 8 1634 | 4 1635 | 3 1636 | 7 1637 | 7 1638 | 11 1639 | 3 1640 | 0 1641 | 2 1642 | 7 1643 | 0 1644 | 1 1645 | 11 1646 | 4 1647 | 5 1648 | 4 1649 | 0 1650 | 11 1651 | 1 1652 | 0 1653 | 2 1654 | 6 1655 | 4 1656 | 4 1657 | 2 1658 | 0 1659 | 6 1660 | 2 1661 | 8 1662 | 7 1663 | 7 1664 | 5 1665 | 5 1666 | 11 1667 | 7 1668 | 0 1669 | 3 1670 | 1 1671 | 4 1672 | - 1673 | 0 1674 | - 1675 | 2 1676 | 2 1677 | 20 1678 | 17 1679 | 0 1680 | 8 1681 | 8 1682 | 11 1683 | 13 1684 | 2 1685 | 8 1686 | 2 1687 | 3 1688 | 5 1689 | 4 1690 | 5 1691 | 3 1692 | 15 1693 | 1 1694 | 5 1695 | 11 1696 | 4 1697 | 4 1698 | 17 1699 | 2 1700 | 9 1701 | 3 1702 | 2 1703 | 3 1704 | 20 1705 | 4 1706 | 3 1707 | 3 1708 | 13 1709 | 12 1710 | 3 1711 | 6 1712 | 6 1713 | 2 1714 | 2 1715 | 5 1716 | 3 1717 | 6 1718 | 4 1719 | 2 1720 | 5 1721 | 6 1722 | 1 1723 | 4 1724 | 1 1725 | 14 1726 | 5 1727 | 8 1728 | 5 1729 | 10 1730 | 4 1731 | 2 1732 | 7 1733 | 1 1734 | 3 1735 | 4 1736 | 4 1737 | 11 1738 | 7 1739 | 3 1740 | 20 1741 | 9 1742 | 15 1743 | 4 1744 | 11 1745 | 3 1746 | 2 1747 | 13 1748 | 7 1749 | 3 1750 | 4 1751 | 7 1752 | 6 1753 | 5 1754 | 9 1755 | 1 1756 | 7 1757 | 1 1758 | 1 1759 | 4 1760 | 0 1761 | 13 1762 | 4 1763 | 20 1764 | 19 1765 | 1 1766 | 13 1767 | 2 1768 | 5 1769 | 10 1770 | 1 1771 | 16 1772 | 2 1773 | 5 1774 | 16 1775 | 7 1776 | 1 1777 | 5 1778 | 2 1779 | 13 1780 | 10 1781 | 4 1782 | 5 1783 | 4 1784 | 1 1785 | - 1786 | 4 1787 | 3 1788 | 4 1789 | 2 1790 | 4 1791 | - 1792 | 12 1793 | 2 1794 | 1 1795 | 3 1796 | 2 1797 | 7 1798 | 1 1799 | 13 1800 | 4 1801 | 6 1802 | 8 1803 | 3 1804 | 5 1805 | 13 1806 | 8 1807 | 4 1808 | 3 1809 | 13 1810 | 8 1811 | 3 1812 | 3 1813 | 7 1814 | 15 1815 | 5 1816 | 8 1817 | 0 1818 | 14 1819 | 11 1820 | 1 1821 | 7 1822 | 6 1823 | 5 1824 | 0 1825 | 5 1826 | 9 1827 | 14 1828 | 2 1829 | 3 1830 | 2 1831 | 11 1832 | 14 1833 | 6 1834 | 8 1835 | 0 1836 | 10 1837 | 4 1838 | 6 1839 | 8 1840 | 3 1841 | 5 1842 | 4 1843 | 7 1844 | 3 1845 | 3 1846 | 1 1847 | 17 1848 | 1 1849 | 10 1850 | 13 1851 | 19 1852 | 5 1853 | 5 1854 | 1 1855 | 0 1856 | 3 1857 | 7 1858 | 4 1859 | 4 1860 | 15 1861 | 18 1862 | 0 1863 | 11 1864 | 5 1865 | 6 1866 | 7 1867 | 5 1868 | 6 1869 | 1 1870 | 3 1871 | 2 1872 | 2 1873 | 8 1874 | 3 1875 | 2 1876 | - 1877 | 4 1878 | 3 1879 | 5 1880 | 9 1881 | 8 1882 | 2 1883 | 11 1884 | 10 1885 | 5 1886 | 4 1887 | 9 1888 | 9 1889 | 11 1890 | 4 1891 | 2 1892 | 2 1893 | 2 1894 | 10 1895 | 4 1896 | 2 1897 | 3 1898 | 2 1899 | 11 1900 | 0 1901 | 5 1902 | 3 1903 | 1 1904 | - 1905 | 2 1906 | 2 1907 | 2 1908 | 2 1909 | 0 1910 | 3 1911 | 2 1912 | 2 1913 | 2 1914 | 2 1915 | 2 1916 | 3 1917 | 0 1918 | 1 1919 | 0 1920 | 1 1921 | 2 1922 | - 1923 | 1 1924 | 3 1925 | 5 1926 | 1 1927 | 1 1928 | 3 1929 | 5 1930 | 3 1931 | 1 1932 | 3 1933 | 5 1934 | 5 1935 | 3 1936 | 5 1937 | 4 1938 | 5 1939 | 3 1940 | 3 1941 | 1 1942 | 1 1943 | 5 1944 | 5 1945 | 5 1946 | 5 1947 | 3 1948 | 4 1949 | 3 1950 | 3 1951 | 4 1952 | 3 1953 | 1 1954 | 2 1955 | 3 1956 | 4 1957 | 2 1958 | 5 1959 | 3 1960 | 3 1961 | 5 1962 | 3 1963 | 2 1964 | 2 1965 | - 1966 | 1 1967 | 3 1968 | 6 1969 | 4 1970 | 10 1971 | 3 1972 | 3 1973 | 13 1974 | 3 1975 | 3 1976 | 4 1977 | 9 1978 | 16 1979 | 6 1980 | 15 1981 | 9 1982 | 5 1983 | 18 1984 | 6 1985 | 8 1986 | 5 1987 | 1 1988 | 11 1989 | 1 1990 | 0 1991 | 3 1992 | 9 1993 | 7 1994 | 11 1995 | 1 1996 | 4 1997 | 8 1998 | 1 1999 | 18 2000 | 10 2001 | 11 2002 | 6 2003 | 9 2004 | 4 2005 | 16 2006 | 0 2007 | 4 2008 | 4 2009 | 5 2010 | 1 2011 | 4 2012 | 7 2013 | 9 2014 | 1 2015 | 12 2016 | 1 2017 | 4 2018 | 5 2019 | 2 2020 | 11 2021 | 8 2022 | 8 2023 | 1 2024 | 13 2025 | 6 2026 | 1 2027 | 12 2028 | 1 2029 | 5 2030 | 17 2031 | 0 2032 | 3 2033 | 12 2034 | 4 2035 | 18 2036 | 7 2037 | 12 2038 | 7 2039 | 3 2040 | 0 2041 | 5 2042 | 2 2043 | 9 2044 | 7 2045 | 16 2046 | 10 2047 | 11 2048 | 1 2049 | 18 2050 | 12 2051 | 2 2052 | 2 2053 | 5 2054 | 4 2055 | 6 2056 | 4 2057 | 2 2058 | 1 2059 | 6 2060 | 12 2061 | 9 2062 | 4 2063 | 12 2064 | 1 2065 | 0 2066 | 7 2067 | 8 2068 | 4 2069 | 13 2070 | 10 2071 | 3 2072 | 5 2073 | 4 2074 | 3 2075 | 2 2076 | 3 2077 | 12 2078 | 10 2079 | 2 2080 | 3 2081 | 4 2082 | 1 2083 | 2 2084 | 11 2085 | 3 2086 | 1 2087 | 0 2088 | 9 2089 | 5 2090 | 2 2091 | 3 2092 | 3 2093 | 3 2094 | 7 2095 | 1 2096 | 4 2097 | 3 2098 | 6 2099 | 7 2100 | 4 2101 | 4 2102 | 11 2103 | 15 2104 | 3 2105 | 3 2106 | 10 2107 | 7 2108 | 12 2109 | 4 2110 | 2 2111 | 2 2112 | 4 2113 | 3 2114 | 16 2115 | 4 2116 | 9 2117 | 2 2118 | 1 2119 | 1 2120 | 0 2121 | 12 2122 | 4 2123 | 4 2124 | 3 2125 | 6 2126 | 2 2127 | 14 2128 | 1 2129 | 15 2130 | 3 2131 | 2 2132 | 3 2133 | 3 2134 | 0 2135 | 8 2136 | 3 2137 | 10 2138 | 3 2139 | 9 2140 | 1 2141 | 11 2142 | 12 2143 | 1 2144 | 11 2145 | 2 2146 | 1 2147 | 4 2148 | 11 2149 | 12 2150 | 3 2151 | 2 2152 | - 2153 | 2 2154 | 1 2155 | - 2156 | 1 2157 | 1 2158 | 1 2159 | 1 2160 | 1 2161 | 1 2162 | - 2163 | 5 2164 | 2 2165 | 3 2166 | 3 2167 | 4 2168 | 0 2169 | 0 2170 | 0 2171 | 4 2172 | 4 2173 | 1 2174 | - 2175 | 4 2176 | 3 2177 | 2 2178 | 1 2179 | 1 2180 | 6 2181 | 0 2182 | 8 2183 | 3 2184 | 3 2185 | 3 2186 | 3 2187 | 8 2188 | 2 2189 | 5 2190 | 1 2191 | 2 2192 | 1 2193 | 1 2194 | 3 2195 | 2 2196 | 1 2197 | 2 2198 | 1 2199 | 0 2200 | 2 2201 | 1 2202 | 2 2203 | 4 2204 | 1 2205 | 0 2206 | 5 2207 | 2 2208 | 2 2209 | 1 2210 | 1 2211 | 1 2212 | 1 2213 | 8 2214 | 1 2215 | - 2216 | 66 2217 | 44 2218 | 25 2219 | 10 2220 | 53 2221 | 29 2222 | 5 2223 | 41 2224 | 32 2225 | 21 2226 | 4 2227 | 11 2228 | 13 2229 | 15 2230 | 5 2231 | 37 2232 | 4 2233 | 69 2234 | 42 2235 | 60 2236 | 6 2237 | 30 2238 | 40 2239 | 68 2240 | 14 2241 | 8 2242 | 13 2243 | 68 2244 | 2 2245 | 13 2246 | 9 2247 | 1 2248 | 2 2249 | 6 2250 | 31 2251 | 13 2252 | 59 2253 | 16 2254 | 9 2255 | 0 2256 | 1 2257 | 13 2258 | 64 2259 | 15 2260 | 25 2261 | 40 2262 | 51 2263 | 39 2264 | 56 2265 | 41 2266 | 12 2267 | 19 2268 | 69 2269 | 44 2270 | 23 2271 | 55 2272 | 9 2273 | 12 2274 | 4 2275 | 40 2276 | 44 2277 | 58 2278 | 68 2279 | 63 2280 | 42 2281 | 10 2282 | 68 2283 | 38 2284 | 28 2285 | 36 2286 | 69 2287 | 33 2288 | 16 2289 | 31 2290 | 3 2291 | 44 2292 | 64 2293 | 9 2294 | 56 2295 | 27 2296 | 14 2297 | 39 2298 | 54 2299 | 25 2300 | 26 2301 | 47 2302 | 4 2303 | 4 2304 | 69 2305 | 32 2306 | 18 2307 | 5 2308 | 33 2309 | 69 2310 | 68 2311 | 5 2312 | 11 2313 | 69 2314 | 4 2315 | 8 2316 | 2 2317 | 37 2318 | 69 2319 | 28 2320 | 40 2321 | 9 2322 | 3 2323 | 14 2324 | 6 2325 | 27 2326 | 23 2327 | 15 2328 | 2 2329 | 20 2330 | 69 2331 | 43 2332 | 11 2333 | 54 2334 | 7 2335 | 17 2336 | 3 2337 | 21 2338 | 52 2339 | 1 2340 | 22 2341 | 45 2342 | 5 2343 | 8 2344 | 48 2345 | 25 2346 | 25 2347 | 3 2348 | 29 2349 | 42 2350 | 6 2351 | 8 2352 | 22 2353 | 46 2354 | 5 2355 | 56 2356 | 11 2357 | 12 2358 | 44 2359 | 4 2360 | 25 2361 | 45 2362 | 2 2363 | 10 2364 | 68 2365 | 64 2366 | 59 2367 | 61 2368 | 45 2369 | 25 2370 | 18 2371 | 42 2372 | 35 2373 | 16 2374 | 8 2375 | 27 2376 | 68 2377 | 19 2378 | 30 2379 | 8 2380 | 32 2381 | 48 2382 | 28 2383 | 3 2384 | 34 2385 | 14 2386 | 1 2387 | 63 2388 | 5 2389 | 18 2390 | 38 2391 | 15 2392 | 61 2393 | 38 2394 | 2 2395 | 36 2396 | 4 2397 | 51 2398 | 28 2399 | 45 2400 | 1 2401 | 55 2402 | 15 2403 | 8 2404 | 0 2405 | 50 2406 | 1 2407 | 69 2408 | 19 2409 | 59 2410 | 30 2411 | 9 2412 | 18 2413 | 23 2414 | 4 2415 | 55 2416 | 14 2417 | 3 2418 | 5 2419 | 48 2420 | 17 2421 | 1 2422 | 6 2423 | - 2424 | 5 2425 | 3 2426 | 1 2427 | 1 2428 | 2 2429 | 2 2430 | 0 2431 | 4 2432 | 3 2433 | 2 2434 | - 2435 | 9 2436 | 9 2437 | 5 2438 | 9 2439 | 3 2440 | 2 2441 | 2 2442 | 1 2443 | 10 2444 | 2 2445 | 11 2446 | 3 2447 | 10 2448 | 13 2449 | 8 2450 | 1 2451 | 7 2452 | 17 2453 | 3 2454 | 2 2455 | 16 2456 | 10 2457 | 4 2458 | 0 2459 | 3 2460 | 2 2461 | 2 2462 | 5 2463 | 8 2464 | 5 2465 | 12 2466 | 5 2467 | 8 2468 | 1 2469 | 5 2470 | 2 2471 | 1 2472 | 1 2473 | 2 2474 | 3 2475 | 6 2476 | 12 2477 | 15 2478 | 0 2479 | 10 2480 | 0 2481 | 9 2482 | 11 2483 | 4 2484 | 2 2485 | 1 2486 | 0 2487 | 11 2488 | 7 2489 | 7 2490 | 1 2491 | 3 2492 | 1 2493 | 6 2494 | 1 2495 | 2 2496 | 10 2497 | 13 2498 | 4 2499 | 3 2500 | 11 2501 | 6 2502 | 7 2503 | 1 2504 | 1 2505 | 2 2506 | 3 2507 | 3 2508 | 15 2509 | 0 2510 | 5 2511 | 5 2512 | 1 2513 | 13 2514 | 9 2515 | 3 2516 | 3 2517 | 2 2518 | 7 2519 | 10 2520 | 4 2521 | 0 2522 | 14 2523 | 4 2524 | 6 2525 | 5 2526 | 0 2527 | 5 2528 | 2 2529 | 0 2530 | 6 2531 | 5 2532 | 15 2533 | 2 2534 | 12 2535 | 12 2536 | 0 2537 | 3 2538 | 1 2539 | 11 2540 | 4 2541 | 7 2542 | 9 2543 | 5 2544 | 2 2545 | 4 2546 | 2 2547 | 4 2548 | 2 2549 | 12 2550 | 17 2551 | 2 2552 | 2 2553 | 1 2554 | 1 2555 | 6 2556 | 1 2557 | 1 2558 | 1 2559 | 1 2560 | 1 2561 | 17 2562 | 6 2563 | 7 2564 | 13 2565 | 1 2566 | 6 2567 | 8 2568 | 1 2569 | 4 2570 | 3 2571 | 2 2572 | 10 2573 | 1 2574 | 3 2575 | 6 2576 | 1 2577 | 6 2578 | 17 2579 | 2 2580 | 2 2581 | 14 2582 | 5 2583 | 1 2584 | 8 2585 | 2 2586 | 13 2587 | 2 2588 | 0 2589 | 3 2590 | 11 2591 | 7 2592 | 2 2593 | 4 2594 | 10 2595 | 16 2596 | 4 2597 | 3 2598 | 12 2599 | 3 2600 | 11 2601 | 3 2602 | 5 2603 | 2 2604 | 1 2605 | 5 2606 | 4 2607 | 12 2608 | 5 2609 | 8 2610 | 2 2611 | 1 2612 | 6 2613 | 2 2614 | 6 2615 | 4 2616 | 1 2617 | 10 2618 | 1 2619 | 5 2620 | 1 2621 | 1 2622 | 0 2623 | 17 2624 | 0 2625 | 20 2626 | 5 2627 | 2 2628 | 3 2629 | 12 2630 | 6 2631 | 19 2632 | 4 2633 | 2 2634 | 1 2635 | 6 2636 | 1 2637 | 10 2638 | 5 2639 | 7 2640 | 1 2641 | 1 2642 | 6 2643 | 10 2644 | 6 2645 | 3 2646 | 1 2647 | 5 2648 | 7 2649 | - 2650 | 6 2651 | 4 2652 | 0 2653 | 3 2654 | 4 2655 | 4 2656 | 0 2657 | 1 2658 | 3 2659 | 5 2660 | 3 2661 | 2 2662 | 2 2663 | 6 2664 | 0 2665 | 0 2666 | 0 2667 | 0 2668 | 4 2669 | - 2670 | 10 2671 | 5 2672 | 4 2673 | 12 2674 | 4 2675 | 2 2676 | 1 2677 | 13 2678 | 1 2679 | 3 2680 | 8 2681 | 9 2682 | 3 2683 | 7 2684 | 4 2685 | 1 2686 | 7 2687 | 6 2688 | 7 2689 | 2 2690 | 2 2691 | 4 2692 | 9 2693 | 12 2694 | 9 2695 | 7 2696 | 1 2697 | 12 2698 | 2 2699 | 10 2700 | 4 2701 | 1 2702 | 9 2703 | 2 2704 | 9 2705 | 5 2706 | 3 2707 | 3 2708 | 1 2709 | 6 2710 | 3 2711 | 18 2712 | 9 2713 | 7 2714 | 11 2715 | 4 2716 | 5 2717 | 2 2718 | 3 2719 | 0 2720 | 9 2721 | 6 2722 | 3 2723 | 2 2724 | 8 2725 | 4 2726 | 8 2727 | 5 2728 | 17 2729 | 5 2730 | 3 2731 | 1 2732 | 1 2733 | 12 2734 | 4 2735 | 6 2736 | 7 2737 | 18 2738 | 5 2739 | 14 2740 | 7 2741 | 13 2742 | 7 2743 | 10 2744 | 8 2745 | 2 2746 | 1 2747 | 2 2748 | 9 2749 | 14 2750 | 6 2751 | 4 2752 | 6 2753 | 6 2754 | 18 2755 | 7 2756 | 6 2757 | 3 2758 | 12 2759 | 16 2760 | 10 2761 | 10 2762 | 12 2763 | 4 2764 | 4 2765 | 5 2766 | 8 2767 | 2 2768 | 2 2769 | 2 2770 | 0 2771 | 2 2772 | 1 2773 | 1 2774 | 3 2775 | 2 2776 | 16 2777 | 6 2778 | 5 2779 | 1 2780 | 10 2781 | 2 2782 | 5 2783 | 2 2784 | 1 2785 | 4 2786 | 1 2787 | 7 2788 | 7 2789 | 13 2790 | 15 2791 | 3 2792 | 18 2793 | 11 2794 | 5 2795 | 2 2796 | 2 2797 | 17 2798 | 3 2799 | 2 2800 | 1 2801 | 1 2802 | 1 2803 | 2 2804 | 2 2805 | 13 2806 | 12 2807 | 3 2808 | 0 2809 | 7 2810 | 3 2811 | 1 2812 | 16 2813 | 8 2814 | 18 2815 | 1 2816 | 0 2817 | 14 2818 | 1 2819 | 16 2820 | 3 2821 | 11 2822 | 18 2823 | 6 2824 | 0 2825 | 1 2826 | 3 2827 | 6 2828 | 6 2829 | 1 2830 | 10 2831 | 0 2832 | 5 2833 | 11 2834 | 3 2835 | 5 2836 | 8 2837 | 4 2838 | 10 2839 | 4 2840 | 1 2841 | 1 2842 | 4 2843 | 13 2844 | 1 2845 | 1 2846 | 1 2847 | 4 2848 | 13 2849 | 4 2850 | 4 2851 | 16 2852 | 11 2853 | 13 2854 | 6 2855 | 2 2856 | 6 2857 | 16 2858 | 4 2859 | 1 2860 | 11 2861 | 15 2862 | 8 2863 | 1 2864 | 0 2865 | 7 2866 | 2 2867 | 6 2868 | 3 2869 | 16 2870 | 6 2871 | 6 2872 | 14 2873 | 15 2874 | 8 2875 | 8 2876 | 2 2877 | 7 2878 | 0 2879 | 15 2880 | - 2881 | 11 2882 | 1 2883 | 5 2884 | 3 2885 | 5 2886 | 5 2887 | 8 2888 | 3 2889 | 10 2890 | 9 2891 | 1 2892 | 3 2893 | 8 2894 | 9 2895 | 23 2896 | 8 2897 | 1 2898 | 5 2899 | 17 2900 | 7 2901 | 12 2902 | 3 2903 | 17 2904 | 1 2905 | 24 2906 | 0 2907 | 11 2908 | 5 2909 | 9 2910 | 4 2911 | 14 2912 | 8 2913 | 9 2914 | 4 2915 | 6 2916 | 4 2917 | 19 2918 | 4 2919 | 14 2920 | 1 2921 | 18 2922 | 20 2923 | 11 2924 | 6 2925 | 12 2926 | 23 2927 | 9 2928 | 7 2929 | 5 2930 | 7 2931 | 4 2932 | 1 2933 | 15 2934 | 7 2935 | 24 2936 | 13 2937 | 6 2938 | 13 2939 | 3 2940 | 9 2941 | 1 2942 | 3 2943 | 8 2944 | 24 2945 | 14 2946 | 9 2947 | 2 2948 | 4 2949 | 19 2950 | 10 2951 | 12 2952 | 12 2953 | 23 2954 | 2 2955 | 1 2956 | 15 2957 | 21 2958 | 2 2959 | 2 2960 | 6 2961 | 22 2962 | 19 2963 | 22 2964 | 24 2965 | 2 2966 | 9 2967 | 7 2968 | 9 2969 | 4 2970 | 5 2971 | 9 2972 | 24 2973 | 9 2974 | 13 2975 | 5 2976 | 1 2977 | 7 2978 | 1 2979 | 10 2980 | 3 2981 | 15 2982 | 2 2983 | 1 2984 | 8 2985 | 24 2986 | 11 2987 | 6 2988 | 7 2989 | 1 2990 | 22 2991 | 23 2992 | 1 2993 | 0 2994 | 24 2995 | 2 2996 | 7 2997 | 1 2998 | 5 2999 | 6 3000 | 24 3001 | 17 3002 | 15 3003 | 1 3004 | 1 3005 | 1 3006 | 5 3007 | 10 3008 | 24 3009 | 2 3010 | 2 3011 | 18 3012 | 2 3013 | 6 3014 | 19 3015 | 9 3016 | 10 3017 | 20 3018 | 7 3019 | 21 3020 | 14 3021 | 14 3022 | 15 3023 | 3 3024 | 24 3025 | 3 3026 | 10 3027 | 7 3028 | 12 3029 | 1 3030 | 2 3031 | 4 3032 | 12 3033 | 24 3034 | 11 3035 | 2 3036 | 11 3037 | 1 3038 | 16 3039 | 1 3040 | 10 3041 | 3 3042 | 8 3043 | 6 3044 | 7 3045 | 22 3046 | 15 3047 | 22 3048 | 1 3049 | 7 3050 | 2 3051 | 15 3052 | 4 3053 | 12 3054 | 3 3055 | 1 3056 | 14 3057 | 24 3058 | 2 3059 | 6 3060 | 19 3061 | 9 3062 | 12 3063 | 1 3064 | 12 3065 | 24 3066 | 7 3067 | 9 3068 | 2 3069 | 8 3070 | 19 3071 | 8 3072 | 3 3073 | 23 3074 | 4 3075 | 4 3076 | 23 3077 | 2 3078 | 11 3079 | 5 3080 | 16 3081 | 17 3082 | 22 3083 | 4 3084 | 14 3085 | 21 3086 | 6 3087 | 2 3088 | 5 3089 | 4 3090 | 5 3091 | 10 3092 | 1 3093 | 2 3094 | 4 3095 | 6 3096 | 16 3097 | 13 3098 | 9 3099 | 9 3100 | 7 3101 | 1 3102 | 17 3103 | 8 3104 | 8 3105 | 7 3106 | 24 3107 | 24 3108 | 7 3109 | 1 3110 | 1 3111 | 6 3112 | 16 3113 | 3 3114 | 24 3115 | 8 3116 | 2 3117 | 24 3118 | 10 3119 | 12 3120 | 5 3121 | 18 3122 | 1 3123 | 23 3124 | 4 3125 | 13 3126 | 2 3127 | 19 3128 | 24 3129 | 24 3130 | 3 3131 | 6 3132 | 6 3133 | 9 3134 | 19 3135 | 8 3136 | 11 3137 | 7 3138 | 1 3139 | 6 3140 | 10 3141 | 23 3142 | 6 3143 | 13 3144 | 17 3145 | 7 3146 | 21 3147 | 20 3148 | 18 3149 | 23 3150 | 3 3151 | 21 3152 | 1 3153 | 9 3154 | 16 3155 | 12 3156 | 1 3157 | 16 3158 | 10 3159 | 3 3160 | 6 3161 | 22 3162 | 4 3163 | 12 3164 | 20 3165 | 3 3166 | 6 3167 | 6 3168 | 1 3169 | 3 3170 | 8 3171 | 7 3172 | 9 3173 | 5 3174 | 5 3175 | 11 3176 | 15 3177 | 24 3178 | 5 3179 | 1 3180 | 0 3181 | 5 3182 | 24 3183 | 12 3184 | 19 3185 | 3 3186 | 20 3187 | 2 3188 | 3 3189 | 2 3190 | 4 3191 | 4 3192 | 13 3193 | 12 3194 | 1 3195 | 10 3196 | 4 3197 | 5 3198 | 9 3199 | 1 3200 | 13 3201 | 7 3202 | 6 3203 | 24 3204 | 11 3205 | 15 3206 | 8 3207 | 12 3208 | 1 3209 | 11 3210 | 7 3211 | 12 3212 | 10 3213 | 5 3214 | 24 3215 | 2 3216 | 6 3217 | 12 3218 | 7 3219 | 14 3220 | 22 3221 | 6 3222 | 24 3223 | 11 3224 | 24 3225 | 24 3226 | 24 3227 | 8 3228 | 3 3229 | 18 3230 | 19 3231 | 6 3232 | 5 3233 | 24 3234 | 6 3235 | 8 3236 | 1 3237 | 9 3238 | 3 3239 | 1 3240 | 4 3241 | 12 3242 | 22 3243 | 11 3244 | 5 3245 | 8 3246 | 5 3247 | 3 3248 | 4 3249 | 24 3250 | 8 3251 | 16 3252 | 24 3253 | 11 3254 | 16 3255 | 22 3256 | 21 3257 | 8 3258 | 8 3259 | 2 3260 | 24 3261 | 9 3262 | 2 3263 | 17 3264 | 6 3265 | 4 3266 | 3 3267 | 10 3268 | 1 3269 | 4 3270 | 13 3271 | 3 3272 | 12 3273 | 2 3274 | 4 3275 | 6 3276 | 1 3277 | 18 3278 | 11 3279 | 9 3280 | 11 3281 | 4 3282 | 10 3283 | 24 3284 | 4 3285 | 14 3286 | 3 3287 | 2 3288 | 11 3289 | 17 3290 | 10 3291 | 7 3292 | 24 3293 | 10 3294 | 10 3295 | 20 3296 | 8 3297 | 19 3298 | 20 3299 | 7 3300 | 6 3301 | 7 3302 | 10 3303 | 18 3304 | 21 3305 | 14 3306 | 19 3307 | 18 3308 | 0 3309 | 9 3310 | 7 3311 | 24 3312 | 22 3313 | 9 3314 | 4 3315 | 19 3316 | 7 3317 | 11 3318 | 24 3319 | 9 3320 | 8 3321 | 13 3322 | 11 3323 | 19 3324 | 5 3325 | 0 3326 | 13 3327 | 9 3328 | 10 3329 | 15 3330 | 20 3331 | 1 3332 | 2 3333 | 14 3334 | 13 3335 | 9 3336 | 12 3337 | 1 3338 | 5 3339 | 17 3340 | 16 3341 | 21 3342 | 2 3343 | 3 3344 | 13 3345 | 1 3346 | 5 3347 | 7 3348 | 2 3349 | 2 3350 | 3 3351 | 0 3352 | 7 3353 | 3 3354 | 13 3355 | 7 3356 | 6 3357 | 1 3358 | 19 3359 | 2 3360 | 7 3361 | 12 3362 | 9 3363 | 2 3364 | 12 3365 | 1 3366 | 24 3367 | 24 3368 | 9 3369 | 1 3370 | 18 3371 | 2 3372 | 10 3373 | 9 3374 | 24 3375 | 12 3376 | 1 3377 | 18 3378 | 7 3379 | 1 3380 | 19 3381 | 8 3382 | 7 3383 | 19 3384 | 15 3385 | 24 3386 | 3 3387 | 20 3388 | 7 3389 | 10 3390 | 13 3391 | 0 3392 | 24 3393 | 11 3394 | 24 3395 | 24 3396 | 24 3397 | 12 3398 | 14 3399 | 4 3400 | 8 3401 | 2 3402 | 19 3403 | 3 3404 | 7 3405 | 9 3406 | 18 3407 | 8 3408 | 1 3409 | 7 3410 | 24 3411 | 20 3412 | 13 3413 | 14 3414 | 18 3415 | 20 3416 | 13 3417 | 6 3418 | 6 3419 | 24 3420 | 24 3421 | 5 3422 | 21 3423 | 3 3424 | 0 3425 | 6 3426 | 7 3427 | 4 3428 | 1 3429 | 9 3430 | 1 3431 | 24 3432 | 7 3433 | 5 3434 | 19 3435 | 17 3436 | 15 3437 | 24 3438 | 2 3439 | 13 3440 | 9 3441 | 9 3442 | 9 3443 | 7 3444 | 5 3445 | 2 3446 | 8 3447 | 2 3448 | 8 3449 | 0 3450 | 2 3451 | 8 3452 | 11 3453 | 3 3454 | 1 3455 | 11 3456 | 0 3457 | 23 3458 | 10 3459 | 18 3460 | 8 3461 | 10 3462 | 7 3463 | 18 3464 | 7 3465 | 8 3466 | 20 3467 | 8 3468 | 5 3469 | 8 3470 | 18 3471 | 10 3472 | 17 3473 | 4 3474 | 2 3475 | 18 3476 | 3 3477 | 2 3478 | 2 3479 | 5 3480 | 24 3481 | 1 3482 | 2 3483 | 2 3484 | 9 3485 | 2 3486 | 2 3487 | 4 3488 | 16 3489 | 21 3490 | 22 3491 | 10 3492 | 14 3493 | 1 3494 | 2 3495 | 0 3496 | 4 3497 | 5 3498 | 13 3499 | 21 3500 | 7 3501 | 24 3502 | 2 3503 | 9 3504 | 18 3505 | 24 3506 | 14 3507 | 2 3508 | 7 3509 | 1 3510 | 24 3511 | 0 3512 | 19 3513 | 6 3514 | 5 3515 | 12 3516 | 10 3517 | 16 3518 | 3 3519 | 8 3520 | 9 3521 | 2 3522 | 11 3523 | 15 3524 | 18 3525 | 19 3526 | 18 3527 | 7 3528 | 9 3529 | 1 3530 | 8 3531 | 1 3532 | 2 3533 | 6 3534 | 2 3535 | 4 3536 | 10 3537 | 11 3538 | 17 3539 | 16 3540 | 4 3541 | 17 3542 | 15 3543 | 24 3544 | 12 3545 | 20 3546 | 2 3547 | 24 3548 | 21 3549 | 10 3550 | 11 3551 | 2 3552 | 5 3553 | 9 3554 | 3 3555 | 11 3556 | 1 3557 | 5 3558 | 6 3559 | 9 3560 | 10 3561 | 12 3562 | 15 3563 | 17 3564 | 6 3565 | 8 3566 | 1 3567 | 3 3568 | 9 3569 | 24 3570 | 4 3571 | 24 3572 | 11 3573 | 3 3574 | 2 3575 | 19 3576 | 16 3577 | 7 3578 | 16 3579 | 2 3580 | 24 3581 | 9 3582 | 3 3583 | 1 3584 | 5 3585 | 24 3586 | 12 3587 | 17 3588 | 21 3589 | 4 3590 | 24 3591 | 4 3592 | 3 3593 | 5 3594 | 3 3595 | 21 3596 | 1 3597 | 2 3598 | 3 3599 | 10 3600 | 2 3601 | 4 3602 | 0 3603 | 22 3604 | 1 3605 | 5 3606 | 2 3607 | 10 3608 | 8 3609 | 17 3610 | 8 3611 | 18 3612 | 13 3613 | 2 3614 | 6 3615 | 2 3616 | 17 3617 | 23 3618 | 0 3619 | 5 3620 | 3 3621 | 5 3622 | 19 3623 | 22 3624 | 24 3625 | 24 3626 | 14 3627 | 7 3628 | 6 3629 | 23 3630 | 9 3631 | 19 3632 | 14 3633 | 3 3634 | 24 3635 | 21 3636 | 22 3637 | 10 3638 | 1 3639 | 10 3640 | 8 3641 | 22 3642 | 4 3643 | 20 3644 | 16 3645 | 24 3646 | 24 3647 | 8 3648 | 14 3649 | 14 3650 | 7 3651 | 10 3652 | 1 3653 | 1 3654 | 2 3655 | 24 3656 | 4 3657 | 3 3658 | 3 3659 | 4 3660 | 18 3661 | 20 3662 | 7 3663 | 2 3664 | 24 3665 | 16 3666 | 1 3667 | 23 3668 | - 3669 | 55 3670 | 32 3671 | 30 3672 | 50 3673 | 0 3674 | 24 3675 | 57 3676 | 53 3677 | 14 3678 | 17 3679 | 26 3680 | 34 3681 | 31 3682 | 11 3683 | 26 3684 | 64 3685 | 13 3686 | 76 3687 | 55 3688 | 59 3689 | 2 3690 | 14 3691 | 11 3692 | 28 3693 | 4 3694 | 37 3695 | 66 3696 | 68 3697 | 81 3698 | 12 3699 | 14 3700 | 33 3701 | 65 3702 | 41 3703 | 5 3704 | 0 3705 | 30 3706 | 40 3707 | 22 3708 | 1 3709 | 67 3710 | 26 3711 | 2 3712 | 2 3713 | 23 3714 | 15 3715 | 54 3716 | 13 3717 | 9 3718 | 52 3719 | 2 3720 | 12 3721 | 31 3722 | 1 3723 | 59 3724 | 18 3725 | 39 3726 | 10 3727 | 51 3728 | 28 3729 | 10 3730 | 63 3731 | 19 3732 | 9 3733 | 25 3734 | 58 3735 | 16 3736 | 7 3737 | 49 3738 | 19 3739 | 13 3740 | 49 3741 | 16 3742 | 12 3743 | 41 3744 | 45 3745 | 14 3746 | 10 3747 | 51 3748 | 33 3749 | 1 3750 | 5 3751 | 14 3752 | 13 3753 | 54 3754 | 4 3755 | 13 3756 | 2 3757 | 75 3758 | 39 3759 | 50 3760 | 32 3761 | 81 3762 | 5 3763 | 62 3764 | 13 3765 | 15 3766 | 0 3767 | 11 3768 | 4 3769 | 29 3770 | 22 3771 | 23 3772 | 26 3773 | 21 3774 | 18 3775 | 37 3776 | 20 3777 | 1 3778 | 2 3779 | 48 3780 | 32 3781 | 1 3782 | 14 3783 | 7 3784 | 69 3785 | 50 3786 | 2 3787 | 8 3788 | 25 3789 | 19 3790 | 47 3791 | 11 3792 | 6 3793 | 66 3794 | 1 3795 | 53 3796 | 26 3797 | 22 3798 | 18 3799 | 47 3800 | 6 3801 | 33 3802 | 69 3803 | 12 3804 | 6 3805 | 1 3806 | 64 3807 | 39 3808 | 62 3809 | 27 3810 | 30 3811 | 2 3812 | 35 3813 | 67 3814 | 54 3815 | 4 3816 | 13 3817 | 3 3818 | 26 3819 | 80 3820 | 25 3821 | 42 3822 | 9 3823 | 2 3824 | 23 3825 | 23 3826 | 6 3827 | 13 3828 | 28 3829 | 26 3830 | 35 3831 | 46 3832 | 76 3833 | 75 3834 | 37 3835 | 41 3836 | 42 3837 | 2 3838 | 1 3839 | 37 3840 | 42 3841 | 35 3842 | 41 3843 | 7 3844 | 31 3845 | 4 3846 | 67 3847 | 6 3848 | 30 3849 | 14 3850 | 17 3851 | 35 3852 | 21 3853 | 9 3854 | - 3855 | 4 3856 | 3 3857 | 4 3858 | 4 3859 | 15 3860 | 14 3861 | 7 3862 | 4 3863 | 2 3864 | 10 3865 | 3 3866 | 0 3867 | 0 3868 | 5 3869 | 2 3870 | 17 3871 | 2 3872 | 1 3873 | 1 3874 | 3 3875 | 9 3876 | 0 3877 | 10 3878 | 9 3879 | 1 3880 | 1 3881 | 1 3882 | 5 3883 | 6 3884 | 1 3885 | 15 3886 | 10 3887 | 5 3888 | 3 3889 | 4 3890 | 7 3891 | 4 3892 | 2 3893 | 5 3894 | 2 3895 | 12 3896 | 3 3897 | 1 3898 | 3 3899 | 4 3900 | 6 3901 | 3 3902 | 5 3903 | 1 3904 | 0 3905 | 11 3906 | 5 3907 | 2 3908 | 15 3909 | 11 3910 | 3 3911 | 1 3912 | 3 3913 | - 3914 | 1 3915 | 2 3916 | 5 3917 | 3 3918 | 5 3919 | 3 3920 | 5 3921 | 1 3922 | 2 3923 | 1 3924 | 1 3925 | 1 3926 | 0 3927 | 5 3928 | 4 3929 | 2 3930 | 5 3931 | 0 3932 | 3 3933 | 2 3934 | 2 3935 | 4 3936 | 0 3937 | - 3938 | 12 3939 | 0 3940 | 2 3941 | 6 3942 | 12 3943 | 3 3944 | 0 3945 | 9 3946 | 3 3947 | 9 3948 | 1 3949 | 1 3950 | 9 3951 | 4 3952 | 2 3953 | 2 3954 | 5 3955 | 2 3956 | 3 3957 | 5 3958 | 1 3959 | 8 3960 | 0 3961 | 4 3962 | 3 3963 | 0 3964 | 4 3965 | 1 3966 | - 3967 | 1 3968 | 6 3969 | 14 3970 | 1 3971 | 1 3972 | 4 3973 | 4 3974 | 1 3975 | 0 3976 | 5 3977 | 8 3978 | 3 3979 | 7 3980 | 1 3981 | 14 3982 | 4 3983 | 6 3984 | 12 3985 | 2 3986 | 1 3987 | 8 3988 | 4 3989 | 2 3990 | 1 3991 | 6 3992 | 2 3993 | 10 3994 | 0 3995 | 4 3996 | 1 3997 | 3 3998 | 4 3999 | 5 4000 | 3 4001 | 7 4002 | 0 4003 | 14 4004 | 1 4005 | 4 4006 | 1 4007 | 10 4008 | 14 4009 | 3 4010 | 2 4011 | 1 4012 | 2 4013 | 6 4014 | 1 4015 | 14 4016 | 11 4017 | - 4018 | 3 4019 | 0 4020 | 2 4021 | 2 4022 | 8 4023 | 12 4024 | 0 4025 | 3 4026 | 3 4027 | 1 4028 | 4 4029 | 10 4030 | 2 4031 | 12 4032 | 4 4033 | 1 4034 | 2 4035 | 5 4036 | 3 4037 | 7 4038 | 5 4039 | 2 4040 | 2 4041 | 1 4042 | 12 4043 | 6 4044 | 1 4045 | 2 4046 | 9 4047 | 4 4048 | 9 4049 | 8 4050 | 1 4051 | 6 4052 | 3 4053 | 2 4054 | 2 4055 | 2 4056 | 2 4057 | 5 4058 | 9 4059 | 15 4060 | 2 4061 | 2 4062 | 16 4063 | 4 4064 | 12 4065 | 4 4066 | 11 4067 | 1 4068 | 5 4069 | 1 4070 | 2 4071 | 8 4072 | 2 4073 | 7 4074 | 6 4075 | 5 4076 | 7 4077 | 7 4078 | 5 4079 | 14 4080 | 2 4081 | 0 4082 | 18 4083 | 0 4084 | 6 4085 | 0 4086 | 2 4087 | 1 4088 | 0 4089 | 11 4090 | 14 4091 | 2 4092 | 4 4093 | 1 4094 | 9 4095 | 3 4096 | 3 4097 | 1 4098 | 8 4099 | 13 4100 | 1 4101 | 6 4102 | 10 4103 | 6 4104 | 2 4105 | 3 4106 | 4 4107 | 9 4108 | 11 4109 | 10 4110 | 5 4111 | 7 4112 | 11 4113 | 14 4114 | 1 4115 | 11 4116 | 1 4117 | 11 4118 | 1 4119 | 7 4120 | 1 4121 | 8 4122 | 0 4123 | 1 4124 | 11 4125 | 4 4126 | 3 4127 | 5 4128 | 14 4129 | 2 4130 | 13 4131 | 3 4132 | 5 4133 | 3 4134 | 7 4135 | 4 4136 | 6 4137 | 7 4138 | 17 4139 | 5 4140 | 9 4141 | 5 4142 | 1 4143 | 6 4144 | 1 4145 | 6 4146 | 4 4147 | 7 4148 | 7 4149 | 5 4150 | 4 4151 | 12 4152 | 5 4153 | 13 4154 | 6 4155 | 3 4156 | 7 4157 | 4 4158 | 5 4159 | 14 4160 | 8 4161 | 7 4162 | 1 4163 | 8 4164 | 2 4165 | 4 4166 | 3 4167 | 6 4168 | 3 4169 | 12 4170 | 13 4171 | 9 4172 | 4 4173 | - 4174 | 4 4175 | 4 4176 | 2 4177 | 1 4178 | 3 4179 | 1 4180 | 6 4181 | 4 4182 | 3 4183 | 1 4184 | 18 4185 | 6 4186 | 15 4187 | 14 4188 | 4 4189 | 7 4190 | 11 4191 | 2 4192 | 3 4193 | 2 4194 | 9 4195 | 4 4196 | 17 4197 | 9 4198 | 1 4199 | 3 4200 | 13 4201 | 1 4202 | 1 4203 | 2 4204 | 6 4205 | 9 4206 | 5 4207 | 10 4208 | 13 4209 | 6 4210 | 11 4211 | 3 4212 | 8 4213 | 4 4214 | 5 4215 | 3 4216 | 5 4217 | 8 4218 | 4 4219 | 1 4220 | 19 4221 | 2 4222 | 9 4223 | 1 4224 | 1 4225 | 11 4226 | 6 4227 | 19 4228 | 1 4229 | 2 4230 | 5 4231 | 10 4232 | 2 4233 | 1 4234 | 7 4235 | 3 4236 | 14 4237 | 1 4238 | 13 4239 | 7 4240 | 5 4241 | 8 4242 | 3 4243 | 4 4244 | 13 4245 | 1 4246 | 8 4247 | 1 4248 | 3 4249 | 16 4250 | 4 4251 | 6 4252 | 2 4253 | 14 4254 | 1 4255 | 5 4256 | 1 4257 | 1 4258 | 9 4259 | 2 4260 | 2 4261 | 12 4262 | 3 4263 | 3 4264 | 4 4265 | 12 4266 | 12 4267 | 5 4268 | 13 4269 | 1 4270 | 9 4271 | 20 4272 | 6 4273 | 0 4274 | 2 4275 | 19 4276 | 7 4277 | 5 4278 | 4 4279 | 9 4280 | 4 4281 | 19 4282 | 16 4283 | 12 4284 | 10 4285 | 2 4286 | 5 4287 | 4 4288 | 1 4289 | 10 4290 | 1 4291 | 7 4292 | 11 4293 | 3 4294 | 4 4295 | 13 4296 | 3 4297 | 6 4298 | 11 4299 | 21 4300 | 4 4301 | 2 4302 | 2 4303 | - 4304 | 3 4305 | 1 4306 | 3 4307 | 2 4308 | 2 4309 | 8 4310 | 4 4311 | 6 4312 | 1 4313 | 4 4314 | 2 4315 | 0 4316 | 1 4317 | 4 4318 | 0 4319 | 3 4320 | 7 4321 | 2 4322 | 3 4323 | 3 4324 | 2 4325 | 3 4326 | 3 4327 | 2 4328 | 4 4329 | 5 4330 | - 4331 | 6 4332 | 9 4333 | 11 4334 | 18 4335 | 24 4336 | 48 4337 | 35 4338 | 44 4339 | 19 4340 | 7 4341 | 4 4342 | 16 4343 | 5 4344 | 31 4345 | 22 4346 | 49 4347 | 30 4348 | 20 4349 | 1 4350 | 12 4351 | 0 4352 | 13 4353 | 22 4354 | 38 4355 | 45 4356 | 32 4357 | 6 4358 | 64 4359 | 7 4360 | 50 4361 | 10 4362 | 5 4363 | 5 4364 | 45 4365 | 14 4366 | 49 4367 | 27 4368 | 14 4369 | 33 4370 | 5 4371 | 2 4372 | 3 4373 | 6 4374 | 5 4375 | 12 4376 | 33 4377 | 33 4378 | 53 4379 | 24 4380 | 2 4381 | 5 4382 | 10 4383 | 2 4384 | 1 4385 | 24 4386 | 4 4387 | 34 4388 | 17 4389 | 6 4390 | 30 4391 | 12 4392 | 2 4393 | 1 4394 | 27 4395 | 5 4396 | 16 4397 | 20 4398 | 25 4399 | 24 4400 | 17 4401 | 5 4402 | 33 4403 | 15 4404 | 2 4405 | 9 4406 | 25 4407 | 3 4408 | 11 4409 | 29 4410 | 2 4411 | 13 4412 | 14 4413 | 28 4414 | 24 4415 | 18 4416 | 0 4417 | 17 4418 | 60 4419 | 0 4420 | 6 4421 | 32 4422 | 2 4423 | 56 4424 | 26 4425 | 15 4426 | 40 4427 | 43 4428 | 3 4429 | 52 4430 | 15 4431 | 9 4432 | 23 4433 | 32 4434 | 3 4435 | 15 4436 | 18 4437 | 27 4438 | 4 4439 | 7 4440 | 4 4441 | 12 4442 | 40 4443 | 48 4444 | 25 4445 | 8 4446 | 11 4447 | 4 4448 | 29 4449 | 6 4450 | 8 4451 | 27 4452 | 5 4453 | 24 4454 | 30 4455 | 25 4456 | 7 4457 | 22 4458 | 12 4459 | 7 4460 | 10 4461 | 18 4462 | 10 4463 | 1 4464 | 4 4465 | 26 4466 | 45 4467 | 8 4468 | 36 4469 | 2 4470 | 12 4471 | 46 4472 | 62 4473 | 27 4474 | 24 4475 | 6 4476 | 11 4477 | 5 4478 | 8 4479 | 27 4480 | 12 4481 | 3 4482 | 16 4483 | 54 4484 | 50 4485 | 33 4486 | 8 4487 | 57 4488 | 47 4489 | 39 4490 | 30 4491 | 3 4492 | 24 4493 | 5 4494 | 41 4495 | 2 4496 | 2 4497 | 19 4498 | 6 4499 | 4 4500 | 0 4501 | 20 4502 | 17 4503 | 17 4504 | 26 4505 | 16 4506 | 26 4507 | 6 4508 | 2 4509 | 2 4510 | 5 4511 | 16 4512 | 41 4513 | 15 4514 | 10 4515 | 2 4516 | 11 4517 | 29 4518 | 1 4519 | 4 4520 | 6 4521 | 49 4522 | 38 4523 | 17 4524 | 18 4525 | 9 4526 | 1 4527 | 12 4528 | 16 4529 | 63 4530 | 14 4531 | 7 4532 | 26 4533 | 13 4534 | 5 4535 | 5 4536 | 15 4537 | 2 4538 | 3 4539 | 6 4540 | 52 4541 | 40 4542 | 44 4543 | 6 4544 | 52 4545 | 10 4546 | 24 4547 | 12 4548 | 9 4549 | 25 4550 | 45 4551 | 43 4552 | 7 4553 | 56 4554 | 14 4555 | 18 4556 | 1 4557 | 19 4558 | 42 4559 | 8 4560 | 30 4561 | 2 4562 | 7 4563 | 40 4564 | 3 4565 | 27 4566 | 19 4567 | 18 4568 | 3 4569 | 12 4570 | 7 4571 | 0 4572 | 40 4573 | 0 4574 | 6 4575 | 35 4576 | 12 4577 | 15 4578 | 36 4579 | 7 4580 | 14 4581 | 15 4582 | 26 4583 | 1 4584 | 58 4585 | 2 4586 | 5 4587 | 23 4588 | 12 4589 | 20 4590 | 6 4591 | 11 4592 | 9 4593 | 45 4594 | 29 4595 | 17 4596 | 10 4597 | 2 4598 | 5 4599 | 6 4600 | 12 4601 | 48 4602 | 5 4603 | 17 4604 | 1 4605 | 8 4606 | 56 4607 | 3 4608 | 54 4609 | 38 4610 | 54 4611 | 34 4612 | 4 4613 | 5 4614 | 59 4615 | 11 4616 | 11 4617 | 44 4618 | 23 4619 | 14 4620 | 37 4621 | 44 4622 | 64 4623 | 6 4624 | 0 4625 | 49 4626 | 4 4627 | 3 4628 | 4 4629 | 50 4630 | 3 4631 | 2 4632 | 2 4633 | 9 4634 | 10 4635 | 8 4636 | 24 4637 | 9 4638 | 18 4639 | 32 4640 | 21 4641 | 9 4642 | 23 4643 | 2 4644 | 13 4645 | 25 4646 | 31 4647 | 53 4648 | 20 4649 | 9 4650 | 10 4651 | 21 4652 | 4 4653 | 24 4654 | 12 4655 | 13 4656 | 22 4657 | 11 4658 | 9 4659 | 9 4660 | 10 4661 | 8 4662 | 25 4663 | 40 4664 | 17 4665 | 21 4666 | 4 4667 | 38 4668 | 13 4669 | 6 4670 | 31 4671 | 4 4672 | 14 4673 | 27 4674 | 27 4675 | 7 4676 | 45 4677 | 23 4678 | 32 4679 | 22 4680 | 6 4681 | 31 4682 | 23 4683 | 9 4684 | 14 4685 | 21 4686 | 19 4687 | 2 4688 | 33 4689 | 31 4690 | 15 4691 | 16 4692 | 6 4693 | 2 4694 | 25 4695 | 9 4696 | 10 4697 | 63 4698 | 14 4699 | 12 4700 | 20 4701 | 42 4702 | 12 4703 | 14 4704 | 10 4705 | 4 4706 | 35 4707 | 24 4708 | 4 4709 | 36 4710 | 1 4711 | 14 4712 | 4 4713 | 35 4714 | 36 4715 | 2 4716 | 13 4717 | 1 4718 | 6 4719 | 4 4720 | 58 4721 | 10 4722 | 3 4723 | 24 4724 | 10 4725 | 8 4726 | 58 4727 | 12 4728 | 17 4729 | 9 4730 | 49 4731 | 36 4732 | 6 4733 | 14 4734 | 6 4735 | 3 4736 | 20 4737 | 9 4738 | 51 4739 | 2 4740 | 29 4741 | 35 4742 | 24 4743 | 37 4744 | 25 4745 | 21 4746 | 4 4747 | 13 4748 | 13 4749 | 3 4750 | 29 4751 | 33 4752 | 28 4753 | 21 4754 | 16 4755 | 26 4756 | 36 4757 | 14 4758 | 16 4759 | 2 4760 | 0 4761 | 8 4762 | 20 4763 | 39 4764 | 32 4765 | 7 4766 | 1 4767 | 7 4768 | 3 4769 | 18 4770 | 1 4771 | 18 4772 | 17 4773 | 2 4774 | 7 4775 | 17 4776 | 17 4777 | 42 4778 | 5 4779 | 15 4780 | 23 4781 | 7 4782 | 10 4783 | 60 4784 | 24 4785 | 46 4786 | 13 4787 | 12 4788 | 45 4789 | 16 4790 | 30 4791 | 3 4792 | 1 4793 | 11 4794 | 50 4795 | 2 4796 | 61 4797 | 15 4798 | 8 4799 | 1 4800 | 8 4801 | 3 4802 | 52 4803 | 1 4804 | 11 4805 | 35 4806 | 12 4807 | 28 4808 | 16 4809 | 7 4810 | 43 4811 | 57 4812 | 6 4813 | 3 4814 | 4 4815 | 3 4816 | 64 4817 | 0 4818 | 38 4819 | 18 4820 | 5 4821 | 33 4822 | 37 4823 | 8 4824 | 11 4825 | 19 4826 | 36 4827 | 16 4828 | 30 4829 | 3 4830 | 13 4831 | 6 4832 | 13 4833 | 5 4834 | 48 4835 | 13 4836 | 22 4837 | 21 4838 | 32 4839 | 25 4840 | 40 4841 | 1 4842 | 56 4843 | 6 4844 | 4 4845 | 5 4846 | 4 4847 | 15 4848 | 28 4849 | 7 4850 | 39 4851 | 1 4852 | 1 4853 | 19 4854 | 24 4855 | 24 4856 | 15 4857 | 1 4858 | 4 4859 | 24 4860 | 41 4861 | 18 4862 | 5 4863 | 46 4864 | 11 4865 | 38 4866 | 24 4867 | 3 4868 | 39 4869 | 8 4870 | 21 4871 | 30 4872 | 48 4873 | 33 4874 | 3 4875 | 9 4876 | 0 4877 | 37 4878 | 21 4879 | 1 4880 | 19 4881 | 36 4882 | 41 4883 | 16 4884 | 38 4885 | 13 4886 | 2 4887 | 9 4888 | 25 4889 | 14 4890 | 5 4891 | 30 4892 | 8 4893 | 2 4894 | 38 4895 | 19 4896 | 29 4897 | 26 4898 | 1 4899 | 1 4900 | 10 4901 | 5 4902 | 11 4903 | 13 4904 | 33 4905 | 50 4906 | 3 4907 | 5 4908 | 4 4909 | 19 4910 | 14 4911 | 5 4912 | 8 4913 | 17 4914 | 3 4915 | 15 4916 | 2 4917 | 19 4918 | 29 4919 | 26 4920 | 7 4921 | 3 4922 | 6 4923 | 7 4924 | 23 4925 | 48 4926 | 24 4927 | 38 4928 | 13 4929 | 56 4930 | 10 4931 | 32 4932 | 6 4933 | 52 4934 | 6 4935 | 18 4936 | 38 4937 | 31 4938 | 25 4939 | 15 4940 | 2 4941 | 51 4942 | 2 4943 | 12 4944 | 2 4945 | 15 4946 | 13 4947 | 11 4948 | 10 4949 | 1 4950 | 12 4951 | 15 4952 | 3 4953 | 1 4954 | 18 4955 | 35 4956 | 2 4957 | 21 4958 | 6 4959 | 15 4960 | 45 4961 | 38 4962 | 1 4963 | 4 4964 | 23 4965 | 7 4966 | 5 4967 | 51 4968 | 5 4969 | 27 4970 | 14 4971 | 19 4972 | 26 4973 | 25 4974 | 6 4975 | 7 4976 | 17 4977 | 4 4978 | 29 4979 | 2 4980 | 2 4981 | 21 4982 | 17 4983 | 8 4984 | 22 4985 | 25 4986 | 17 4987 | 27 4988 | 31 4989 | 43 4990 | 22 4991 | 20 4992 | 2 4993 | 11 4994 | 9 4995 | 7 4996 | 6 4997 | 3 4998 | 18 4999 | 10 5000 | 8 5001 | 5 5002 | 5 5003 | 23 5004 | 27 5005 | 7 5006 | 2 5007 | 2 5008 | 14 5009 | 9 5010 | 16 5011 | 33 5012 | 4 5013 | 27 5014 | 19 5015 | 3 5016 | 23 5017 | 30 5018 | 20 5019 | 9 5020 | 7 5021 | 16 5022 | 3 5023 | 25 5024 | 17 5025 | 5 5026 | 15 5027 | 3 5028 | 22 5029 | 50 5030 | 19 5031 | 15 5032 | 8 5033 | 10 5034 | 14 5035 | 25 5036 | 14 5037 | 2 5038 | 2 5039 | 1 5040 | 34 5041 | 34 5042 | 13 5043 | 7 5044 | 17 5045 | 26 5046 | 3 5047 | 8 5048 | 23 5049 | 8 5050 | 21 5051 | 7 5052 | 5 5053 | 4 5054 | 10 5055 | 2 5056 | 8 5057 | 0 5058 | 56 5059 | 42 5060 | 13 5061 | 17 5062 | 2 5063 | 11 5064 | 15 5065 | 3 5066 | 3 5067 | 1 5068 | 10 5069 | 36 5070 | 24 5071 | 17 5072 | 14 5073 | 22 5074 | 34 5075 | 10 5076 | 0 5077 | 45 5078 | 14 5079 | 37 5080 | 7 5081 | 35 5082 | 38 5083 | 47 5084 | 21 5085 | 25 5086 | 27 5087 | 61 5088 | 27 5089 | 2 5090 | 4 5091 | 14 5092 | 37 5093 | 11 5094 | 6 5095 | 13 5096 | 6 5097 | 8 5098 | 50 5099 | 1 5100 | 29 5101 | 37 5102 | 2 5103 | 58 5104 | 38 5105 | 17 5106 | 29 5107 | 1 5108 | 37 5109 | 8 5110 | 1 5111 | 5 5112 | 11 5113 | 4 5114 | 12 5115 | 41 5116 | 49 5117 | 11 5118 | 39 5119 | 22 5120 | 23 5121 | 26 5122 | 5 5123 | 11 5124 | 9 5125 | 17 5126 | 21 5127 | 5 5128 | 1 5129 | 0 5130 | 14 5131 | 24 5132 | 14 5133 | 27 5134 | 16 5135 | 6 5136 | 8 5137 | 20 5138 | 2 5139 | 13 5140 | 5 5141 | 8 5142 | 3 5143 | 2 5144 | 30 5145 | 22 5146 | 10 5147 | 29 5148 | 31 5149 | 37 5150 | 29 5151 | 31 5152 | 16 5153 | 13 5154 | 61 5155 | 10 5156 | 34 5157 | 10 5158 | 18 5159 | 6 5160 | 8 5161 | 41 5162 | 4 5163 | - 5164 | 8 5165 | 13 5166 | 11 5167 | 7 5168 | 34 5169 | 30 5170 | 3 5171 | 36 5172 | 1 5173 | 4 5174 | 14 5175 | 6 5176 | 1 5177 | 16 5178 | 15 5179 | 25 5180 | 13 5181 | 2 5182 | 7 5183 | 24 5184 | 13 5185 | 20 5186 | 9 5187 | 20 5188 | 6 5189 | 4 5190 | 3 5191 | 10 5192 | 5 5193 | 8 5194 | 3 5195 | 7 5196 | 16 5197 | 22 5198 | 7 5199 | 18 5200 | 5 5201 | 1 5202 | 6 5203 | 7 5204 | 4 5205 | 12 5206 | 33 5207 | 9 5208 | 5 5209 | 1 5210 | 16 5211 | 12 5212 | 3 5213 | 12 5214 | 10 5215 | 4 5216 | 6 5217 | 8 5218 | 19 5219 | 5 5220 | 10 5221 | 8 5222 | 10 5223 | 3 5224 | 8 5225 | 7 5226 | 4 5227 | 22 5228 | 14 5229 | 17 5230 | 2 5231 | 2 5232 | 29 5233 | 11 5234 | 13 5235 | 4 5236 | 29 5237 | 2 5238 | 23 5239 | 11 5240 | 29 5241 | 21 5242 | 14 5243 | 7 5244 | 16 5245 | 19 5246 | 14 5247 | 29 5248 | 1 5249 | 2 5250 | 2 5251 | 33 5252 | 6 5253 | 34 5254 | 19 5255 | 4 5256 | 14 5257 | 6 5258 | 2 5259 | 17 5260 | 12 5261 | 1 5262 | 16 5263 | 6 5264 | 21 5265 | 1 5266 | 10 5267 | 9 5268 | 10 5269 | 5 5270 | 6 5271 | 1 5272 | 20 5273 | 2 5274 | 31 5275 | 3 5276 | 18 5277 | 34 5278 | 19 5279 | 15 5280 | 29 5281 | 4 5282 | 16 5283 | 6 5284 | 10 5285 | 6 5286 | 7 5287 | 18 5288 | 29 5289 | 13 5290 | 11 5291 | 15 5292 | 2 5293 | 3 5294 | 2 5295 | 4 5296 | 1 5297 | 17 5298 | 5 5299 | 1 5300 | 3 5301 | 9 5302 | 10 5303 | 33 5304 | 8 5305 | 8 5306 | 17 5307 | 11 5308 | 36 5309 | 8 5310 | 3 5311 | 6 5312 | 9 5313 | 3 5314 | 6 5315 | 26 5316 | 11 5317 | 3 5318 | 21 5319 | 8 5320 | 14 5321 | 5 5322 | 5 5323 | 24 5324 | 3 5325 | 2 5326 | 21 5327 | 1 5328 | 14 5329 | 16 5330 | 4 5331 | 4 5332 | 12 5333 | 1 5334 | 10 5335 | 18 5336 | 18 5337 | 12 5338 | 36 5339 | 3 5340 | 4 5341 | 3 5342 | 7 5343 | 10 5344 | 5 5345 | 7 5346 | 4 5347 | 9 5348 | 19 5349 | 23 5350 | 10 5351 | 7 5352 | 15 5353 | 5 5354 | 13 5355 | 15 5356 | 13 5357 | 10 5358 | 26 5359 | 3 5360 | 4 5361 | 9 5362 | 15 5363 | 17 5364 | 4 5365 | 12 5366 | 1 5367 | 11 5368 | 3 5369 | 23 5370 | 13 5371 | 9 5372 | 7 5373 | 22 5374 | 12 5375 | 17 5376 | 33 5377 | 6 5378 | 26 5379 | 17 5380 | 12 5381 | 9 5382 | 16 5383 | 3 5384 | 8 5385 | 14 5386 | 9 5387 | 26 5388 | 8 5389 | 2 5390 | 11 5391 | 11 5392 | 2 5393 | 7 5394 | 8 5395 | 12 5396 | 2 5397 | 6 5398 | 7 5399 | 21 5400 | 14 5401 | 7 5402 | 1 5403 | 11 5404 | 17 5405 | 14 5406 | 11 5407 | 16 5408 | 4 5409 | 5 5410 | 9 5411 | 10 5412 | 3 5413 | 14 5414 | 21 5415 | 19 5416 | 15 5417 | 3 5418 | 11 5419 | 2 5420 | 24 5421 | 15 5422 | 10 5423 | 8 5424 | 3 5425 | 16 5426 | 2 5427 | 13 5428 | 31 5429 | 3 5430 | 8 5431 | 5 5432 | 19 5433 | 5 5434 | 17 5435 | 10 5436 | 22 5437 | 2 5438 | 12 5439 | 5 5440 | 1 5441 | 7 5442 | 9 5443 | 6 5444 | 4 5445 | 5 5446 | 22 5447 | 4 5448 | 24 5449 | 5 5450 | 25 5451 | 6 5452 | 4 5453 | 9 5454 | 16 5455 | 7 5456 | 15 5457 | 0 5458 | 24 5459 | 9 5460 | 7 5461 | 2 5462 | 5 5463 | 2 5464 | 23 5465 | 20 5466 | 15 5467 | 18 5468 | 27 5469 | 4 5470 | 6 5471 | 12 5472 | 20 5473 | 5 5474 | 5 5475 | 25 5476 | 3 5477 | 12 5478 | 8 5479 | 1 5480 | 13 5481 | 7 5482 | 8 5483 | 2 5484 | 28 5485 | 3 5486 | 18 5487 | 2 5488 | 6 5489 | 4 5490 | 2 5491 | 2 5492 | 1 5493 | 3 5494 | 9 5495 | 21 5496 | 2 5497 | 30 5498 | 4 5499 | 14 5500 | 10 5501 | 2 5502 | 12 5503 | 8 5504 | 5 5505 | 12 5506 | 2 5507 | 10 5508 | 9 5509 | 2 5510 | 12 5511 | 6 5512 | 7 5513 | 4 5514 | 0 5515 | 3 5516 | 8 5517 | 2 5518 | 18 5519 | 17 5520 | 16 5521 | 11 5522 | 3 5523 | 9 5524 | 16 5525 | 36 5526 | 11 5527 | 2 5528 | 3 5529 | 14 5530 | 21 5531 | 18 5532 | 26 5533 | 7 5534 | 8 5535 | 4 5536 | 1 5537 | 3 5538 | 9 5539 | 18 5540 | 12 5541 | 6 5542 | 10 5543 | 4 5544 | 14 5545 | 6 5546 | 7 5547 | 10 5548 | 11 5549 | 8 5550 | 7 5551 | 23 5552 | 20 5553 | 11 5554 | 12 5555 | 3 5556 | 7 5557 | 30 5558 | 1 5559 | 5 5560 | 17 5561 | 16 5562 | 13 5563 | 5 5564 | 5 5565 | 14 5566 | 28 5567 | 17 5568 | 12 5569 | 20 5570 | 8 5571 | 1 5572 | 21 5573 | 24 5574 | 32 5575 | 14 5576 | 6 5577 | 6 5578 | 21 5579 | 14 5580 | 3 5581 | 2 5582 | 0 5583 | 15 5584 | 9 5585 | 24 5586 | 4 5587 | 1 5588 | 20 5589 | 3 5590 | 15 5591 | 8 5592 | 6 5593 | 3 5594 | 5 5595 | 12 5596 | 4 5597 | 5 5598 | 23 5599 | 10 5600 | 29 5601 | 26 5602 | 11 5603 | 13 5604 | 13 5605 | 3 5606 | 6 5607 | 29 5608 | 3 5609 | 16 5610 | 24 5611 | 12 5612 | 2 5613 | 24 5614 | 7 5615 | 17 5616 | 3 5617 | 36 5618 | 10 5619 | 1 5620 | 16 5621 | 20 5622 | 17 5623 | 0 5624 | 1 5625 | 0 5626 | 29 5627 | 4 5628 | 9 5629 | 2 5630 | 25 5631 | 7 5632 | 24 5633 | 11 5634 | 16 5635 | 12 5636 | 8 5637 | 0 5638 | 19 5639 | 8 5640 | 13 5641 | 9 5642 | 20 5643 | - 5644 | 1 5645 | 17 5646 | 2 5647 | 16 5648 | 28 5649 | 18 5650 | 45 5651 | 15 5652 | 4 5653 | 12 5654 | 3 5655 | 14 5656 | 4 5657 | 14 5658 | 12 5659 | 37 5660 | 1 5661 | 25 5662 | 2 5663 | 41 5664 | 0 5665 | 17 5666 | 0 5667 | 42 5668 | 7 5669 | 6 5670 | 21 5671 | 14 5672 | 20 5673 | 40 5674 | 31 5675 | 7 5676 | 32 5677 | 46 5678 | 26 5679 | 11 5680 | 35 5681 | 3 5682 | 54 5683 | 45 5684 | 7 5685 | 31 5686 | 1 5687 | 8 5688 | 17 5689 | 4 5690 | 0 5691 | 4 5692 | 8 5693 | 6 5694 | 10 5695 | 34 5696 | 3 5697 | 7 5698 | 10 5699 | 6 5700 | 5 5701 | 27 5702 | 20 5703 | 6 5704 | 7 5705 | 10 5706 | 9 5707 | 11 5708 | 7 5709 | 38 5710 | 54 5711 | 52 5712 | 10 5713 | 4 5714 | 17 5715 | 15 5716 | 11 5717 | 30 5718 | 6 5719 | 17 5720 | 23 5721 | 6 5722 | 41 5723 | 1 5724 | 18 5725 | 18 5726 | 30 5727 | 1 5728 | 7 5729 | 13 5730 | 14 5731 | 19 5732 | 46 5733 | 13 5734 | 10 5735 | 4 5736 | 9 5737 | 15 5738 | 21 5739 | 5 5740 | 6 5741 | 29 5742 | 26 5743 | 30 5744 | 29 5745 | 11 5746 | 8 5747 | 4 5748 | 12 5749 | 30 5750 | 4 5751 | 50 5752 | 42 5753 | 42 5754 | 3 5755 | 7 5756 | 25 5757 | 2 5758 | 3 5759 | 33 5760 | 1 5761 | 44 5762 | 6 5763 | 16 5764 | 2 5765 | 45 5766 | 3 5767 | 2 5768 | 1 5769 | 22 5770 | 47 5771 | 61 5772 | 1 5773 | 27 5774 | 2 5775 | 17 5776 | 27 5777 | 2 5778 | 2 5779 | 9 5780 | 3 5781 | 3 5782 | 56 5783 | 10 5784 | 29 5785 | 50 5786 | 2 5787 | 2 5788 | 24 5789 | 4 5790 | 27 5791 | 1 5792 | 10 5793 | 33 5794 | 11 5795 | 5 5796 | 18 5797 | 10 5798 | 49 5799 | 19 5800 | 20 5801 | 42 5802 | 20 5803 | 3 5804 | 18 5805 | 44 5806 | 9 5807 | 22 5808 | 18 5809 | 26 5810 | 10 5811 | 11 5812 | 40 5813 | 16 5814 | 44 5815 | 6 5816 | 2 5817 | 13 5818 | 2 5819 | 34 5820 | 21 5821 | 24 5822 | 27 5823 | 20 5824 | 4 5825 | 12 5826 | 2 5827 | 35 5828 | 8 5829 | 30 5830 | 12 5831 | 57 5832 | 26 5833 | 24 5834 | 2 5835 | 9 5836 | 0 5837 | 16 5838 | 1 5839 | 10 5840 | 1 5841 | 3 5842 | 11 5843 | 23 5844 | 4 5845 | 2 5846 | 7 5847 | 35 5848 | 50 5849 | 6 5850 | 4 5851 | 4 5852 | 4 5853 | 0 5854 | 10 5855 | 9 5856 | 38 5857 | 7 5858 | 2 5859 | 10 5860 | 2 5861 | 24 5862 | 7 5863 | 46 5864 | 2 5865 | 15 5866 | 10 5867 | 23 5868 | 20 5869 | 53 5870 | 6 5871 | 13 5872 | 54 5873 | 33 5874 | 2 5875 | 23 5876 | 0 5877 | 4 5878 | 3 5879 | 21 5880 | 4 5881 | 17 5882 | 3 5883 | 7 5884 | 2 5885 | 5 5886 | 39 5887 | 11 5888 | 6 5889 | 14 5890 | 12 5891 | 45 5892 | 19 5893 | 18 5894 | 31 5895 | 17 5896 | 18 5897 | 18 5898 | 7 5899 | 5 5900 | 30 5901 | 13 5902 | 32 5903 | 5 5904 | 8 5905 | 2 5906 | 2 5907 | 44 5908 | 15 5909 | 26 5910 | 18 5911 | 5 5912 | 19 5913 | 27 5914 | 20 5915 | 2 5916 | 2 5917 | 10 5918 | 13 5919 | 25 5920 | 6 5921 | 27 5922 | 31 5923 | 26 5924 | 0 5925 | 11 5926 | 28 5927 | 3 5928 | 28 5929 | 54 5930 | 59 5931 | 3 5932 | 14 5933 | 7 5934 | 11 5935 | 17 5936 | 33 5937 | 7 5938 | 56 5939 | 16 5940 | 10 5941 | 22 5942 | 2 5943 | 15 5944 | 2 5945 | 7 5946 | 8 5947 | 7 5948 | 35 5949 | 11 5950 | 2 5951 | 1 5952 | 7 5953 | 15 5954 | 3 5955 | 51 5956 | 3 5957 | 22 5958 | 47 5959 | 1 5960 | 12 5961 | 17 5962 | 49 5963 | 9 5964 | 13 5965 | 19 5966 | 25 5967 | 42 5968 | 4 5969 | 21 5970 | 4 5971 | 27 5972 | 9 5973 | 36 5974 | 50 5975 | 4 5976 | 7 5977 | 14 5978 | 7 5979 | 1 5980 | 3 5981 | 4 5982 | 33 5983 | 34 5984 | 59 5985 | 39 5986 | 7 5987 | 39 5988 | 43 5989 | 52 5990 | 26 5991 | 5 5992 | 14 5993 | 2 5994 | 11 5995 | 23 5996 | 4 5997 | 17 5998 | 26 5999 | 56 6000 | 26 6001 | 2 6002 | 28 6003 | 56 6004 | 14 6005 | 6 6006 | 4 6007 | 39 6008 | 37 6009 | 16 6010 | 34 6011 | 9 6012 | 24 6013 | 24 6014 | 3 6015 | 22 6016 | 34 6017 | 14 6018 | 44 6019 | 43 6020 | 4 6021 | 10 6022 | 7 6023 | 17 6024 | 35 6025 | 11 6026 | 19 6027 | 6 6028 | 24 6029 | 30 6030 | 0 6031 | 27 6032 | 1 6033 | 23 6034 | 24 6035 | 42 6036 | 21 6037 | 44 6038 | 17 6039 | 25 6040 | 25 6041 | 32 6042 | 28 6043 | 17 6044 | 34 6045 | 57 6046 | 46 6047 | 10 6048 | 0 6049 | 33 6050 | 5 6051 | 27 6052 | 10 6053 | 5 6054 | 13 6055 | 9 6056 | 2 6057 | 2 6058 | 12 6059 | 8 6060 | 9 6061 | 8 6062 | 1 6063 | 9 6064 | 5 6065 | 7 6066 | 28 6067 | 5 6068 | 14 6069 | 21 6070 | 12 6071 | 11 6072 | 24 6073 | 42 6074 | 26 6075 | 0 6076 | 4 6077 | 2 6078 | 18 6079 | 3 6080 | 32 6081 | 8 6082 | 7 6083 | 7 6084 | 28 6085 | 45 6086 | 10 6087 | 1 6088 | 6 6089 | 4 6090 | 44 6091 | 13 6092 | 44 6093 | 1 6094 | 7 6095 | 12 6096 | 9 6097 | 6 6098 | 36 6099 | 6 6100 | 33 6101 | 1 6102 | 2 6103 | 3 6104 | 1 6105 | 46 6106 | 14 6107 | 6 6108 | 22 6109 | 27 6110 | 7 6111 | 11 6112 | 26 6113 | 8 6114 | 33 6115 | 5 6116 | 14 6117 | 27 6118 | 32 6119 | 43 6120 | 7 6121 | 6 6122 | 56 6123 | 19 6124 | 31 6125 | 15 6126 | 31 6127 | 18 6128 | 1 6129 | 31 6130 | 2 6131 | 18 6132 | 50 6133 | 38 6134 | 60 6135 | 13 6136 | 2 6137 | 3 6138 | 2 6139 | 22 6140 | 18 6141 | 16 6142 | 24 6143 | 3 6144 | 32 6145 | 49 6146 | 6 6147 | 27 6148 | 26 6149 | 29 6150 | 2 6151 | 3 6152 | 11 6153 | 34 6154 | 11 6155 | 1 6156 | 1 6157 | 16 6158 | 39 6159 | 20 6160 | 15 6161 | 15 6162 | 5 6163 | 23 6164 | 9 6165 | 14 6166 | 0 6167 | 20 6168 | 27 6169 | 0 6170 | 50 6171 | 20 6172 | 8 6173 | 53 6174 | 27 6175 | 44 6176 | 40 6177 | 19 6178 | 4 6179 | 7 6180 | 10 6181 | 25 6182 | 0 6183 | 11 6184 | 18 6185 | 3 6186 | 15 6187 | 2 6188 | 18 6189 | 3 6190 | 4 6191 | 7 6192 | 4 6193 | 51 6194 | 7 6195 | 8 6196 | 47 6197 | 24 6198 | 15 6199 | 4 6200 | 10 6201 | 31 6202 | 58 6203 | 4 6204 | 12 6205 | 48 6206 | 22 6207 | 9 6208 | 43 6209 | 20 6210 | 26 6211 | 50 6212 | 4 6213 | 4 6214 | 2 6215 | 11 6216 | 6 6217 | 6 6218 | 2 6219 | 5 6220 | 35 6221 | 7 6222 | 11 6223 | 14 6224 | 39 6225 | 4 6226 | 37 6227 | 10 6228 | 17 6229 | 5 6230 | 3 6231 | 40 6232 | 18 6233 | 4 6234 | 17 6235 | 2 6236 | 7 6237 | 2 6238 | 34 6239 | 4 6240 | 6 6241 | 13 6242 | 1 6243 | 44 6244 | 37 6245 | 23 6246 | 11 6247 | 26 6248 | 4 6249 | 22 6250 | 1 6251 | 38 6252 | 15 6253 | 29 6254 | 12 6255 | 22 6256 | 12 6257 | 16 6258 | 5 6259 | 16 6260 | 5 6261 | 1 6262 | 5 6263 | 29 6264 | 10 6265 | 1 6266 | 3 6267 | 25 6268 | 31 6269 | 2 6270 | 56 6271 | 7 6272 | 17 6273 | 0 6274 | 58 6275 | 1 6276 | 42 6277 | 14 6278 | 6 6279 | 13 6280 | 34 6281 | 4 6282 | 48 6283 | 17 6284 | 35 6285 | 4 6286 | 35 6287 | 9 6288 | 8 6289 | 35 6290 | 10 6291 | 2 6292 | 9 6293 | 1 6294 | 4 6295 | 42 6296 | 14 6297 | 17 6298 | 13 6299 | 2 6300 | 5 6301 | 3 6302 | 8 6303 | 49 6304 | 4 6305 | 36 6306 | 47 6307 | 31 6308 | 14 6309 | 18 6310 | 3 6311 | 4 6312 | 23 6313 | 1 6314 | 2 6315 | 3 6316 | 3 6317 | 18 6318 | 22 6319 | 13 6320 | 5 6321 | 3 6322 | 52 6323 | 6 6324 | 7 6325 | 8 6326 | 23 6327 | 11 6328 | 12 6329 | 13 6330 | 31 6331 | 2 6332 | 12 6333 | 4 6334 | 19 6335 | 14 6336 | 27 6337 | 5 6338 | 6 6339 | 38 6340 | 2 6341 | 34 6342 | 8 6343 | 5 6344 | 28 6345 | 6 6346 | 3 6347 | 19 6348 | 28 6349 | 10 6350 | 3 6351 | 35 6352 | 22 6353 | 19 6354 | 6 6355 | 7 6356 | 25 6357 | 3 6358 | 4 6359 | 28 6360 | 30 6361 | 15 6362 | 2 6363 | 21 6364 | 1 6365 | 21 6366 | 6 6367 | 21 6368 | 10 6369 | 41 6370 | 9 6371 | 7 6372 | 2 6373 | 4 6374 | 4 6375 | 18 6376 | 6 6377 | 8 6378 | 7 6379 | 56 6380 | 46 6381 | 27 6382 | 3 6383 | 9 6384 | 44 6385 | 5 6386 | 16 6387 | 16 6388 | 8 6389 | 16 6390 | 15 6391 | 3 6392 | 3 6393 | 6 6394 | 7 6395 | 12 6396 | 7 6397 | 18 6398 | 19 6399 | 46 6400 | 14 6401 | 15 6402 | 1 6403 | 16 6404 | 48 6405 | 15 6406 | 1 6407 | 15 6408 | 16 6409 | 47 6410 | 16 6411 | 15 6412 | 49 6413 | 17 6414 | 6 6415 | 10 6416 | 32 6417 | 1 6418 | 5 6419 | 31 6420 | 26 6421 | 26 6422 | 19 6423 | 49 6424 | 11 6425 | 3 6426 | 1 6427 | 8 6428 | 11 6429 | 3 6430 | 20 6431 | 17 6432 | 16 6433 | - 6434 | -------------------------------------------------------------------------------- /UVa/Dynamic/10306-eCoins.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | #define mod(a,b) sqrt(a*a-b*b) 8 | #define INF 305 9 | int n,m,S,c[41][2]; 10 | int dp[301][301]; 11 | 12 | int main () { 13 | scanf ("%d", &n); 14 | while (n--) { 15 | scanf ("%d %d", &m, &S); 16 | for (int i=0; i < m; ++i) 17 | scanf ("%d %d", &c[i][0], &c[i][1]); 18 | 19 | for (int i=0; i <= S; ++i) 20 | for (int j=0; j <= S; ++j) 21 | dp[i][j] = INF; 22 | dp[0][0] = 0; 23 | 24 | int ans = INF; 25 | for (int k=0; k < m; ++k) 26 | for (int i=c[k][0]; i <= S; ++i) 27 | for (int j=c[k][1]; j<=S; ++j) { 28 | dp[i][j] = min(dp[i][j], dp[i-c[k][0]][j-c[k][1]]+1); 29 | if (i*i + j*j == S*S) 30 | ans = min(ans, dp[i][j]); 31 | } 32 | if (ans == INF) printf("not possible\n"); 33 | else printf("%d\n", ans); 34 | } 35 | } -------------------------------------------------------------------------------- /UVa/Dynamic/10616-Divisible-Group-Sums.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Name: 10616 - Divisible Group Sums 3 | Link: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1557 4 | Topic: Dynamic 5 | Algo Used: Knapsack 6 | */ 7 | #include 8 | #include 9 | using namespace std; 10 | 11 | typedef long long ll; 12 | typedef unsigned long long llu; 13 | 14 | int n,q,d,m,a[300]; 15 | int dynamic[201][11][50]; 16 | int fun(int i,int c,int sum){ 17 | 18 | if(c==m){ 19 | if(sum) return 0; 20 | else return 1; 21 | } 22 | if(i>=n) return 0; 23 | if(dynamic[i][c][sum]!=-1) return dynamic[i][c][sum]; 24 | 25 | return dynamic[i][c][sum]=fun(i+1,c+1,(sum+a[i])%d)+fun(i+1,c,sum); 26 | } 27 | 28 | int main () { 29 | 30 | int setCounter = 1; 31 | while ((cin >> n >> q) && n != 0 && q != 0) { 32 | 33 | printf("SET %d:\n", setCounter++); 34 | for(int i = 0 ; i < n ; ++i) 35 | cin >> a[i]; 36 | 37 | for(int counter = 1 ; counter <= q ; ++counter){ 38 | memset(dynamic,-1,sizeof(dynamic)); 39 | cin >> d >> m; 40 | printf("QUERY %d: %d\n",counter+1,fun(0,0,0)); 41 | } 42 | 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /UVa/Dynamic/10819-Trouble-of-13-Dots.cpp: -------------------------------------------------------------------------------- 1 | // /* 2 | // Name: 10819 - Trouble of 13-Dots 3 | // Link: https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1760 4 | // Topic: Dynamic 5 | // Algo Used: Knapsack 6 | // */ 7 | #include 8 | #include 9 | using namespace std; 10 | 11 | int money, n; 12 | int w[200], v[200], d[15000]; 13 | bool was[15000]; 14 | 15 | int main () { 16 | 17 | 18 | while(cin >> money >> n){ 19 | 20 | for(int i = 1 ; i <= n ; ++i) cin >> w[i] >> v[i]; 21 | 22 | memset(was, 0, sizeof was); 23 | memset(d, 0, sizeof d); 24 | 25 | was[0] = true; 26 | d[0] = 0; 27 | 28 | for(int i = 1 ; i <= n ; ++i) 29 | for(int j = money+200 ; j >= 0; --j) 30 | if(was[j]){ 31 | was[w[i] + j] = true; 32 | d[w[i] + j] = max(d[w[i] + j], d[j] + v[i]); 33 | } 34 | 35 | int res = 0; 36 | for(int i = 0 ; i <= money ; ++i) 37 | res = max(res, d[i]); 38 | 39 | if(money > 1800) 40 | for (int i = 2001; i <= money+200; ++i) 41 | res = max(res, d[i]); 42 | 43 | cout << res << endl; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /UVa/Dynamic/10943-How-do-you-add?.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | int d[101][101]; 5 | int ways (int n, int k){ 6 | 7 | if(d[n][k] != -1) return d[n][k]; 8 | if (n == 1) return d[n][k] = 1; 9 | 10 | int ans = 0; 11 | for(int i = 0 ; i <= n ; ++i) 12 | ans = (ans % 1000000 + ways(k-1, i) % 1000000) % 1000000; 13 | 14 | return d[n][k] = ans; 15 | 16 | } 17 | 18 | int main () { 19 | int n , k; 20 | cin >> n >> k; 21 | while(n && k){ 22 | memset(d, -1 , sizeof(d)); 23 | cout << ways(n, k) << endl; 24 | cin >> n >> k; 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /UVa/Dynamic/11456-Trainsorting.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Name: 11456 - Trainsorting 3 | Link: https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2451 4 | Topic: Dynamic 5 | Algo Used: Longest Increasing Subsequence 6 | */ 7 | #include 8 | using namespace std; 9 | int a[2500], d[2500], in[2500]; 10 | int main () 11 | { 12 | int n , t; 13 | cin >> t; 14 | while(t--){ 15 | cin >> n; // Number of elements 16 | int mx = 0; 17 | 18 | for (int i = 0 ; i < n ; ++i){ 19 | cin >> a[i]; 20 | d[i] = in[i] = 1; // initializing the dynamic arrays 21 | } 22 | 23 | for (int i = n-1 ; i >= 0 ; --i) 24 | for (int j = i+1 ; j < n ; ++j) 25 | if (a[i] > a[j] && in[i] < in[j]+1 ) 26 | in[i] = in[j]+1; 27 | 28 | for (int i = n-1 ; i >= 0 ; --i) 29 | for (int j = i+1 ; j < n ; ++j) 30 | if (a[i] < a[j] && d[i] < d[j]+1 ) 31 | d[i] = d[j]+1; 32 | 33 | for (int i = 0 ; i < n ; ++i) 34 | mx = max(mx, in[i] + d[i] - 1); 35 | 36 | cout << mx << endl; 37 | } 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /UVa/Dynamic/11517-Exact-Change.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | #define INF 10000 6 | int t,W,n,c[101]; 7 | int dp[10005]; 8 | 9 | int main () { 10 | scanf ("%d", &t); 11 | while (t--) { 12 | scanf ("%d %d", &W, &n); 13 | for (int i=0; i= 0; --j) 22 | if (j+c[i] <= INF && dp[j+c[i]] > dp[j]+1) 23 | dp[j+c[i]] = dp[j]+1; 24 | //dp[j] = min(dp[j], dp[j-c[i]]+1); 25 | for (int i=W; i <= INF; ++i) 26 | if (dp[i] != INF) { 27 | printf("%d %d\n", i, dp[i]); 28 | break; 29 | } 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /UVa/Dynamic/11566-Let's-Yum-Cha!.cpp: -------------------------------------------------------------------------------- 1 | // /* 2 | // Name: 11566 - Let's Yum Cha! 3 | // Link: https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2613 4 | // Topic: Dynamic 5 | // Algo Used: Knapsack 6 | // */ 7 | #include 8 | #include 9 | #include 10 | #include 11 | using namespace std; 12 | int v[101], f[111], d[111], c[111], m[111], N, x, T, K, max_X;; 13 | bool was[111]; 14 | 15 | int main () { 16 | 17 | cin >> N >> x >> T >> K; 18 | 19 | while(N && x && T && K){ 20 | 21 | max_X = x * (N+1); // IMPORTANT 22 | for(int i = 1 ; i <= K ; ++i){ 23 | int sum = 0 , a; 24 | cin >> v[i]; 25 | m[i] = v[i]; 26 | for(int j = 1; j <= N+1 ; ++j){ 27 | cin >> a; 28 | sum += a; 29 | } 30 | f[i] = sum / (N+1); 31 | } 32 | 33 | memset(was, 0, sizeof was); 34 | memset(d, 0, sizeof d); 35 | memset(c, 0, sizeof c); 36 | 37 | was[0] = true; 38 | 39 | for(int i = 1 ; i <= K ; ++i){ 40 | for (int j = max_X ; j >= 0 ; --j){ 41 | if(was[j]){ 42 | was[j + v[i]] = true; 43 | if(d[j] + f[i] > d[j + v[i]]){ 44 | d[j + v[i]] = d[j] + f[i]; 45 | m[j + v[i]] = m[j] + m[i]; 46 | c[j + v[i]] = c[j] + 1; 47 | } 48 | } 49 | } 50 | } 51 | 52 | for(int i = 0 ; i < max_X ; i++) 53 | cout << d[i] << " " ; 54 | cout << endl; 55 | for(int i = 0 ; i < max_X ; i++) 56 | cout << c[i] << " " ; 57 | cout << endl; 58 | for(int i = 0 ; i < max_X ; i++) 59 | cout << m[i] << " " ; 60 | cout << endl; 61 | 62 | double sum = 0; 63 | for (int i = 0; i <= max_X; ++i) 64 | if (c[i] <= 2*N+2 && max_X >= ( ceil(m[i]*110/100) - T*(N+1))) 65 | sum = max((int)sum, d[i]); 66 | 67 | printf("%.2f\n", sum/(N+1)); 68 | cin >> N >> x >> T >> K; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /UVa/Dynamic/11790-Murcia's-Skyline.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Name: 11790 - Murcia's Skyline 3 | Link: https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2451 4 | Topic: Dynamic 5 | Algo Used: Longest Increasing Subsequence, Longest Decreasing Subsequence 6 | */ 7 | #include 8 | #include 9 | using namespace std; 10 | struct skys{ int w,h; }; 11 | 12 | int main (){ 13 | 14 | int t, counter = 1, n; 15 | cin >> t; 16 | 17 | while(t--){ 18 | cin >> n; // Number of elements 19 | int mx = 0, mx2 = 0, maxFirst = 0; 20 | 21 | skys dec[n+1], inc[n+1]; 22 | skys a[n+1]; 23 | 24 | for (int i = 0 ; i < n ; ++i){ 25 | cin >> a[i].h; 26 | dec[i].h = inc[i].h = 1; // initializing the dynamic array 27 | } 28 | 29 | for (int i = 0 ; i < n ; ++i){ 30 | cin >> inc[i].w; 31 | dec[i].w = inc[i].w; 32 | maxFirst = max(maxFirst, inc[i].w); 33 | } 34 | 35 | for (int i = 1 ; i < n ; ++i){ 36 | int holder1 = 0, holder2 = 0; 37 | for (int j = 0 ; j < i ; ++j){ 38 | if (a[i].h > a[j].h && inc[i].h <= inc[j].h+1){ 39 | inc[i].h = inc[j].h+1; 40 | if(holder1 < inc[j].w) 41 | holder1 = inc[j].w; 42 | } 43 | 44 | if (a[i].h < a[j].h && dec[i].h <= dec[j].h+1){ 45 | dec[i].h = dec[j].h+1; 46 | if(holder2 < dec[j].w) 47 | holder2 = dec[j].w; 48 | } 49 | } 50 | inc[i].w += holder1; 51 | dec[i].w += holder2; 52 | } 53 | 54 | int res = 0 , res2 = 0; 55 | 56 | for (int i = 0 ; i < n ; ++i){ 57 | //cout << inc[i].w << " "; 58 | res = max(res, inc[i].w); 59 | res2 = max(res2, dec[i].w); 60 | } 61 | res = max(res, maxFirst); 62 | res2 = max(res2, maxFirst); 63 | 64 | if(res >= res2) 65 | printf("Case %d. Increasing (%d). Decreasing (%d).\n", counter++, res, res2); 66 | else 67 | printf("Case %d. Decreasing (%d). Increasing (%d).\n", counter++, res2, res); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /UVa/Dynamic/357-Let-Me-Count-The-Ways.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | int V, C = 5, coins[5] = {1,5,10,25,50}; 5 | long long int dp[6][31000]; 6 | 7 | long long int ways (int type, int value) { 8 | if (value == 0) return 1; 9 | if (value < 0 || type == C) return 0; 10 | if (dp[type][value]!= -1) return dp[type][value]; 11 | return dp[type][value] = ways(type+1, value) + ways(type, value-coins[type]); 12 | } 13 | 14 | int main () { 15 | memset(dp, -1, sizeof dp); 16 | while (scanf("%d", &V) != EOF) { 17 | long long int w = ways(0, V); 18 | if (w == 1) 19 | printf("There is only 1 way to produce %d cents change.\n", V); 20 | else 21 | printf("There are %lld ways to produce %d cents change.\n", w, V); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /UVa/Dynamic/481-What-Goes-Up.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Name: 481 - What Goes Up 3 | Link: https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=422 4 | Topic: Dynamic 5 | Algo Used: Longest Increasing Subsequence, Binary Search 6 | */ 7 | #include 8 | #include 9 | #include 10 | using namespace std; 11 | 12 | int BinarySearch(vector vc,int * small ,int high, int key) 13 | { 14 | int low = 0, mid; 15 | while (low < high){ 16 | mid = low + ((high - low) / 2); 17 | if (vc[small[mid]] >= key) high = mid; 18 | else low = mid + 1; 19 | } 20 | return low; 21 | } 22 | 23 | int main () { 24 | 25 | int a; 26 | vector vc; 27 | while(cin >> a) vc.push_back(a); 28 | 29 | int small[vc.size()+1], parent[vc.size()+1]; 30 | 31 | int size = 0; 32 | small[0] = 0; 33 | parent[0] = -1; 34 | 35 | for(int i = 1 ; i < vc.size() ; i++){ 36 | if(vc[i] <= vc[small[size]]){ 37 | int pos = BinarySearch(vc,small,size,vc[i]); 38 | small[pos] = i; 39 | if(pos != 0) parent[i] = small[pos-1]; 40 | } 41 | else{ 42 | small[++size] = i; 43 | parent[i] = small[size-1]; 44 | } 45 | } 46 | 47 | int pos = small[size]; 48 | vector st; 49 | while(size-- >= 0){ 50 | st.push_back(vc[pos]); 51 | pos = parent[pos]; 52 | } 53 | 54 | cout << st.size() << endl << "-" << endl; 55 | for (int i = st.size()-1; i >= 0; --i) 56 | cout << st[i] << endl; 57 | 58 | } 59 | -------------------------------------------------------------------------------- /UVa/Dynamic/input.txt: -------------------------------------------------------------------------------- 1 | 3 10 5 2 2 | 6 7 5 6 9 3 | 10 9 10 10 8 4 | 0 0 0 0 -------------------------------------------------------------------------------- /UVa/Dynamic/output.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 1 4 | 1 5 | 1 6 | 1 7 | 1 8 | 1 9 | 1 10 | -------------------------------------------------------------------------------- /UVa/README.md: -------------------------------------------------------------------------------- 1 | # UVa-Solutions 2 | 3 | - [ ] UVa 01047 - Zones 4 | - [x] UVa 00524 - Prime Ring Problem 5 | - [x] UVa 11565 - Simple Equations 6 | - [ ] UVa 10567 - Helping Fill Bates 7 | - [x] UVa 00183 - Bit Maps 8 | - [x] UVa 00357 - Let Me Count The Ways 9 | - [x] UVa 10306 - e-Coins 10 | - [x] UVa 11517 - Exact Change 11 | - [ ] UVa 00216 - Getting in Line 12 | - [ ] UVa 10496 - Collecting Beepers 13 | - [ ] UVa 11284 - Shopping Trip 14 | - [ ] UVa 10721 - Bar Codes 15 | - [ ] UVa 10086 - Test the Rods 16 | - [x] UVa 12455 - Bars 17 | - [x] UVa 11236 - Grocery Store 18 | - [x] UVa 10487 - Closest Sums 19 | - [x] UVa 12192 - Grapevine 20 | - [x] UVa 12032 - The Monkey ... 21 | - [x] UVa 00481 - What Goes Up? 22 | - [x] UVa 11456 - Trainsorting 23 | - [x] UVa 11790 - Murcia’s Skyline 24 | - [x] UVa 10616 - Divisible Group Sum 25 | - [x] UVa 10819 - Trouble of 13-Dots 26 | - [ ] UVa 11566 - Let’s Yum Cha 27 | - [ ] UVa 10943 - How do you add? 28 | - [ ] UVa 01261 - String Popping 29 | - [ ] UVa 01262 - Password 30 | - [ ] UVa 00574 - Sum It Up 31 | - [x] UVa 01237 - Expert Enough 32 | - [x] UVa 11057 - Exact Sum 33 | - [ ] UVa 11413 - Fill the ... 34 | - [ ] UVa 00787 - Maximum Sub ... 35 | - [x] UVa 10684 - The Jackpot 36 | - [ ] UVa 10755 - Garbage Heap 37 | - [ ] UVa 00108 - Maximum Sum 38 | - [ ] UVa 10827 - Maximum Sum on ... 39 | - [ ] UVa 11951 - Area 40 | - [ ] UVa 10337 - Flight Planner 41 | - [ ] UVa 00196 - Spreadsheet 42 | --------------------------------------------------------------------------------