27 lines
539 B
C++
27 lines
539 B
C++
#include <iostream>
|
|
#include <unordered_map>
|
|
using namespace std;
|
|
int main(){
|
|
int a[4][4];
|
|
int x, y;
|
|
for(int i = 0; i < 4; i++){
|
|
for(int j = 0; j < 4; j++){
|
|
cin >> a[i][j];
|
|
if(a[i][j] == 0) {
|
|
x = i; y = j;
|
|
}
|
|
}
|
|
}
|
|
unordered_map<int, int> mp;
|
|
for(int i = 0; i < 4; i++){
|
|
mp[a[x][i]] = 1;
|
|
}
|
|
for(int i = 0; i < 5; i++){
|
|
if(mp.count(i) == 0) {
|
|
cout << i << endl;
|
|
return 0;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|