From 8f40695ee9cf3b0ec3e92fdbd9e4a3fc677ecb3c Mon Sep 17 00:00:00 2001 From: amnagrawal Date: Tue, 31 Mar 2015 23:27:39 +0530 Subject: [PATCH] 1025-fashion --- 1025.cpp | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 1025.cpp diff --git a/1025.cpp b/1025.cpp new file mode 100644 index 0000000..510fdff --- /dev/null +++ b/1025.cpp @@ -0,0 +1,78 @@ +//http://www.spoj.com/problems/FASHION/ + +#include +#include +using namespace std; + +int main() +{ + void msort(int a[], int ini, int fin); + int t, n, m[1000], w[1000], hb; + cin>>t; + while(t--) + { + hb = 0; + cin>>n; + for(int i=0; i>m[i]; + + for(int j=0; j>w[j]; + + msort(m, 0, n-1); + msort(w, 0, n-1); + + for(int k=0; k