#include <iostream> #include <vector> #include <queue> using namespace std; struct Greater { bool operator() (int x, int y) { return x > y; } }; struct Lesser { bool operator()(int x, int y) { return x<y; } }; int main() { priority_queue<int, vector<int>, Lesser> x; priority_queue<int, vector<int>, Greater> y; int n1, n2, n, i, a; double s; while( scanf("%d%d%d", &n1, &n2, &n) != -1) { if(n==0) break; s = 0; for(i=1; i<=n; ++i) { scanf("%d", &a); x.push(a); y.push(a); s += a; if( i > n1 ) y.pop(); if( i > n2 ) x.pop(); } while( !x.empty() ) { s -= x.top(); x.pop(); } while( !y.empty() ) { s -= y.top(); y.pop(); } printf("%.6lf/n", s/(n-n1-n2)); } return 0; }