Monday, 13 November 2017

Amazon Mechanical Turk (Mturk)

Amazon Mechanical Turk


Amazon Mechanical Turk is a web service that provides an on-demand, human workforce to complete jobs that humans can do better than computers, such as recognizing objects in photographs. To sign up, simply click on the “Sign in as a Worker” link from the top-right corner and follow the instructions. The terms used in this website are totally different than other three websites. Here are some examples.



Requester: A Requester is a company or person that creates and submits tasks to Amazon Mechanical Turk for Workers to perform.
Human Intelligence Task: A Human Intelligence Task (HIT) is a task that a Requester submits to Amazon Mechanical Turk for Workers to perform. A HIT represents a single task, for example, "Identify the car color in the photo." Each HIT has a lifetime, specified by the Requester, that determines how long the HIT is available to Workers. A HIT also has an assignment duration, which is the amount of time a Worker has to complete a HIT after accepting it.
Reward: A reward is the money a Requester pay Workers for satisfactory work they do on HITs.
Working in Mturk is simple. After signing in you directly reaches HITs page, where you can search interesting tasks and apply for it. Withdrawal options can be found in the account setting under “Your account” tab.

Make money from home in India


It Is No More A Difficult Task To Find Out The Real Ways How To Make Money Only, Which Are Of Course Scam-Free Ways. Below Are Just a few Of The Suggestions, Out Of Many.

Mturk.com
The Mechanical Turk of Amazon is one of the best ways to earn some extra money online. The earning may not be much but surely there will be few dollars an hour. The sign up is absolutely free here and it takes just a few minutes.
Learn More:

oDesk.com
oDesk is the largest among a number of companies, including Elance and Freelance that intend to hire and manage remote workers. Based in Redwood City, CA, oDesk was founded in 2003.

Learn more:

Freelancer.com
Freelancer.com is an outsourcing marketplace for small business. The platform connects over 3 million employers and freelancers globally from over 234 countries & regions. Through its website, employers can hire freelancers to do work in areas such as software, writing, data entry and design right through to engineering and the sciences, sales and marketing, and accounting & legal services. The average job is under $200.


Learn more:

Elance.com
Elance is one of the many internet virtual marketplaces that allows freelancers and outsourcing companies to come together to work on projects. It is based in California and has been on the web since 1999.


Learn more:

Scam free ways to make money online
There are hundreds of ways to make money online. These 7 top work at home jobs are fast ways to earn money on the Internet.


Learn more:



Code Challenge Solutions 4


1. Hanyu’s Kung Fu Match

Hanyu is glad as his academy of martial arts is chosen to present a warm-up match of Kung Fu at the inaugural ceremony of the Rio Olympics. 
There are 'n' Kung Fu fighters in Hanyu’s academy. 

Hanyu is very particular in selecting two fierce Kung Fu fighters from his academy who are going to put up a thrilling close competitive performance at the ceremony. 
  
For this purpose, he fetches the details of the winning points of all 'n' fighters in his academy and stores it in an array. 
He should now select the two fighters who have scored almost the same win percentages so far, as they would make the audience exhilarating till the end.  
  
Your aim is to help Hanyu find the difference in win percentages between two fighters chosen for the warm-up match. 
                                
Examples: 
Input  :  If n = 4 and winPoints[] = {30,5,20,9} 
Output :  4 

Input Format: 
The first line of the input consists of an integer n, which corresponds to the number of fighters in Hanyu’s academy. Assume that the maximum number of input elements in the array is 50. 
The next 'n' lines in the input corresponding to the winning points of each of the fighter. 
Output Format: 
The output is an integer – difference between two fighters chosen for the warm-up match. 

Refer sample input and output for formatting specifications. 

Sample Input1: 
19 
18 
25 
Sample Output1: 


Program


#include<stdio.h>
#include<stdlib.h>
int main()
{
int i,j,n,diff,d;
int a[100];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
diff=abs(a[0]-a[1]);
for(i=0;i<n-1;i++)

for(j=i+1;j<n;j++)
{
d=abs(a[i]-a[j]);
if(d<diff)
diff=d;
}

printf("%d",diff);
return 0;
}


2. Bhageera And Mowgli


Mowgli Bagheera is teaching mathematics to Mowgli. He has given N integer numbers to Mowgli and asked him “What is the sum of these N numbers?”Mowgli told him that he is not good in numbers yet and he can’t perform this addition operation but if Bagheera allow him to convert each integer into its nearest 10’s multiple, he can tell the sum of those given numbers. For e.g. if the last digit of the number is 5 or more than 5, he will convert it into nearest 10’s multiple that is greater than the given number. If last digit is less than 5, he will convert it into nearest 10’s multiple that is less than the number. After that he will count the sum of all these numbers and tell Bagheera.  Input Format:  First input is an integer N>=0 which is number of elements given. Next input is an array which will hold N number.  Output Format:  Output is also an integer which will hold the sum.  [All text in bold corresponds to input and the rest corresponds to output] Sample Input and Output:  5 11   16   15   24   4 70


Program:

#include <Stdio.h>
#include <conio.h>
main()
{
   int n,u,i,arr[100];
   int sum=0,temp=0;
   scanf ("%d", &n) ;
   for(i=0;i<n;i++)
   {
       scanf("%d", &arr[i]);
   }

   for(i=0;i<n;i++)
   {
       u = arr[i] % 10;
       if(u>=5)
       {
           temp=arr[i]+(10-u);
       }
       else{
        temp=arr[i]-u;
       }
       sum+=temp;
   }
   printf("\n%d",sum);
   return 0;

}





Sunday, 12 November 2017

Code Challenge Solutions 3

1. Mahirl and Educational Fair


To make her Event Management company “Amphi Events and Decors” popular among the younger generation, Mahirl planned to conduct “The Great India Education Fair’. This Fair has proved to be a strong and cost-effective marketing platform for the Universities, Colleges, Schools and Education Institutions to reach out very cost-effectively to a larger number of parents and students.

              
There are many popular magazines that review these kinds of educational fairs and rate them.
They rate the fair as “Good” if the total number of people attending the fair is greater than 7000.
They rate the fair as “Outstanding” if both the number of parents attending the fair and the number of students attending the fair is at least 5000. However, if the number of students attending the fair is at least double the number of parents attending the fair, they rate the fair as “Great”.
If the total number of people attending the fair is less than 7001, they rate the fair as “Bad”.
Can you please help them in rating the fair?
Input Format:
Input consists of integers. The first integer corresponds to the number of parents who have attended the fair. The second integer corresponds to the number of students who have attended the fair.
Output Format:
The output consists of a string --- “Bad” or “Good” or “Outstanding” or “Great” or “Invalid Input”.
If any of the 2 input integers are negative, print “Invalid Input”.
Sample Input :
6000
5600
Sample Output :
Outstanding


Program:

#include<stdio.h>
int main()
{
int s,p;
scanf("%d%d",&p,&s);
if((s>=0)&&(p>=0))
{
if(s>=(2*p))
printf("Great");
else if(s>=5000&&p>=5000)
printf("Outstanding");
else if((p+s)>=7000)
printf("Good");
else
printf("Bad");
}
else
printf("Invalid Input");
return 0;
}


2. Watermelon Problem

[A variation of Code Forces Problem]

 
One hot summer day Peter and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that, the watermelon was weighed, and the scales showed w kilos. They rushed home, dying of thirst, and decided to divide the berry, however they faced a hard problem.
 
Peter and Billy are great fans of even numbers, that's why they want to divide the watermelon in such a way that each of the two parts weighs the even number of kilos, at the same time it is not obligatory that the parts are equal. But the difference between the 2 parts should be minimal. The boys are extremely tired and want to start their meal as soon as possible, that's why you should help them and find out if they can divide the watermelon in the way they want. For sure, each of them should get a part of the positive weight.
 
Input Format
The first (and the only) input line contains integer number w (1 = w = 100) — the weight of the watermelon bought by the boys.
 
Output Format
If the input value is not within the range, print "Invalid Input".
In the first line of the output, print YES, if the boys can divide the watermelon into two parts, each of them weighing an even number of kilos; and NO in the opposite case.
If the first line of the output is YES, the next line of the output consists of 2 integers separated by a space. In case of distinct integers, the smallest number should appear first.
 
Sample Input 1
8
 
Sample Output 1
YES
4 4
 
Sample Input 2
11
 
Sample Output 2
NO
 
Sample Input 3
124
 
Sample Output 3
Invalid Input


Program:

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int w,c;
    scanf("%d",&w);
    if((w>=1)&&(w<=100))
    {
        if(w%4==0)
        {

            c=w/2;
            printf("YES");
            printf("\n%d%d",c,c);
        }
        else if(w%2==0)
        {
            c=w/2;
            printf("YES");
            printf("\n%d%d",c+1,c-1);
        }
        else{printf("NO");}
    }
    else
    {
      printf("Invalid Input\n");
    }

    return 0;
}



Code Challenge Solutions 1:

Code Challenge Solutions 2