Moved kattis from Uni repo
This commit is contained in:
2
kattis/problems/18_11_23/asciikassi/1.in
Normal file
2
kattis/problems/18_11_23/asciikassi/1.in
Normal file
@ -0,0 +1,2 @@
|
||||
1
|
||||
Hannes
|
17
kattis/problems/18_11_23/asciikassi/main.c
Normal file
17
kattis/problems/18_11_23/asciikassi/main.c
Normal file
@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int a;
|
||||
scanf("%d", &a);
|
||||
char c;
|
||||
int b[100];
|
||||
while ((c = getchar()) != '\n') {
|
||||
if (c >= 'A' && c <= 'Z' && b[c - 'A'] == 0) {
|
||||
printf("%c", c);
|
||||
b[c - 'A'] = 1;
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
BIN
kattis/problems/18_11_23/asciikassi/program
Executable file
BIN
kattis/problems/18_11_23/asciikassi/program
Executable file
Binary file not shown.
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