day 9 (C)
This commit is contained in:
12
2021/OUTPUT
12
2021/OUTPUT
@@ -103,3 +103,15 @@ aoc-c : res=543
|
||||
aoc-c : res=994266
|
||||
time: 0:00.00 real, 0.00 user, 0.00 sys
|
||||
context-switch: 0+1, page-faults: 0+86
|
||||
|
||||
=========================================
|
||||
================= day09 =================
|
||||
=========================================
|
||||
|
||||
aoc-c : res=524
|
||||
time: 0:00.00 real, 0.00 user, 0.00 sys
|
||||
context-switch: 0+1, page-faults: 0+89
|
||||
|
||||
aoc-c : res=1235430
|
||||
time: 0:00.00 real, 0.00 user, 0.00 sys
|
||||
context-switch: 0+1, page-faults: 0+88
|
||||
|
5
2021/day09/EXAMPLE.txt
Normal file
5
2021/day09/EXAMPLE.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
2199943210
|
||||
3987894921
|
||||
9856789892
|
||||
8767896789
|
||||
9899965678
|
100
2021/day09/INPUT.txt
Normal file
100
2021/day09/INPUT.txt
Normal file
@@ -0,0 +1,100 @@
|
||||
9987675345698765453987654321234589999899878923493212345678999998656782467898999899878301234578998787
|
||||
9876543234789765322398743210123567898789767899986101239899789876543101567897898798763212355989987656
|
||||
3987784014897654310987654331235679965697644998765232345997654989765212799956999679854343466799976545
|
||||
2199875323998765421298776542346789434595433498754345456789543499876353489549876542975858977899876439
|
||||
1012965439899896432359987667457896546789322349987656987898932445987454578932987621986767898943989598
|
||||
2125976598798989943467898876589999858899910959898767898976101234598966689431298320987898999432399987
|
||||
3234987987656579894578989987679998769999899898769879999965422345679298995420139434598999896543459875
|
||||
4346799876545456789679877898789769878989798799656989899876563496799109989591298548999689789656598764
|
||||
5956998765434345698989765679895456989678679678943496789988689989898997979989987657987565698787989543
|
||||
6899898764321234567999876989954345696534598789432134679999799976987656765778998769766464989999865432
|
||||
7987679653210155789999997899875456789323999899521012345899899765698943254667999898954353578999654321
|
||||
9696598654323234589788998998986567898919894958933423456789999753459892123458998987893212467898765432
|
||||
8543498765434545679567899987987679987898743147894934567898989432398789334767987876789101298989876543
|
||||
7656789878545656789338989876598789986797654235679895678997878941987678975879896545698914345678987654
|
||||
9868998989656877892129678965439899975498754346998796789986867932954569986798765434567895458989998765
|
||||
8979987798787898921012567894321999874329985459876589899985457899873458987987654323469986567899869876
|
||||
7899876549898959999923456789432398765909876567987678999875322987654567898998773212378997698998754987
|
||||
6534997831999943987894567897543999899899987878998789789964201298765678919679654323456789799987632399
|
||||
5424598942689899876789678987659899988788999989019895699865362349986989103498795434567899899996549989
|
||||
4212349653498789765699989798798789877697898999999924789976457899798993212379986747698946999897998878
|
||||
5334569878989678934998995679987678954545987899789935689987567987649898763467897858789235798789887867
|
||||
6446878989876569976897893459876567893239876797689898789397679893234789654598998979999546999698785458
|
||||
7557989199987457898956789998984348994124965323486789895498798789123569875989109989898969898598654345
|
||||
8998994398796346899545699876543236789549876412345678979569987679023456989878992398767898767469643234
|
||||
9999689987654235695434689987652125678956987954456789768979876568994568999867989987659999955398759345
|
||||
7887578976543123489545679698983234789768998765677993457899765456789878997654878998767899843229898956
|
||||
6543469998768245678956789529865445899879999896798912349998987347899989989653467899879998732019987897
|
||||
7672398999875456989767895439876556789989989999899102356987798456789899878932356789989987643498976789
|
||||
8954987899986567899878976546989667993498979978976212469996549567895798969991245699899998754987685698
|
||||
9769876989987898901989997656898789101997768769895433498765439878934987656789346789788999869876564567
|
||||
9898765778998979312397899767999893249876753656789656569976524989423976546789498997697986998765473456
|
||||
3987654569789765434456976978999974756965432345678987678987734694319887635689989998456894219874321567
|
||||
2198733477678978645797895989989865669876543766799998789599848789998765212678979999367975323985432378
|
||||
3989821234568999756898934599878976798998754567898999897679959899899874323599867895459876434596543458
|
||||
9876432347679549887969423498969987897989865698997899979898767998798765435679756899567987546987654567
|
||||
9876543489789832998953210987658998996579878789876588965939989987659987546789645688979987657898785678
|
||||
3987654579898721239998723976547899987467989999995477894321098765545698687895436577898998898999896789
|
||||
2398766789989654359899644597656999876345697679654356965434197543434989798954323456987899939998987893
|
||||
1239887894678965498788987698987999765234789598765467896545976532129879899996534567896789123976798912
|
||||
0945998923567896997687898999298987653123696439876588987679876549098765945987965778945693239875459901
|
||||
9896789434678999876575999899399199762064594321987678998789989698987654326599878989238789459954345899
|
||||
6797898645789998767434598798989349872165689410198989769899898997898543212367989994345678998986254678
|
||||
5789949756894987654323497687878959989278796521239797653998767876799654302456999965456899987432123689
|
||||
4569439887893998799934598576967898995478897432345698992989545665698775212567899876697899876543234567
|
||||
5678921998969899987899974475459997898567998945456789989878932124569854323498976989989965987654345678
|
||||
6799990199656789876798863212349976987678999896897899879767893234698765434578965699878974598785458789
|
||||
9899989989543298765987652101267895999799998789998998968456789345999879545679854598767943459987569893
|
||||
3998979678932129894598543323458934889934987698999987654345895469876997656789765987659894567998678942
|
||||
1987667569892099989679656445667895679899876597896596543256896567989998789899876798547689978999789531
|
||||
9876553456789989878998767986898996798788995456789987752125789678998999897999987899534567899989898940
|
||||
8765432345679878967999899597959789987576789347899876543234589789987899975689999987656789929876967891
|
||||
8764321234698766556899995329345678987455678956789989684348678999876798764567898998769893212975456932
|
||||
9863210123459654345688989910258789876323589969894398765457789998765679923459987869878999109864349894
|
||||
9854525234598743234567979891345897995474567898989239878767899997654567895678996555989998919753239789
|
||||
9765434545987655455679865789457896986567678967878946989878959876543456789789789434599987898954398679
|
||||
9896565656898766767999954567978965497678989656567898998989245988652346799894698765679876767895976532
|
||||
9987879768999879879878323489989654398789893432349899987690159899721278967923989876798965456987987699
|
||||
8998989879988989998965412397898765219899762101234789996521998798754367899999878987987654347898998987
|
||||
7659395989876897987654323456789898323998753242345678989439887699865456899989769999876543236789019986
|
||||
8543214598765456798987654589896987536789894355456989879598754589876967999877658999997655345678998965
|
||||
7654323679876578969999865678945698545678976566567898769987653479989898998766546898998786457799987654
|
||||
8795498793997989657899976789234987657799987677678965657898794567998789987653234567899898568899998723
|
||||
9989989932398996546789989890123498968989998788789654346789887679899678996442123458901987678999899812
|
||||
9878879993989875237899999989254989979878999899898766869895998997676567894321015667892398789999798923
|
||||
7767767989878943123978999878969978998967899922939878998953219876565456976534124578943469999988697654
|
||||
6553459876767894234568986767898767987656789210125989987994101985432389997645234567894590129876598785
|
||||
5432345985458995679799875456989659876545456991234899876789919996676569987656545678965989239988439986
|
||||
4321359894346789789987654345678943965434345789546799765679898987787878998787656989879879998895321298
|
||||
5430198765497899894298763234567899876521234899987987654598787999898989109898767899998967897654210129
|
||||
6541679876989945999987654345678989987752345678999999766987656579999793212999878999987656789775323234
|
||||
6432589989877899998998765476989978998843459789998939878996545468989654329989999998798787894989876545
|
||||
7543458998965778987679976687898767898754678999987923989876432345678976498978989987659898943497987676
|
||||
8654567987854567896563987798998656899865789019876894599987321238789098987967878998743989932346798888
|
||||
9766779876543488997432398899987745679877892198765789998765450139989129876754568999974567895459999999
|
||||
9877898765632356789543459921096434567988943989654567899986521234678998765323467899865679976598897912
|
||||
9988987654521237989699567899987558978999659876543457899987634656899986544212456789877889987987656893
|
||||
9999996543210357678987998998998667989431968997652346998998785667901997432101348995998994398996545789
|
||||
8932987987631234589476789987689978999599878994321345997899996778929899546712467894239987469997434679
|
||||
7891098876546349679345678965578899998989989989935459876979897889298778994324578943190296599989323567
|
||||
6989129989865478993234567893456799987878998776896567965468789990199656989435678954989987989978934569
|
||||
5678949999976569310123689932345689876569899565789778984345688999987645678945789769979999878767897698
|
||||
4567898999987679453294594321017992985498765434698999993234567898765434899656899998768999765457898987
|
||||
7698987898799789564989695532399891996309899323456789832125678919876325999797999887657987654346789876
|
||||
8999876789654998679879989649989799876212987437899898761012348901985476789898998765431298743235689985
|
||||
9899965689543249998765679998767678965429876556945987652125667899876787899979459963210139852123798954
|
||||
8788754799932129879654587789656567896578987987899876543234799998989898998764349854321298764234567893
|
||||
7656543458794298965443445678932456789789598998901997654345678997693939789943298765432359879876899952
|
||||
6543252345679987654352237899751577899895459789212398897656889986542124599892109887545456989987896541
|
||||
8432101489989999875210128932967698998901345699924569998767994987431023999789213998676569995699965430
|
||||
7654312678999998996321239999878789767892396989895678989879993976545129897678954598789678934567976521
|
||||
8976433589998767987542356789999891557789989978789789467998989897685398789569899989899789325679897432
|
||||
9987544567899655698653468999987910345679878765678992345987878799896987667348798976949895434599789545
|
||||
9999655778999543219766567899876621234598765454567891249876567689929876543237667895435976565987679656
|
||||
8798789989988959309877678999765432545699654323479910134995456578912997632123456789523498878996598977
|
||||
6549891299876898912988989789876547686987543212567891239984323469329876321014567898654569989985456799
|
||||
1234932997764667893499995678987658798998654403459932398765012478998765432125678979866789699876345678
|
||||
0356799876543456994567894567898967899019873212378993987654139989219876843336789565977896579843234589
|
||||
1235789987532345789978943456899878978929764323456789398543248892101998765459895434598965498765445678
|
||||
2356897698421234567899432346789989767899875435668891239654356789432789887567976323699654329876786789
|
||||
3567896543210246788987541457892499848921986546879910129767568996545699998678988434789543210989897899
|
55
2021/day09/Makefile
Normal file
55
2021/day09/Makefile
Normal file
@@ -0,0 +1,55 @@
|
||||
# AOC daily Makefile - GNU make only.
|
||||
#
|
||||
# Copyright (C) 2021 Bruno Raoult ("br")
|
||||
# Licensed under the GNU General Public License v3.0 or later.
|
||||
# Some rights reserved. See COPYING.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with this
|
||||
# program. If not, see <https://www.gnu.org/licenses/gpl-3.0-standalone.html>.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later <https://spdx.org/licenses/GPL-3.0-or-later.html>
|
||||
#
|
||||
|
||||
INPUT := INPUT.txt
|
||||
SHELL := /bin/bash
|
||||
|
||||
CC := gcc
|
||||
|
||||
LIB := aoc_$(shell uname -m)
|
||||
INCDIR := ../include
|
||||
LIBDIR := ../lib
|
||||
LDFLAGS := -L$(LIBDIR)
|
||||
LDLIB := -l$(LIB)
|
||||
|
||||
export LD_LIBRARY_PATH = $(LIBDIR)
|
||||
|
||||
CFLAGS += -std=gnu99
|
||||
#CFLAGS += -O2
|
||||
CFLAGS += -g
|
||||
CFLAGS += -Wall
|
||||
CFLAGS += -Wextra
|
||||
CFLAGS += -march=native
|
||||
CFLAGS += -Wmissing-declarations
|
||||
CFLAGS += -Wno-unused-result
|
||||
|
||||
TIME := \time -f "\ttime: %E real, %U user, %S sys\n\tcontext-switch:\t%c+%w, page-faults: %F+%R\n"
|
||||
export PATH := .:$(PATH)
|
||||
|
||||
.PHONY: clean all compile ex1 ex2
|
||||
|
||||
all: ex1 ex2
|
||||
|
||||
compile: aoc-c
|
||||
|
||||
ex1: aoc-c
|
||||
@$(TIME) aoc-c -p 1 < $(INPUT)
|
||||
|
||||
ex2: aoc-c
|
||||
@$(TIME) aoc-c -p 2 < $(INPUT)
|
||||
|
||||
clean:
|
||||
@rm -f aoc-c core*
|
||||
|
||||
.c:
|
||||
@echo compiling $<
|
||||
@$(CC) $(CFLAGS) $(LDFLAGS) -I $(INCDIR) $< $(LDLIB) -o $@
|
72
2021/day09/README.txt
Normal file
72
2021/day09/README.txt
Normal file
@@ -0,0 +1,72 @@
|
||||
--- Day 9: Smoke Basin ---
|
||||
|
||||
These caves seem to be lava tubes. Parts are even still volcanically active; small hydrothermal vents release smoke into the caves that slowly settles like rain.
|
||||
|
||||
If you can model how the smoke flows through the caves, you might be able to avoid it and be that much safer. The submarine generates a heightmap of the floor of the nearby caves for you (your puzzle input).
|
||||
|
||||
Smoke flows to the lowest point of the area it's in. For example, consider the following heightmap:
|
||||
|
||||
2199943210
|
||||
3987894921
|
||||
9856789892
|
||||
8767896789
|
||||
9899965678
|
||||
|
||||
Each number corresponds to the height of a particular location, where 9 is the highest and 0 is the lowest a location can be.
|
||||
|
||||
Your first goal is to find the low points - the locations that are lower than any of its adjacent locations. Most locations have four adjacent locations (up, down, left, and right); locations on the edge or corner of the map have three or two adjacent locations, respectively. (Diagonal locations do not count as adjacent.)
|
||||
|
||||
In the above example, there are four low points, all highlighted: two are in the first row (a 1 and a 0), one is in the third row (a 5), and one is in the bottom row (also a 5). All other locations on the heightmap have some lower adjacent location, and so are not low points.
|
||||
|
||||
The risk level of a low point is 1 plus its height. In the above example, the risk levels of the low points are 2, 1, 6, and 6. The sum of the risk levels of all low points in the heightmap is therefore 15.
|
||||
|
||||
Find all of the low points on your heightmap. What is the sum of the risk levels of all low points on your heightmap?
|
||||
|
||||
Your puzzle answer was 524.
|
||||
--- Part Two ---
|
||||
|
||||
Next, you need to find the largest basins so you know what areas are most important to avoid.
|
||||
|
||||
A basin is all locations that eventually flow downward to a single low point. Therefore, every low point has a basin, although some basins are very small. Locations of height 9 do not count as being in any basin, and all other locations will always be part of exactly one basin.
|
||||
|
||||
The size of a basin is the number of locations within the basin, including the low point. The example above has four basins.
|
||||
|
||||
The top-left basin, size 3:
|
||||
|
||||
2199943210
|
||||
3987894921
|
||||
9856789892
|
||||
8767896789
|
||||
9899965678
|
||||
|
||||
The top-right basin, size 9:
|
||||
|
||||
2199943210
|
||||
3987894921
|
||||
9856789892
|
||||
8767896789
|
||||
9899965678
|
||||
|
||||
The middle basin, size 14:
|
||||
|
||||
2199943210
|
||||
3987894921
|
||||
9856789892
|
||||
8767896789
|
||||
9899965678
|
||||
|
||||
The bottom-right basin, size 9:
|
||||
|
||||
2199943210
|
||||
3987894921
|
||||
9856789892
|
||||
8767896789
|
||||
9899965678
|
||||
|
||||
Find the three largest basins and multiply their sizes together. In the above example, this is 9 * 14 * 9 = 1134.
|
||||
|
||||
What do you get if you multiply together the sizes of the three largest basins?
|
||||
|
||||
Your puzzle answer was 1235430.
|
||||
|
||||
Both parts of this puzzle are complete! They provide two gold stars: **
|
236
2021/day09/aoc-c.c
Normal file
236
2021/day09/aoc-c.c
Normal file
@@ -0,0 +1,236 @@
|
||||
/* aoc-c: Advent2021 game, day 6 parts 1 & 2
|
||||
*
|
||||
* Copyright (C) 2021 Bruno Raoult ("br")
|
||||
* Licensed under the GNU General Public License v3.0 or later.
|
||||
* Some rights reserved. See COPYING.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this
|
||||
* program. If not, see <https://www.gnu.org/licenses/gpl-3.0-standalone.html>.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later <https://spdx.org/licenses/GPL-3.0-or-later.html>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "bits.h"
|
||||
#include "list.h"
|
||||
#include "pool.h"
|
||||
|
||||
#define NLINES 1024 /* alloc size */
|
||||
|
||||
struct data {
|
||||
int nlines; /* current read lines */
|
||||
int alloc; /* allocated lines */
|
||||
int length; /* line length */
|
||||
char **lines;
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
static void print_data(struct data *data)
|
||||
{
|
||||
for (int i = 0; i < data->nlines; ++i)
|
||||
printf("[%03d]%s\n", i, data->lines[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct data *read_file()
|
||||
{
|
||||
size_t alloc = 0;
|
||||
static struct data data;
|
||||
ssize_t len;
|
||||
|
||||
data.alloc = NLINES;
|
||||
if (!(data.lines = malloc(data.alloc * sizeof (*data.lines))))
|
||||
return NULL;
|
||||
|
||||
while ((len = getline(&data.lines[data.nlines], &alloc, stdin)) > 0) {
|
||||
data.length = len - 1;
|
||||
data.lines[data.nlines][len - 1] = 0;
|
||||
if (data.nlines == data.alloc) {
|
||||
data.alloc += NLINES;
|
||||
if (!(data.lines = realloc(data.lines, data.alloc * sizeof (*data.lines))))
|
||||
return NULL;
|
||||
}
|
||||
data.nlines++;
|
||||
}
|
||||
return &data;
|
||||
}
|
||||
|
||||
#define UP(l, c) (data->lines[(l) - 1][c])
|
||||
#define DOWN(l, c) (data->lines[(l) + 1][c])
|
||||
#define LEFT(l, c) (data->lines[l][(c) - 1])
|
||||
#define RIGHT(l, c) (data->lines[l][(c) + 1])
|
||||
|
||||
static u64 part1()
|
||||
{
|
||||
int res = 0;
|
||||
struct data *data;
|
||||
int l, c;
|
||||
|
||||
data = read_file();
|
||||
|
||||
for (l = 0; l < data->nlines; ++l) {
|
||||
for (c = 0; c < data->length; ++c) {
|
||||
if (l > 0) {
|
||||
if (UP(l, c) <= data->lines[l][c])
|
||||
continue;
|
||||
}
|
||||
if (c > 0) {
|
||||
if (LEFT(l, c) <= data->lines[l][c])
|
||||
continue;
|
||||
}
|
||||
if (l < data->nlines - 1) {
|
||||
if (DOWN(l, c) <= data->lines[l][c])
|
||||
continue;
|
||||
}
|
||||
if (c < data->length - 1) {
|
||||
if (RIGHT(l, c) <= data->lines[l][c])
|
||||
continue;
|
||||
}
|
||||
res += data->lines[l][c] - '0' + 1;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
struct stack {
|
||||
int l;
|
||||
int c;
|
||||
struct list_head list;
|
||||
};
|
||||
LIST_HEAD(stack_head);
|
||||
|
||||
static pool_t *pool;
|
||||
|
||||
static struct stack *push(int l, int c)
|
||||
{
|
||||
struct stack *stack;
|
||||
|
||||
stack = pool_get(pool);
|
||||
stack->l = l;
|
||||
stack->c = c;
|
||||
list_add_tail(&stack->list, &stack_head);
|
||||
return stack;
|
||||
}
|
||||
|
||||
static struct stack *pop()
|
||||
{
|
||||
struct stack *stack;
|
||||
|
||||
if (list_empty(&stack_head))
|
||||
return NULL;
|
||||
stack = list_first_entry(&stack_head, struct stack, list);
|
||||
list_del(&stack->list);
|
||||
return stack;
|
||||
}
|
||||
|
||||
static int bfs(struct data *data)
|
||||
{
|
||||
struct stack *stack;
|
||||
int res = 0, l, c;
|
||||
|
||||
while ((stack = pop())) {
|
||||
l = stack->l;
|
||||
c = stack->c;
|
||||
res++;
|
||||
pool_add(pool, stack);
|
||||
if (l > 0) {
|
||||
if (UP(l, c) < '9') {
|
||||
data->lines[l - 1][c] = '9';
|
||||
push(l - 1, c);
|
||||
}
|
||||
}
|
||||
if (c > 0) {
|
||||
if (LEFT(l, c) < '9') {
|
||||
data->lines[l][c - 1] = '9';
|
||||
push(l, c - 1);
|
||||
}
|
||||
}
|
||||
if (l < data->nlines - 1) {
|
||||
if (DOWN(l, c) < '9') {
|
||||
data->lines[l + 1][c] = '9';
|
||||
push(l + 1, c);
|
||||
}
|
||||
}
|
||||
if (c < data->length - 1) {
|
||||
if (RIGHT(l, c) < '9') {
|
||||
data->lines[l][c + 1] = '9';
|
||||
push(l, c + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static u64 part2()
|
||||
{
|
||||
int res = 0, l, c, best[3] = { 0 }, lowbest;
|
||||
struct data *data;
|
||||
|
||||
data = read_file();
|
||||
|
||||
if (!(pool = pool_init("stack", 128, sizeof (struct stack))))
|
||||
return -1;
|
||||
for (l = 0; l < data->nlines; ++l) {
|
||||
for (c = 0; c < data->length; ++c) {
|
||||
if (data->lines[l][c] < '9') {
|
||||
data->lines[l][c] = '9';
|
||||
push(l, c);
|
||||
res = bfs(data);
|
||||
lowbest = 0;
|
||||
if (best[1] < best[lowbest])
|
||||
lowbest = 1;
|
||||
if (best[2] < best[lowbest])
|
||||
lowbest = 2;
|
||||
if (res > best[lowbest])
|
||||
best[lowbest] = res;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return best[0] * best[1] * best[2];
|
||||
}
|
||||
|
||||
static u64 doit(int part)
|
||||
{
|
||||
return part == 1? part1(): part2();
|
||||
}
|
||||
|
||||
static int usage(char *prg)
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [-d debug_level] [-p part]\n", prg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
int opt;
|
||||
u32 exercise = 1;
|
||||
u64 res;
|
||||
|
||||
while ((opt = getopt(ac, av, "d:p:")) != -1) {
|
||||
switch (opt) {
|
||||
case 'd':
|
||||
debug_level_set(atoi(optarg));
|
||||
break;
|
||||
case 'p': /* 1 or 2 */
|
||||
exercise = atoi(optarg);
|
||||
if (exercise < 1 || exercise > 2)
|
||||
return usage(*av);
|
||||
break;
|
||||
default:
|
||||
return usage(*av);
|
||||
}
|
||||
}
|
||||
if (optind < ac)
|
||||
return usage(*av);
|
||||
|
||||
res = doit(exercise);
|
||||
printf("%s : res=%lu\n", *av, res);
|
||||
exit (0);
|
||||
}
|
Reference in New Issue
Block a user