fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int MAX_SIZE = 9;
  5. int freq[MAX_SIZE + 1];
  6.  
  7. int main() {
  8. int mt[MAX_SIZE + 1][MAX_SIZE + 1];
  9. for (int i = 1; i <= MAX_SIZE; ++i) {
  10. for (int j = 1; j <= MAX_SIZE; ++j) {
  11. cin >> mt[i][j] ;
  12. }
  13. }
  14. int keepPlay = 1, element = 1, counter = 0;
  15. for (int i = 1; i <= MAX_SIZE; ++i) {
  16. int curentEl = mt[1][i]; // 1,1; 1, 2; 1, 3
  17. for (int j = i; j <= MAX_SIZE; ++j) { //
  18. if (curentEl == mt[j][i] || curentEl == mt[i][j]) { // 1,1
  19. ++counter;
  20. }
  21. }
  22. // ++element;
  23. }
  24.  
  25. if (keepPlay == 1) {
  26. cout << "corect";
  27. } else {
  28. cout << "incorect";
  29. }
  30.  
  31. return 0;
  32. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
corect