# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1044659 | 2024-08-05T12:05:33 Z | Nickpapadak | Game (eJOI20_game) | C++14 | 0 ms | 348 KB |
#include<bits/stdc++.h> using namespace std; const unsigned int MAXN = 2e+1 + 5; int grid[MAXN][MAXN]; int N, M; int cnt; int main(){ scanf("%d%d", &N, &M); char ps[M]; scanf("%s", ps); for(int i = 1; i<=N; ++i){ char s[M]; scanf("%s", s); for(int j = 1; j <=M;++j) grid[i][j] = (ps[j-1]-'0') + (s[j-1]-'0'); for(int j = 0; j<M;++j){ ps[j] = s[j]; } } for(int i = 1; i<=N; ++i){ char s[M+1]; scanf("%s", s); for(int j = 1; j<=M; ++j){ grid[i][j] += (s[j] -'0') + (s[j-1] - '0'); if(grid[i][j] == 4) cnt++; } } printf("%d", -1*((N*M) - cnt)); // for(int i = 1; i<=N;++i){ // for(int j = 1; j <=M;++j){ // printf("%d ", grid[i][j]); // } // printf("\n"); // } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Incorrect | 0 ms | 348 KB | Output isn't correct |
6 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
11 | Correct | 0 ms | 348 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Incorrect | 0 ms | 348 KB | Output isn't correct |
14 | Halted | 0 ms | 0 KB | - |