Facebook Google Plus YouTube

Timus Problem 1001 (Reverse Root) Solution

Timus Problem 1001(Reverse Root) : Reverse Root is a mathematical problem. To read details : http://acm.timus.ru/problem.aspx?space=1&num=1001 Proplem description: This is a straightforward problem.Just do square root. Problem Solution: #include <stdio.h> #include <math.h> int main() { double a[100],b[100]; int i,j,swap,n; scanf(“%d”,&n); for(i=0;i<n;i++){…

Timus Problem 1025 (Democracy in Danger) Solution

Timus problem 1025 Democracy in Danger : This problem is for beginner. Problem Details: http://acm.timus.ru/problem.aspx?space=1&num=1025 Problem Description: This is a Straightforward problem. Timus Problem 1025 Solution #include<stdio.h> int main() { int i,j,k,a,swap,n,sum=0,array[101]; scanf(“%d\n”,&n); for(i=0;i<n;i++) { scanf(“%d”,&array[i]); } for(i=0;i<n-1;i++) { for(j=0;j<n-i-1;j++)…