Skip to content

Commit

Permalink
Add 25595.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiyabye committed Jul 14, 2024
1 parent 83de5e4 commit 449f2b7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions 25xxx/25595.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <iostream>
#include <vector>
using namespace std;

bool solve(void) {
int n; cin >> n;
vector<vector<int>> v(n, vector<int>(n));
for (int i=0; i<n; i++) for (int j=0; j<n; j++) cin >> v[i][j];

bool a = false, b = false, c = false;
for (int i=0; i<n; i++) for (int j=0; j<n; j++) {
if (v[i][j] == 1) {
if (i+j & 1) a = true;
else b = true;
} else if (v[i][j] == 2) {
if (i+j & 1) c = true;
}
if (a && b) return false;
}
if (a ^ b) return a ^ c;
return true;
}

int main(void) {
ios::sync_with_stdio(false);
cin.tie(nullptr);

cout << (solve() ? "Lena" : "Kiriya");
return 0;
}

0 comments on commit 449f2b7

Please sign in to comment.