Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int B, S, AB[10000], AS;
- int cs = 0, min;
- while(true) {
- cin >> B >> S;
- if(B == 0 && S == 0) break;
- for(int i = 0; i < B; i++)
- cin >> AB[i];
- for(int i = 0; i < S; i++)
- cin >> AS;
- if(B <= S) cout << "Case " << ++cs << ": " << 0 << endl;
- else {
- min = AB[0];
- for(int i = 0; i < B; i++)
- min = (min > AB[i]) ? AB[i] : min;
- cout << "Case " << ++cs << ": " << B - S << " " << min << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement