Submission #566992

# Submission time Handle Problem Language Result Execution time Memory
566992 2022-05-23T07:07:03 Z birthdaycake Kitchen (BOI19_kitchen) C++17
0 / 100
1 ms 340 KB
#include<bits/stdc++.h>
#define endl '\n'
#define int long long
#define mod 1000000007
#define boost ios_base::sync_with_stdio(false), cin.tie(NULL);
using namespace std;
 
 
 

int a[200001],b[200001];

signed main(){
    boost;
    
    
    
    
    int n,m,k, cnt = 0, cnt2 = 0; cin >> n >> m >> k;
    for(int i = 0; i < n; i++) {
        cin >> a[i];
        cnt += a[i];
    }
    
    for(int j = 0; j < m; j++){
        cin >> b[j];
        cnt2 += b[j];
    }
    if(cnt2 < cnt){
        cout << "Impossible";
    }else{
        cout << cnt2 - cnt;
    }
    
    
    
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -