-
Notifications
You must be signed in to change notification settings - Fork 8
37b-4-tiphunting #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
37b-4-tiphunting #278
Conversation
|
Σχετικά με το stack overflow: αν κάνεις compile σε windows σκάει πολύ πιο εύκολα το stack λόγω περισσότερων αποθηκευμένων δεδομένων. Σε linux ίσως να μην υπάρχει θέμα. Θα κάνω δοκιμή σε linux αργότερα. |
makis-modulus
left a comment
There was a problem hiding this 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.
Dim131
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Μερικά μικρά σχόλια
marsenis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Major changes:
- Έκανα όλα τα vectors global σε όλα τα subtasks. Thanks for the suggestion, Δημήτρη! Όντως βοηθάει με το stack usage, αλλά ακόμα χάνω 4 test cases λόγω stack overflow αν δεν ανεβάσω το όριο σε 16 MB.
- Άλλαξα ονόματα των μεταβλητών
src, dstστον κώδικα σεL, Rώστε να ταιριάζει με το κείμενο. - Στον κώδικα πλεον χρησιμοποιώ παντού το 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ισχύει. Τα είχα μόνο για debugging βασικά. Τα βγάζω.
Dim131
left a comment
There was a problem hiding this 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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: tabs -> spaces
There was a problem hiding this comment.
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.
kbokis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Μερικά typos κυρίως. Ωραία!
Lower priority TODOs (probably not in this PR
loopμε τη λέξηcycleγιατί κατάλαβα ότι "loop" είναι λίγο άστοχο (θυμίζει self-loop), και μοιάζει πολύ με τη λέξη "root" που επίσης χρησιμοποιώ σε παρόμοιο context. Πείτε μου κι εσείς τη γνώμη σας.