10776 - Determine The Combination UVA Online Judge Solve with Java

6:34 AM | , , , , , ,



import java.util.Scanner;
class Combinations {
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        int M=-1,N=-1;
        while((M!=0)&&(N!=0)){
            N=s.nextInt();
            M=s.nextInt();
            long C,a=1,b=1;
            for (int i = 1; i <=M; i++) {
               a*=(N-i+1);
               b*=i;
            }
            C=a/b;
            System.out.println(N+" things taken "+M+" at a time is "+C+" exactly");
        }
    }
}

Read More

11512 - GATTACA - UVa Online Judge

6:29 AM | , , , , , , ,



import java.util.*;

class Gataca {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int caseNum;
        caseNum = scn.nextInt();
        String dna ="";
        scn.nextLine();

        for(int i = 0; i < caseNum; i++) {
            dna = scn.nextLine();
            int len = dna.length();
            if(len > 1000) continue;
            String greater = null;
            int occur = 0;

            for (int j= len-1; j > 0; j--) {
                /// panjang substring
                ArrayList<String> arlSub = new ArrayList<String>();
                int tmpOcc = 0;
                String gTmp = "";
                for (int k = 0; (k+j) <= len; k++) {
                    String sub = dna.substring(k,k+j);
                    if(!arlSub.isEmpty()) {
                        if(arlSub.indexOf(sub) > 0) {
                            continue;
                        }
                    }
                    arlSub.add(sub);

                    int start = k;
                    int ocrTmp = 0;
                    while(start != -1) {
                        ocrTmp++;
                        start = dna.indexOf(sub, start +1);
                    }
                    if(ocrTmp >= tmpOcc) {
                        tmpOcc = ocrTmp;
                        gTmp = sub;
                    }
                }
                if(tmpOcc > 1) {
                    greater = gTmp;
                    occur = tmpOcc;
                    break;
                }
            }
            if(occur > 1) {
                System.out.println(greater + " " + occur);
            } else {
                System.out.println("No repetitions found!");
            }
        }
    }
}

Read More

101 - The Block Problem UVA Online Judge Solution with Java

5:47 AM | , , , ,



import java.util.Scanner;
public class blockproblem {
    int[] cariStack(int n,String str[],String cari){
        int x=-1,i=0;
        int indx=-1;
        int hasil[]=new int[2];
        do{
            if(str[i]!=null){
                x=str[i].indexOf(cari);
            }
            if(x>=0) indx=i;
            i++;
        }while((x<0)&&(i<n));
        hasil[0]=indx;
        hasil[1]=x;
        return hasil;
    }
    public static void main(String[] args) {
       Scanner s=new Scanner(System.in);
       blockproblem bp=new blockproblem();
       int n=s.nextInt();
       String st[]=new String[n];
       for (int i = 0; i < n; i++) {
            st[i]=String.valueOf(i);
       }
       String cmd="",src,pos,des;
       while(!(cmd.equalsIgnoreCase("quit"))){
            cmd=s.next();
            if(!(cmd.equalsIgnoreCase("quit"))){
                src=s.next();
                pos=s.next();
                des=s.next();
                if(cmd.equalsIgnoreCase("move")){
                    if(pos.equalsIgnoreCase("onto")){
                        int [] urut=bp.cariStack(n,st,src);
                        int [] urutdes=bp.cariStack(n,st,des);
                        if(urut[0]>=0){
                           if(st[urutdes[0]]==null) st[urutdes[0]] = src;
                           else st[urutdes[0]] += src;
                           if(st[urut[0]].length()==src.length()) {
                                st[urut[0]]=null;
                           }else if(urut[1]==0){
                                st[urut[0]]=st[urut[0]].substring(1, st[urut[0]].length());
                           }else if(urut[1]==st[urut[0]].length()-1){
                               st[urut[0]]=st[urut[0]].substring(0, st[urut[0]].length()-1);
                           }else{
                               st[urut[0]]=st[urut[0]].substring(0, urut[1]-1)
                                       + st[urut[0]].substring(urut[1]+1, st[urut[0]].length());
                           }
                        }
                    }else if(pos.equalsIgnoreCase("over")) {
                        int [] urut=bp.cariStack(n,st,src);
                        int [] urutdes=bp.cariStack(n,st,des);
                        if(urut[0]>=0){
                           if(st[urutdes[0]+1]==null) st[urutdes[0]+1] = src;
                           else st[urutdes[0] + 1] += src;
                           if(st[urut[0]].length()==src.length()) {
                                st[urut[0]]=null;
                           }else if(urut[1]==0){
                                st[urut[0]]=st[urut[0]].substring(1, st[urut[0]].length());
                           }else if(urut[1]==st[urut[0]].length()-1){
                               st[urut[0]]=st[urut[0]].substring(0, st[urut[0]].length()-1);
                           }else{
                               st[urut[0]]=st[urut[0]].substring(0, urut[1]-1)
                                       + st[urut[0]].substring(urut[1]+1, st[urut[0]].length());
                           }
                        }
                   }
                }else if(cmd.equalsIgnoreCase("pile")){
                    if(pos.equalsIgnoreCase("onto")){
                        if(Integer.parseInt(des)<n){
                            int [] urut=bp.cariStack(n,st,src);
                            if(urut[0]>=0){
                               if(st[Integer.parseInt(des)]==null) st[Integer.parseInt(des)] = st[urut[0]];
                               else st[Integer.parseInt(des)] += st[urut[0]];
                               st[urut[0]]=null;
                            }
                        }
                    }else if(pos.equalsIgnoreCase("over")) {
                        if(Integer.parseInt(des)<n-1){                           
                            int [] urut=bp.cariStack(n,st,src);
                            if(urut[0]>=0){
                               if(st[Integer.parseInt(des)+1]==null) st[Integer.parseInt(des) + 1] = st[urut[0]];
                               else st[Integer.parseInt(des) + 1] += st[urut[0]];
                               st[urut[0]]=null;
                            }
                        }
                    }
                }
           }
       }
        for (int i = 0; i < st.length; i++) {
            System.out.println(i+":"+st[i]);
        }
    }
}
Read More

