Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int n, m;
- cin >> n >> m;
- int A[n][m], B[n][m];
- for(int i = 0; i < n; i++) {
- for(int j = 0; j < m; j++) {
- cin >> A[i][j];
- }
- }
- for(int i = 0; i < n; i++) {
- for(int j = 0; j < m; j++) {
- cin >> B[i][j];
- }
- }
- int brojac = 0;
- for(int i = 0; i < n; i++) {
- for(int j = 0; j < m; j++) {
- if(A[i][j] == B[i][j]) {
- cout << "[" << i << ", " << j << "]" << endl;
- brojac++;
- }
- }
- }
- cout << brojac << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment