let's start Code

Showing posts with label UVA. Show all posts
Showing posts with label UVA. Show all posts

Lyndon factorization

Resources: CP_Algorithms  visualize  wikipedia  Problem link: 719 - Glass Beads  Solution: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor...
Share:

10104 - Euclid Problem

10104 - Euclid Problem                       Resources Extended Euclidean Algorithm  এক্সটেন্ডেড ইউক্লিডীয়ান অ্যালগোরিদম Extended Eu  Modular Arithmetic for Beginners       ...
Share:

11029 - Leading and Trailing

11029 - Leading and Trailing  Topic: Binary Exponentiation   This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. ...
Share:

1230 - MODEX

1230 - MODEX Modular Arithmetic for Beginners  Topic: Binary Exponentiation   This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode...
Share:

1121 - Subsequence

1121 - Subsequence Topic: two pointer explanation: Shakil Ahmed's Blog solution 01:   This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode...
Share:

793 - Network Connections

793 - Network Connections Topic : DSU Solution 01: //copy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 #include <bits/stdc++.h> using...
Share:

11503 - Virtual Friends

11503 - Virtual Friends Topic: DSU solution 01: //copy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 #include <bits/stdc++.h> using namespace...
Share:

10685 - Nature

10685 - Nature Topic: ডিসজয়েন্ট সেট Solution 01: //copy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 #include <bits/stdc++.h> using...
Share:

459 - Graph Connectivity

459 - Graph Connectivity Topic: Union Find Algorithm ডাটা স্ট্রাকচার: ডিসজয়েন্ট সেট(ইউনিয়ন ফাইন্ড) Solution 01: //copy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 #include...
Share:

216 - Getting in Line

216 - Getting in Line Topic: Travelling Salesman Problem Solution 01: Github gist 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 ...
Share:

12461 - Airplane

12461 - Airplane EXPLANATION Solution: //copy 1 2 3 4 5 6 7 8 9 10 11 #include<bits/stdc++.h> using namespace std; int main() { int n; while(cin >> n && n){ cout << "1/2\n"; } return 0; } function copyText(){ var outputText = ""; var targets = document.getElementsByClassName('codebox'); for...
Share:

315 - Network

315 - Network Topic : Graph Theory(AP) Solution 01: //copy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 #include<bits/stdc++.h> using namespace std; #define Max 100000 vector<int> graph[Max]; int...
Share:

11456 - Trainsorting

11456 - Trainsorting Solution:01 //copy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 #include<bits/stdc++.h> using namespace std; #define Max 2005 int main() { int a[Max], x[Max], y[Max]; ios_base::sync_with_stdio(0); cin.tie(0),cout.tie(0); int T; cin...
Share:

11417 - GCD

11417 - GCD   Topic: GCD Code: #include<bits/stdc++.h>using namespace std;typedef long long ll;int main(){   //double start_time = clock();    #ifndef ONLINE_JUDGE    freopen("in.txt", "r", stdin);    freopen("out.txt", "w", stdout);  #endif   ...
Share:

UVA-10130

Problem link: UVA-10130 Topic: Knapsack Solution: #include<bits/stdc++.h> using namespace std; int wt[12345], val[12345]; int Knapsack(int w, int wt[], int val[], int n) {     int k[n+1][w+1];     for(int i = 0; i <= n; i++)     {         for(int j = 0; j <= w; j++)    ...
Share:

About

let's start CODE

Popular Posts