100 - The 3n + 1 problem UVA Online Judge Solution

7:24 PM | , , , ,



import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        while(s.hasNextInt()){
            int bil1=s.nextInt();
            int bil2=s.nextInt();
            int max=1;
            int a,b;
            if(bil1>bil2){
                a=bil2;
                b=bil1;
            }else{
                a=bil1;
                b=bil2;
            }
            for (int i = a; i <= b; i++) {
                int n=i,jml=1;
                while(n!=1){
                    if(n%2!=0) n=3*n+1;
                    else n=n/2;
                    jml++;
                }
                if(jml>max) max=jml;
            }
            System.out.println(bil1 + " " + bil2 + " " +max);
            }
    }
}
Read More

Master Scholarships in Mathematics and Computer Science, Netherlands

6:16 AM | , , , ,

Eindhoven University of Technology
Faculty of Mathematics and Computer Science
P.O. Box 513, 5600 MB Eindhoven, The Netherlands
Phone: 31 – (0)40-2474747 Fax: 31 – (0)40-2441692
E-mail: io@tue.nl Internet: w3.bwk.tue.nl/en/
Business Information Systems
  • Leading to: MSc
  • Course duration: 2 years
  • Next course begins: 1 September 2012; 1 February 2013
  • Academic application deadlines: 31 January 2012; 24 April 2012
  • Fellowship application deadline: 7 February 2012; 1 May 2012
  • Educational requirements: BSc in computer science or technology management (or equivalent).
  • Other requirements: Written request: Letter of motivation. Grade average: For admission a minimum of 75% CGPA. For entry to Talent Scholarship Program a minimum of 80% CGPA. gradelist: languagetest:
  • Gender category: 4. Subject is not gender-oriented
Computer Science and Engineering
  • Leading to: MSc
  • Course duration: 2 years
  • Next course begins: 1 September 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: BSc in computer science – with sufficient mathematics, logic computer programming, computer science.
  • Other requirements: Written request: Letter of motivation grade average: For admission a minimum of 75% CGPA. For entry to Talent Scholarship Program a minimum of 80% CGPA. Gradelist: Languagetest:
  • Gender category: 4. Subject is not gender-oriented
Industrial and Applied Mathematics
  • Leading to: MSc
  • Course duration: 2 years
  • Next course begins: 1 September 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: BSc in mathematics, stochastics or in engineering with a mathematicallyoriented programme.
  • Other requirements: Written request: Letter of motivation grade average: For admission a minimum of 75% CGPA. For entry to Talent Scholarship Program a minimum of 80% CGPA. Gradelist: Languagetest:
  • Gender category: 4. Subject is not gender-oriented
