Timus Problem 1290 Solution

Timus Problem 1290 Solution

Timus Problem 1290 Solution. #include <stdio.h> #include <stdlib.h> int a[25001]; int cmp (const void *a, const void *b) { return (*(int*)a - *(int*)b); } int main () { int N,i; scanf("%d",&N); for(i=0;i<N;i++) scanf("%d",&a[i]);...

Timus Problem 1313 Solution

Timus Problem 1313 Solution

Timus Problem 1313 Solution #include<stdio.h> int main() { int a[155],b[155],nn; int n,i,j,count,h,k,m=0; scanf("%d\n",&n); for(i=0;i<n;i++) { scanf("%d",&a[i]); } for (i=0;i<n;i++) { count=0; for (j=0;j<n;j++) { if (a[i]==a[j]) count++; } if...

Timus Problem 1493 Solution

Timus Problem 1493 Solution

#include <stdio.h> int main() { int n,a,b,c,d,e,f,g,h,i,j,a1,b1,c1,d1,e1,f1,g1,h1,i1,j1,first,last,first1,last1,sum1,sum2; scanf("%d",&n); sum1=n+1; sum2=n-1; a=sum1/100000; b=sum1%100000; c=b/10000; d=b%10000; e=d/1000; f=d%1000; g=f/100; h=f%100; i=h/10;...

Timus Problem 1567 Solution

Timus Problem 1567 Solution

Timus Problem 1567 Solution #include <stdio.h> int main() { char c; int i,sum=0; while(scanf("%c",&c)==1){ if(c=='a') sum+=1; else if(c=='b') sum+=2; else if(c=='c') sum+=3; else if(c=='d') sum+=1; else if(c=='e') sum+=2; else if(c=='f') sum+=3; else...

Timus Problem 1581 Solution

Timus Problem 1581 Solution

Timus Problem 1581 Solution #include <stdio.h> int a[1001]; int main() { int i,j=1,n; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } if(a[i]==a[j]){ i++; j++; } printf("%d %d",i,j); return 0; }...

Timus Problem 1585 Solution

Timus Problem 1585 Solution

Timus Problem 1585 Solution #include<stdio.h> #include<string.h> int main() { char a[1001][30]; char b[2][30]; int n,i,j,count,k,x=0,l=0; scanf("%d\n",&n); for(i=0;i<n;i++) { gets(a[i]); } for(j=0;j<n;j++) { count=0; for(k=0;k<n;k++) {...

Timus Problem 1636 Solution

Timus Problem 1636 Solution

  Timus Problem 1636 Solution   #include <stdio.h> int main() { int t1,t2,n,i; int sum=0; scanf("%d %d", &t1, &t2); for (i=0; i<=9; i++) { scanf("%d", &n); sum+=(n*20); } t2-=sum; if (t2<t1) { printf("Dirty debug :("); } else {...

Timus Problem 1639 Solution

Timus Problem 1639 Solution

Timus Problem 1639 Solution #include <stdio.h> int main() { int m,n,sum; while(scanf("%d %d",&m,&n)!=EOF){ if(m>=1 && n==(m*m)){ printf("[:=[first]"); } else printf("[second]=:]"); } return 0; }...

Timus Problem 1785 Solution

Timus Problem 1785 Solution

Timus Problem 1785 Solution #include <stdio.h> int main() { int n; scanf("%d",&n); if (n >= 1 && n <= 4) { printf("few"); } else if (n >= 5 && n <= 9){ printf("several");} else if (n >= 10 && n <= 19){...

Timus Problem 1787 Solution

Timus Problem 1787 Solution

Timus Problem 1787 Solution #include <stdio.h> int main() { int a,b,i; while(scanf("%d %d",&a,&b) != EOF){ for(i=0000;i<0009;i++){ if(i==a || i==b){ printf("yes");} else{ printf("no");} } return 0; }...

Timus Problem 1820 Solution

Timus Problem 1820 Solution

Timus Problem 1820 Solution #include <stdio.h> int main() { int n,k,t; scanf("%d %d",&n,&k); if(n<k){ printf("2");} else{ if(2*n%k==1){ t=2*n/k+1; } else{ t=2*n/k; } printf("%d",t); } return 0; }...

Timus Problem 1910 Solution

Timus Problem 1910 Solution

Timus Problem 1910 Solution #include<stdio.h> int main() { int a[1001],n,i,j,s=0,k=0,sum; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&a[i]); } for(i=0;i<n-2;i++) { sum=0; for(j=i;j<i+3;j++) { sum+=a[j]; } if(sum>=k) { k=sum; s=i+1; } }...

Timus Problem 1933 Solution

Timus Problem 1933 Solution

Timus Problem 1933 Solution #include<stdio.h> int x[1002]; int main() { int i,n,k,j; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&x[i]); } for(i=0;i<n;) { k=0,j=i; while(x[i]==x[j]) { k++; j++; } printf("%d %d ",k,x[i]); i=j; } return 0;...

Chapter 2: Database Languages and their information

Chapter 2: Database Languages and their information

Database Languages A DBMS must provide appropriate languages and interfaces for each category of users to express database queries and updates. Database Languages are used to create and maintain database on computer. There are large numbers of database languages like...

Database basic overview

Database basic overview

What is DBMS? A Database Management System (DBMS) is a collection of interrelated data and a set of programs to access those data. Database management systems (DBMS) are computer software applications that interact with the user, other applications, and the database...

CAMBRIDGE IELTS 17 TEST 3

CAMBRIDGE IELTS 17 TEST 3

READING PASSAGE 1: The thylacine Q1. carnivorous keywords: Looked like a dog had series of stripes ate, diet ate an entirely 1 .......................................... diet (2nd paragraph 3rd and 4th line) 1st and 2nd paragraph, 1st  paragraph,resemblance to a...

CAMBRIDGE IELTS 17 TEST 4

CAMBRIDGE IELTS 17 TEST 4

PASSAGE 1 Q1 (False) (Many Madagascan forests are being destroyed by attacks from insects.) Madagascar's forests are being converted to agricultural land at a rate of one percent every year. Much of this destruction is fuelled by the cultivation of the country's main...