Submission #646188

#TimeUsernameProblemLanguageResultExecution timeMemory
646188berrKitchen (BOI19_kitchen)C++17
0 / 100
0 ms212 KiB
#include <bits/stdc++.h> using namespace std; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(0); int n, m, k, ans=0,flag=1, ans2=0; cin>>n>>m>>k; vector<int> a(n), b(m), c(n); for(int i=0; i<n; i++) cin>>a[i], ans+=a[i]; for(int i=0; i<m; i++) cin>>b[i], ans-=b[i]; if(ans<=0) cout<<-ans; else cout<<"Impossible"; }

Compilation message (stderr)

kitchen.cpp: In function 'int32_t main()':
kitchen.cpp:8:24: warning: unused variable 'flag' [-Wunused-variable]
    8 |     int n, m, k, ans=0,flag=1, ans2=0; cin>>n>>m>>k;
      |                        ^~~~
kitchen.cpp:8:32: warning: unused variable 'ans2' [-Wunused-variable]
    8 |     int n, m, k, ans=0,flag=1, ans2=0; cin>>n>>m>>k;
      |                                ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...