Leiden University
P.O. Box 9500, 2300 RA Leiden, The Netherlands
Phone: 31 – (0)71-527 1111
E-mail: study@leidenuniv.nl Internet: www.leiden.edu
Computer Science
  • Leading to: MSc
  • Course duration: 2 years
  • Next course begins: 1 September 2012; 1 February 2013
  • Academic application deadlines: 1 December 2011; 24 April 2012
  • Fellowship application deadline: 7 February 2012; 1 May 2012
  • Educational requirements: BSc degree in Computer Science or a relevant field
  • Gender category: 4. Subject is not gender-oriented
ICT in Business
  • Leading to: MSc
  • Course duration: 2 years
  • Next course begins: 1 September 2012; 1 February 2013
  • Academic application deadlines: 1 December 2011; 24 April 2012
  • Fellowship application deadline: 7 February 2012; 1 May 2012
  • Educational requirements: BSc degree in Computer Science, ICT in Business or a relevant field.
  • Gender category: 4. Subject is not gender-oriented
Mathematics
  • Leading to: MSc
  • Course duration: 2 years
  • Next course begins: 1 September 2012; 1 February 2013
  • Academic application deadlines: 1 December 2011; 24 April 2012
  • Fellowship application deadline: 7 February 2012; 1 May 2012
  • Educational requirements: BSc degree in Mathematics or with a BSc major in Mathematics, or a relevant field.
  • Gender category: 4. Subject is not gender-oriented
Media Technology
  • Leading to: MSc
  • Course duration: 2 years
  • Next course begins: 1 September 2012; 1 February 2013
  • Academic application deadlines: 1 December 2011; 24 April 2012
  • Fellowship application deadline: 7 February 2012; 1 May 2012
  • Educational requirements: BSc degree in Computer Science or any other relevant field.
  • Gender category: 4. Subject is not gender-oriented
Maastricht University
Bouillonstraat 8-10, 6211 LH Maastricht, The Netherlands
Phone: 31 – (0)43-388 3455
E-mail: info-dke@maastrichtuniversity.nl Internet:
http://www.maastrichtuniversity.nl/web/show/id=521206/langid=42
Artificial Intelligence
  • Leading to: MSc
  • Course duration: 1 year
  • Next course begins: 1 September 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: Applicants to DKE master’s programmes must have a Bachelor of Science degree in Knowledge Engineering or a field related to Knowledge Engineering (e.g. Mathematics, Computer Science, Artificial Intelligence).
  • Other requirements: Proof of English proficiency in the form of an IELTS test or TOEFL unless the student is a native English speaker or the student’s secondary education was in an EU/EEA country or the student’s secondary education in a non-EU/EEA country was taught in English; Proof of analytical writing and quantitative reasoning abilities; A motivation essay of 2 pages a request for credit transfer in the event that applicants have already followed a course in higher education.
  • Gender category: 4. Subject is not gender-oriented
Operations Research
  • Leading to: MSc
  • Course duration: 2 years
  • Next course begins: 1 September 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: Applicants to DKE master’s programmes must have a Bachelor of Science degree in Knowledge Engineering or a field related to Knowledge Engineering (e.g. Mathematics, Computer Science, Artificial Intelligence).
  • Other requirements: Proof of English proficiency in the form of an IELTS test or TOEFL ; Proof of analytical writing and quantitative reasoning abilities. A motivation essay of 2 pages a request for credit transfer in the event that applicants have already followed a course in higher education
  • Gender category: 4. Subject is not gender-oriented
NHTV Breda University of Applied Sciences
Academy for Digital Entertainment
P.O. Box 3917, 4800 DX Breda, The Netherlands
Phone: 31 – (0)76-5302203 Fax: 31 – (0)76-5302205
E-mail: international.office@nhtv.nl Internet: www.nhtv.nl
Master in Media Innovation
  • Leading to: Master’s degree
  • Course duration: 1 year
  • Next course begins: 1 September 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: Bachelor’s Degree in the field of Business Administration, Media Studies, Communication Studies, ICT, or another media-related field.
  • Gender category: 4. Subject is not gender-oriented
Radboud University Nijmegen
Faculty of Science
P.O. Box 9010, 6500 GL Nijmegen, The Netherlands
Phone: 31 – (0)24-3653342 Fax: 31 – (0)24-3652888
E-mail: h.nijssen@science.ru.nl
Internet: www.ru.nl/english/education/programmes/
Computing Science
  • Leading to: MSc
  • Course duration: 2 years
  • Next course begins: 1 September 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: Bachelor degree in computing science or equivalent.
  • Other requirements: Grade list
  • Gender category: 4. Subject is not gender-oriented
Information Science
  • Leading to: MSc
  • Course duration: 1 year
  • Next course begins: 1 September 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: Bachelor degree in information science or in computing science or equivalent.
  • Other requirements: Grade list
  • Gender category: 4. Subject is not gender-oriented
University of Twente
P.O. Box 217, 7500 AE Enschede, The Netherlands
Phone: 31 – (0)53-4893836 Fax: 31 – (0)53-4891104
E-mail: master@utwente.nl
Internet: http://www.universiteittwente.nl/education/ewi
Applied Mathematics
  • Leading to: MSc
  • Course duration: 24 months
  • Next course begins: 24 August 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: BSc in Mathematics or related field
  • Gender category: 4. Subject is not gender-oriented
Business Information Technology
  • Leading to: MSc
  • Course duration: 2 years
  • Next course begins: 24 August 2012; 1 February 2013
  • Academic application deadlines: 31 January 2012; 24 April 2012
  • Fellowship application deadline: 7 February 2012; 1 May 2012
  • Educational requirements: BSc degree, computer science, information management, industrial engineering, business information technology.
  • Other requirements: CGPA of at least 70-75%. Letter of motivation, resume, proof of your skills in mathematics and statistics, proof of your skills in scientific research knowledge, proof of your skills in computer science and in business administration
  • Gender category: 4. Subject is not gender-oriented
Computer Science
  • Leading to: MSc
  • Course duration: 24 months
  • Next course begins: 24 August 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: BSc in Computer Science or related field
  • Gender category: 4. Subject is not gender-oriented
Embedded Systems
  • Leading to: MSc
  • Course duration: 24 months
  • Next course begins: 24 August 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: BSc in Computer Science or Electrical Engineering or related fields
  • Gender category: 4. Subject is not gender-oriented
Human Media Interaction
  • Leading to: MSc
  • Course duration: 24 months
  • Next course begins: 24 August 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: BSc in Computer Science, or BSc in Artificial Intelligence, or BSc in Creative Technology or related fields
  • Gender category: 4. Subject is not gender-oriented
Systems and Control
  • Leading to: MSc
  • Course duration: 24 months
  • Next course begins: 24 August 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: BSc in Applied Mathematics, Electrical Engineering, Computer Science or related fields
  • Gender category: 4. Subject is not gender-oriented
Telematics
  • Leading to: MSc
  • Course duration: 24 months
  • Next course begins: 24 August 2012
  • Academic application deadlines: 31 January 2012
  • Fellowship application deadline: 7 February 2012
  • Educational requirements: BSc in Computer Science or Electrical Engineering, or related fields
  • Gender category: 4. Subject is not gender-oriented
For more info, please read: The Netherlands Fellowship Programmes (NFP) for Master Degree
--==ooOOOoo==--

SCHOLARSHIPS ALERT: Get new scholarships info sent to your email. Click Subscribe Now
Read More

University of Groningen Talent Grant: Eric Bleumink Fund, Netherlands

6:12 AM | , ,

