diff options
| author | Mistivia <i@mistivia.com> | 2024-02-16 11:11:14 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2024-02-16 11:11:14 +0800 |
| commit | 050fa7cbfb6b7cf293fb02e06daf123b3e6af816 (patch) | |
| tree | b547869fabbbf1f1153098ef811398ed40485d0a /advent-of-code/2022/04/2.c | |
| parent | e1a5304af2c35ff83819546953309764e24656d4 (diff) | |
delete advent of code 2022
Diffstat (limited to 'advent-of-code/2022/04/2.c')
| -rw-r--r-- | advent-of-code/2022/04/2.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/advent-of-code/2022/04/2.c b/advent-of-code/2022/04/2.c deleted file mode 100644 index 5d30d1c..0000000 --- a/advent-of-code/2022/04/2.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <stdio.h> - -int main() { - FILE *fp = fopen("input", "r"); - int x1, x2, y1, y2; - int count = 0; - while (fscanf(fp, "%d-%d,%d-%d", &x1, &x2, &y1, &y2) != EOF) { - if (x1 >= y1 && x1 <= y2 || x2 >= y1 && x2 <= y2 || x1 <= y1 && x2 >= y2) { - count++; - } - } - printf("%d\n", count); - return 0; -} |
