Moved kattis from Uni repo

This commit is contained in:
2023-12-01 13:35:13 +01:00
parent 28a6b807a3
commit aaa2c123b8
164 changed files with 3008 additions and 0 deletions

View File

@ -0,0 +1,3 @@
2
1
.#

View File

@ -0,0 +1,4 @@
4
2
#.#.
.###

View File

@ -0,0 +1,23 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int m, n;
scanf("%d %d", &m, &n);
int empty = 0;
int filled = 0;
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
char c = getchar();
if (c == '.') {
empty++;
} else if (c == '#') {
filled++;
}
}
}
printf("%d %d\n", empty, filled);
return 0;
}

View File

@ -0,0 +1,23 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int m, n;
scanf("%d %d", &m, &n);
int empty = 0;
int filled = 0;
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
char c = getchar();
if (c == '.') {
empty++;
} else if (c == '#') {
filled++;
}
}
}
printf("%d %d\n",empty, filled);
return 0;
}

Binary file not shown.