#include <bits/stdc++.h> #include <string> using namespace std; int main() { int i,j,k,l,m,n,t,c,a[10005]; strin...
Read More
Home / uva
Showing posts with label uva. Show all posts
Showing posts with label uva. Show all posts
UVA 13275 Leap Birthdays
#include <bits/stdc++.h> using namespace std; int main() { long long int i,j,k,l,m,n,c,d,y1,y2; cin>>n; ...
Read More
UVA 750 8 Queens Chess Problem
#include <bits/stdc++.h> using namespace std; int n,a,b,h; void solution(int board[32][32]) { int p,q; printf("%2...
Read More
UVA 10474 Where is the Marble?
#include <bits/stdc++.h> using namespace std; int main() { long long int n,q,i,j,k,l,m,t=0; //freopen("uvain.txt...
Read More
UVA 357 Let Me Count The Ways
#include<bits/stdc++.h> using namespace std; #define ll long long int ll coinchange(ll s[], ll m, ll n ) { ll table[n+1],i,...
Read More
UVA 674 Coin Change
#include<bits/stdc++.h> using namespace std; int coinchange(int S[], int m, int n ) { int table[n+1]; memset(table, 0, ...
Read More
UVA 10179 Irreducible Basic Fractions
Hints : Apply Euler Totient Function Rule f(n) = n*[(1-(1/p1))*(1-(1/p2))*..........(1-(1/pk))] #include <bits/stdc++.h> ...
Read More
UVA 10226 Hardwood Species
#include <bits/stdc++.h> using namespace std; int main() { long long int i,j,k,l,m,n; double v; map<strin...
Read More
UVA 10295 Hay Points
#include <bits/stdc++.h> using namespace std; int main() { long long int i,j,k,l,m,n,sum,f; string sk,s; ch...
Read More
UVA 10815 Andy's First Dictionary
#include <bits/stdc++.h> using namespace std; int main() { set<string>st; set<string>::iterator it=st...
Read More
UVA 11530 SMS Typing
#include <bits/stdc++.h> using namespace std; int main() { long long int i,k,l,m,n,j,t,v,sum; //char s[1000000];...
Read More
UVA 11185 Ternary
#include <bits/stdc++.h> using namespace std; int main() { long long int i,j,k,l,n,m,a[10000]; //freopen("1118...
Read More
UVA 12531 - Hours and Minutes
#include <bits/stdc++.h> using namespace std; int main() { long long int i,j,k,l,m,n,a,hour,h; bool b[500]; m...
Read More
UVA 11219 How old are you?
#include <bits/stdc++.h> using namespace std; int main() { long long int i,j,k,l,n,m1,t,y1,d1,m2,y2,d2,y,d,m; ch...
Read More
UVA 12770 PalinaGram
#include <bits/stdc++.h> using namespace std; int main() { char ch; vector<char>v; string s; int a[500]...
Read More
UVA 12439 February 29
#include <bits/stdc++.h> using namespace std; int main() { long long int d1,d2,y1,y2,i,j,k,l,n,t,x,y,z,u,w; strin...
Read More
UVA 1727 Counting Weekend Days
#include <bits/stdc++.h> using namespace std; int main() { long long int s,t,i,j,k; string m,day; //freopen...
Read More
UVA 13148 A Giveaway
#include <bits/stdc++.h> using namespace std; int main() { long long int a[21]={1,64,729,4096,15625,46656,117649, ...
Read More
UVA 10107 What is the Median?
#include <bits/stdc++.h> using namespace std; int main() { long long int n,i,j,k,mid,m,a[100005],x,t; vector<l...
Read More
Subscribe to:
Posts
(
Atom
)