Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<vector>
- using namespace std;
- int main(){
- int N,M,K,a,c=0;
- vector<int> V1;
- vector<int> V2;
- cin >> N >> M >> K;
- for(int i = 0; i<N; i++){
- cin >> a;
- V1.push_back(a);
- }
- for(int i = 0; i<M; i++){
- cin >> a;
- V2.push_back(a);
- }
- for(int i = 0; i<N; i++){
- for(int j = 0; j<M; j++){
- if(V1[i] - V2[j] <= 5 && V1[i] - V2[j] >= -5){
- c++;
- V2[j] == -50;
- V1[i] == -100;
- }
- }
- }
- cout << c;
- }
Advertisement
Add Comment
Please, Sign In to add comment