diff --git a/31xxx/31628.cpp b/31xxx/31628.cpp new file mode 100644 index 00000000..019e8b52 --- /dev/null +++ b/31xxx/31628.cpp @@ -0,0 +1,27 @@ +#include +#include +#include +using namespace std; + +bool solve(void) { + vector> v(10, vector(10)); + for (int i=0; i<10; i++) for (int j=0; j<10; j++) cin >> v[i][j]; + + for (int i=0; i<10; i++) { + bool flag = true; + for (int j=1; j<10; j++) if (v[i][j] != v[i][j-1]) flag = false; + if (flag) return true; + flag = true; + for (int j=1; j<10; j++) if (v[j][i] != v[j-1][i]) flag = false; + if (flag) return true; + } + return false; +} + +int main(void) { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + cout << solve(); + return 0; +} \ No newline at end of file