পৃষ্ঠাসমূহ

বুধবার, ১৩ এপ্রিল, ২০১৬

URI Online Judge | 1379 Mean Median Problem Solution

Language:C++

#include <iostream>
using namespace std;
int main(){

    int a,b;
    while(cin>>a>>b&&a&&b){
        cout<<2*a-b<<endl;
    }

}

URI Online Judge | 1743 Automated Checking Machine Solution

#include <iostream>
using namespace std;

int main()
{
    int first[5],second[5];
    for(int i= 0; i<5; i++)
        cin>>first[i];
    for(int i = 0; i<5; i++)
        cin>>second[i];

    if(first[0]^second[0]&&
       first[1]^second[1]&&
       first[2]^second[2]&&
       first[3]^second[3]&&
       first[4]^second[4]
       )
        cout<<"Y"<<endl;
    else
        cout<<"N"<<endl;
}