Purposes: Master, Ph.D.
Programmes: All
Countries of origin:
Afghanistan, Albania, Algeria, Armenia, Azerbaijan, Angola, Bangladesh, Benin, Bhutan, Burkina Faso, Burundi, Bolivia, Bosnia and Herzegovina, Cambodia, Cape Verde, Central African Replublic, Chad, Comoros, Congo, Cameroon, Ivory Coast, China, Colombia, Djibouti, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Ethiopia, Gambia, Georgia, Ghana, Guatemala, Guinea, Guinea-Bissau, Guyana, Haiti, Honduras, India, Indonesia, Iran, Iraq, Jordan, Kiribati, Kenya, Kyrgyzstan, Kazakhstan, Laos, Lesotho, Liberia, Madagascar, Malawi, Maldives, Mali, Mauritania, Mozambique, Myanmar, Moldova, Mongolia, Macedonia, Marshall Islands, Micronesia, Morocco, Nepal, Niger, Nicaragua, Nigeria, Namibia, Niue, Pakistan, Papua New Guinea, Paraguay, Peru, Philippines, Autonomous Palestinian Territories, Rwanda, Samoa, Sao Tome and Principe, Senegal, Sierra Leone, Solomon Islands, Somalia, Sudan, Sri Lanka, Suriname, Swaziland, Syria, Tajikistan, Thailand, Tokelau, Tonga, Tunisia, Turkmenistan, Tanzania, Togo, Tuvalu, Uganda, Uzbekistan, Ukraine, Vanuatu, Vietnam, Wallis and Futuna, Yemen, Zambia, Zimbabwe, East Timor, South Korea
Eligible candidates:
Criteria for approval are: (a) academic excellence, shown by academic performance and may be confirmed by letters of recommendation from university professors; (b) contribution of candidate’s education in terms of strengthening the scientific capacity in the candidate’s home country; (c) perspectives to a long-term linkage between the home institution and the University of Groningen
Extra criteria for PhD candidates are: applicant should be employed by a research institute of university in one of the listed countries and receive an income from the home institution, application should be supported by this organization, the University of Groningen must be able to provide an academic supervisor who will be responsible for the scientific supervision of the research
Grant information:
The grant is usually awarded for a maximum of 2 years for a Master’s degree programme .
The grant covers the tuition fees plus the costs of international travel, subsistence, books, and health insurance. For specific information, please check the rules & regulations.
Grant provider: University of Groningen
Deadline:
Applicants need to meet the deadline of the Master’s programmes. Application forms for Master’s programmes can be found through the website or Admissions Offices . Application deadline for the scholarship is 22 February.
Application:
Applications for student scholarships can be submitted by students from one of the eligible countries for a Master’s or equivalent programme at the University of Groningen.
Master’s degree programmes: A step-by-step application guide
  1. First the candidate should apply for admission to a study programme at the University of Groningen .
  2. When the candidate applies for this admission, he or she must indicate on the application form that his/her study performance is excellent and that he/she wishes to be nominated for a Eric Bleumink Fund scholarship.
  3. If the study programme agrees with the candidacy for a EBF scholarship, they will send a standard application form including the motivation of the candidate to the Board of the Eric Bleumink Fund prior to 1 March. Per studyprogramme only two candidates can be nominated.
  4. The Board of the Eric Bleumink Fund will take a decision during their meeting in March.
  5. The studyprogramme and the candidate will both be informed on the decision taken by the Board.
  6. If a candidate is selected the coordinator and the candidate will have contact on the details of his or her arrival. If necessary he/she can contact the Board of the Eric Bleumink Fund for extra assistance.
More information:
Website Eric Bleumink Fund. For detailed information regarding the scholarship programme, please contact the office of the Ubbo Emmius Fonds. E-mail: msd@rug.nl. Postal address: Eric Bleumink Fund, University of Groningen, P.O. Box 72, 9700 AB Groningen, The Netherlands.
For more information, please visit official website: www.rug.nl
--==ooOOOoo==--

SCHOLARSHIPS ALERT: Get new scholarships info sent to your email. Click Subscribe Now!
Read More

Let's Try Team Viewer Under Linux

5:52 AM | , , ,

TeamViewer is an application for remote control, desktop sharing and file transfer between computers, great for meetings, presentations, support and more. It runs on Windows, Mac OSX, Linux (even though it comes in a .deb or .rpm, it uses Wine which comes bundled with it) as well as Android or iPhone. The application is free for personal use only.

Here's what's new in TeamViewer 7:
  • enhanced multi-monitor support
  • an integrated screenshot tool
  • record presentations
  • save connection settings per Computer (store individual connection settings for each computer in your Computers & Contacts list) - see the first screenshot in the post
  • instant meeting (you can start your meeting even before adding any participants - ideal for preparation and testing)
  • scheduled meetings
  • mobile participation via Android / iOS client
  • File Box (make files available for download during meeting)


This is Screenshot of Teamviewer 7 Beta



 

































You can download Team Viewer for linux at here
Read More