Monthly Archives: October 2016

584A. Olesya and Rodion

Problem Link <Source Code> #include <bits/stdc++.h> using namespace std; #define INF 10000000 typedef long long ll; typedef vector<int> vi; typedef vector< vi > vvi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vii> vvii; typedef set<int> si; typedef map<string, int> … Continue reading

Rate this:

Posted in Uncategorized | Leave a comment

1133 – Array Simulation

Problem Link <Source Code> #include<bits/stdc++.h> using namespace std; int a[10000],b[10000]; char c; int main() { int t,n,j,o,m,i,add,d; cin>>t; for(o=1;o<=t;o++) { cin>>n>>m; memset(a,0,sizeof(a)); for(i=0;i<n;i++) { cin>>a[i]; } for(i=0;i<m;i++) { cin>>c; if(c==’S’) {cin>>add; for(j=0;j<n;j++) a[j]+=add; } else if(c==’M’) { cin>>d; for(j=0;j<n;j++) a[j]*=d; … Continue reading

Rate this:

Posted in Uncategorized | Leave a comment

682B. Alyona and Mex

Problem Link <Solution> #include <bits/stdc++.h> using namespace std; #define INF 10000000 typedef long long ll; typedef vector<int> vi; typedef vector< vi > vvi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vii> vvii; typedef set<int> si; typedef map<string, int> msi; … Continue reading

Rate this:

Posted in Codeforces, Uncategorized | Tagged , , , | Leave a comment

336:A Node Too Far

Problem Link <Source Code> #include<bits/stdc++.h> #define pb push_back #define sf(x) scanf(“%d”,&x) #define MN 1234567 #define max 10000 #define all(water) (water.begin(),water.end()); #define fr(i,a,b) for(i=a;i<b;i++) using namespace std; #define cln(a) memset(a,0,sizeof(a)) #define eof(a) memset(a,-1,sizeof(a)) #define pt(c) printf(“Case %d: “,++c) #define ll long … Continue reading

Rate this:

Posted in Uncategorized, uva | Tagged , , , | Leave a comment

10611:Playboy Chimp

Problem Link <Source Code> #include<bits/stdc++.h> #define pb push_back #define sf(x) scanf(“%d”,&x) #define MN 1234567 #define max 10000 #define all(water) (water.begin(),water.end()); #define fr(i,a,b) for(i=a;i<b;i++) using namespace std; #define cln(a) memset(a,0,sizeof(a)) #define ll long long int main() {int n,luchu; while(cin>>n) { int … Continue reading

Rate this:

Posted in Uncategorized, uva | Tagged , , , , | Leave a comment

10473 – Simple Base Conversion

Problem Link <Source Code> import java.util.*; import java.math.*; class Main { public static void main (String[] args) { Scanner sc=new Scanner(System.in); String s; while(sc.hasNext()) { s=sc.next(); if(s.charAt(0)==’-‘) break; if(s.charAt(0)==’0′ &&s.charAt(1)==’x’) { BigInteger number = new BigInteger(s.substring(2),16); System.out.println(number); } else{ BigInteger … Continue reading

Rate this:

Posted in Uncategorized | Leave a comment

Useful Contents /Get Introduced to Various Parts of PRogramming

Actually ,it is too little! I am trying to expand these topics:-)  It’ll be enriched 🙂 Setup Graphics.h Algo >English Google Stackoverflow Topcoder :Data Sciences Youtube E-maxx Codechef Codeforces Algo list Geeksforgeeks MO’s Algorithm HackerEarth DS Personal Blog http://www.personal.kent.edu/~rmuhamma/Algorithms/algorithm.html https://comeoncodeon.wordpress.com/Continue reading

Rate this:

Posted in Uncategorized | Tagged , | Leave a comment