Skip to content

Conversation

@marsenis
Copy link
Contributor

@marsenis marsenis commented Mar 20, 2025

Lower priority TODOs (probably not in this PR

  1. Πιθανώς κάποια σχήματα θα βοηθούσαν στην κατανόηση.
  2. Σκέφτομαι μήπως μετονομάσω τις μεταβλητές που περιέχουν τη λέξη loop με τη λέξη cycle γιατί κατάλαβα ότι "loop" είναι λίγο άστοχο (θυμίζει self-loop), και μοιάζει πολύ με τη λέξη "root" που επίσης χρησιμοποιώ σε παρόμοιο context. Πείτε μου κι εσείς τη γνώμη σας.

@kbokis
Copy link
Contributor

kbokis commented Mar 20, 2025

Σχετικά με το stack overflow: αν κάνεις compile σε windows σκάει πολύ πιο εύκολα το stack λόγω περισσότερων αποθηκευμένων δεδομένων. Σε linux ίσως να μην υπάρχει θέμα. Θα κάνω δοκιμή σε linux αργότερα.

Copy link

@makis-modulus makis-modulus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I took care of most of the comments.
Θα βάλω σχόλια στον κώδικα της optimal λύσης σε επόμενο commit.

Copy link
Collaborator

@Dim131 Dim131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Μερικά μικρά σχόλια

Copy link
Contributor Author

@marsenis marsenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major changes:

  1. Έκανα όλα τα vectors global σε όλα τα subtasks. Thanks for the suggestion, Δημήτρη! Όντως βοηθάει με το stack usage, αλλά ακόμα χάνω 4 test cases λόγω stack overflow αν δεν ανεβάσω το όριο σε 16 MB.
  2. Άλλαξα ονόματα των μεταβλητών src, dst στον κώδικα σε L, R ώστε να ταιριάζει με το κείμενο.
  3. Στον κώδικα πλεον χρησιμοποιώ παντού το convention parent[root] = root, σε αντίθεση με πριν όπου σε κάποια σημεία χρησιμοποιούσα parent[root] = -1.

Μένει μόνο να βάλω code snippets και code links στο κείμενο. Θα το κάνω αργότερα.

for (long i = 0; i < n-1; ++i) {
long u, v, w;
scanf("%li%li%li", &u, &v, &w);
assert(1 <= u && u <= n);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ισχύει. Τα είχα μόνο για debugging βασικά. Τα βγάζω.

@marsenis marsenis changed the title [INCOMPLETE] 37b-4-tiphunting 37b-4-tiphunting Mar 21, 2025
Copy link
Collaborator

@Dim131 Dim131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Μερικά μικρά σχόλια. Κατά τα άλλα νομίζω είναι έτοιμο!

Μερικές εικόνες μπορεί να ήταν ωραίο να είχαμε, αλλά δεν πειράζει αν δεν έχεις χρόνο

passes_only = [2, 3, 4, 5],
lang = "c++",
),
SOLUTION(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: tabs -> spaces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.
Fyi, έκανα copy-paste από το TASK του samepizzas. Έχουν ξεμείνει κι εκεί tabs.

Copy link
Contributor

@kbokis kbokis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Μερικά typos κυρίως. Ωραία!

@Dim131 Dim131 merged commit d23a444 into pdp-archive:master Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants