Moved kattis from Uni repo
This commit is contained in:
3
kattis/problems/18_11_23/umferd/1.in
Normal file
3
kattis/problems/18_11_23/umferd/1.in
Normal file
@ -0,0 +1,3 @@
|
||||
2
|
||||
1
|
||||
.#
|
4
kattis/problems/18_11_23/umferd/2.in
Normal file
4
kattis/problems/18_11_23/umferd/2.in
Normal file
@ -0,0 +1,4 @@
|
||||
4
|
||||
2
|
||||
#.#.
|
||||
.###
|
23
kattis/problems/18_11_23/umferd/main.c
Normal file
23
kattis/problems/18_11_23/umferd/main.c
Normal 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;
|
||||
}
|
23
kattis/problems/18_11_23/umferd/main.c.orig
Normal file
23
kattis/problems/18_11_23/umferd/main.c.orig
Normal 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;
|
||||
}
|
BIN
kattis/problems/18_11_23/umferd/program
Executable file
BIN
kattis/problems/18_11_23/umferd/program
Executable file
Binary file not shown.
Reference in New Issue
Block a user