#include <bits/stdc++.h> using namespace std; bool compare( const pair<string,long long int>& x, const pair<str...
Read More
Home / Archive for July 2016
UVA 686 Goldbach's Conjecture (II)
#include <bits/stdc++.h> using namespace std; vector<int>v; long long int prime(long long int a) { int p,q,f=1...
Read More
UVA 485 Pascal's Triangle of Death
Notes: As Digit Limit is 10^60 so it is Big Integer Calculation. As I am comfortable With Java BigInteger Than C++ So I Prefer Java. ...
Read More
UVA 11080 Place the Guards
Hints : It's a Bipartite Checking problem but there are some tricky cases. Some Nodes May be disconnected, so it's important ...
Read More
UVA 11396 Claw Decomposition
#include <bits/stdc++.h> using namespace std; vector<int>edges[1000]; queue<int>q; int color[1000],visited[10...
Read More
পেয়ার সর্ট Pair Sort in C++ ( Sort An Array According To Another Array Value)
ধরা যাক, কোন স্কুলের রেজাল্ট করা হবে। একটি খাতায় ছক করা হল। এক পাশে ছাত্র ছাত্রীদের নাম আর এক পাশে থাকবে তাদের নম্বর । এখন যারা বেশি...
Read More
UVA 10050 Hartals
Notes: Just Count the columns which has atleast one hartal. The hartal days are multiplier of hartal parameters. #include <bi...
Read More
UVA 10019 Funny Encryption Method
#include <bits/stdc++.h> using namespace std; int binary(int n) { int a[1000],i=0,j,c=0; while(n>0) { ...
Read More
UVA 10469 To Carry or not to Carry
Notes: This Problem is about Half Adder Circuit. We know From Boolean Algebra, To Add two digit we need to xor them. But If there is ...
Read More
UVA 12700 - Banglawash
#include <bits/stdc++.h> using namespace std; int main() { int n,tc,i,j,c,b,w,t,a; string s; //freopen(...
Read More
UVA 11577 - Letter Frequency
#include <bits/stdc++.h> using namespace std; int main() { string s,w; int i,j,a[256],n,k,m,l,p,c; //freope...
Read More
UVA 10004 Bicoloring
#include <bits/stdc++.h> using namespace std; vector<int>edges[1000]; queue<int>q; int color[1000],visited[...
Read More
LightOj 1354 IP Checking
#include <bits/stdc++.h> using namespace std; long long int decimal(long long int x) { long long int sum=0,r,k=0; ...
Read More
LightOJ 1107 How Cow
#include <bits/stdc++.h> using namespace std; int main() { long long int x1,y1,x2,y2,t,a,b,i,j,m; cin>>t; ...
Read More
LightOj 1053 Higher Math
#include <bits/stdc++.h> using namespace std; int main() { long long int t,a,b,c,m,n,i,j,p,q,r; vector<long long...
Read More
Subscribe to:
Posts
(
Atom
)