This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .NET 8.0.204 (C# 11 Roslyn compiler) | |
// weighted directed graph | |
// non-greedy algorithm | |
// works with negative edges but NOT with negative cycles! | |
var counts = Console.ReadLine()!.Split().Select(int.Parse).ToArray(); | |
var edgeCount = counts[0]; | |
var nodeCount = counts[1]; | |
var edges = new (int, int, int)[edgeCount]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
section .data | |
msg db 'tuutt',0xa ;the string about to be tested | |
len equ $ - msg ;length of the string | |
sim db 'sim',0xa ;good final result (palindrome) | |
nao db 'nao',0xa ;bad final result (not palindrome) | |
lenO equ 4 | |
section .text | |
global _start ;must be declared for using gcc |