From 04a3e6b75a1e64701a00929cee420680afd34225 Mon Sep 17 00:00:00 2001 From: sajalasati <32328861+sajalasati@users.noreply.github.com> Date: Sun, 29 Oct 2017 23:31:26 +0530 Subject: [PATCH 1/3] new code --- prob3.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 prob3.c diff --git a/prob3.c b/prob3.c new file mode 100644 index 0000000..ff10e5a --- /dev/null +++ b/prob3.c @@ -0,0 +1,57 @@ +#include +void merge(int arr[],int l,int m,int r) +{ + int i,j,k; + int n1 = m - l + 1; + int n2 = r - m; + int L[n1], R[n2]; + for(i=0;i Date: Sun, 29 Oct 2017 23:33:04 +0530 Subject: [PATCH 2/3] good code --- prob2.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 prob2.c diff --git a/prob2.c b/prob2.c new file mode 100644 index 0000000..922bbbe --- /dev/null +++ b/prob2.c @@ -0,0 +1,23 @@ +#include +int main() +{ + int i,n,count=0; + scanf("%d",&n); + int ar1[1000000]; + int ar2[2000001]; + for(i=0;i<2000001;i++) + ar2[i]=0; + for(i=0;i1) + count++; + } + printf("%d\n",count); + return 0; +} From adc6065971d8ff230f32aa5794abe46ddfa3eb63 Mon Sep 17 00:00:00 2001 From: sajalasati <32328861+sajalasati@users.noreply.github.com> Date: Sun, 29 Oct 2017 23:34:58 +0530 Subject: [PATCH 3/3] another code --- prob5.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 prob5.c diff --git a/prob5.c b/prob5.c new file mode 100644 index 0000000..da9ced5 --- /dev/null +++ b/prob5.c @@ -0,0 +1,60 @@ +#include +void merge(long long int arr[],int l,int m,int r); +void merge_sort(long long int arr[],int l,int r); +void merge(long long int arr[],int l,int m,int r) +{ + int i,j,k; + int n1 = m - l + 1; + int n2 = r - m; + int L[n1], R[n2]; + for(i=0;i=R[j]) arr[k]=L[i++]; + else arr[k]=R[j++]; + k++; + } + + while(i=sum) + { + printf("%d\n",i+1); + break; + } + } + return 0; +}