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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
using System.Net; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Net.Sockets; |
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
using System; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Drawing; | |
using System.Drawing.Drawing2D; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
using System.Windows; | |
using System.Windows.Forms; |
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
using System; | |
using System.Runtime.InteropServices; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.Windows.Forms; | |
using System.Diagnostics; | |
using System.Net.Sockets; | |
using System.Net; | |
using System.Text; | |
using System.Net.Http; |
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
namespace ege22new | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int N = 12; // total ids | |
int[] time = new int[] { 4, 3, 1, 7, 6, 3, 1, 2, 7, 8, 6, 6 }; | |
List<int[]> dependensens = new() | |
{ |
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
N = 12 | |
time = [4,3,1,7,6,3,1,2,7,8,6,6] | |
deps = [[0],[0],[1,2],[3],[3],[5],[4,6],[7],[0],[0],[9],[10]] | |
for i in range(N): | |
totaltime = time[i] | |
if (deps[i][0] == 0): continue | |
maxdeptime = max(time[x - 1] for x in deps[i]) | |
totaltime += maxdeptime | |
time[i] = totaltime | |
print(max(time)) |
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
// Типовой расчет №1 по дисциплине "Дискретная математика" (программный уровень) | |
// Преподователь: Гилев Павел Андреевич | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
// input | |
Scanner scanner = new Scanner(System.in); | |
int countVars = scanner.nextInt(); // n |
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
// Типовой расчет №2 по дисциплине "Дискретная математика" (программный уровень) | |
// Преподователь: Гилев Павел Андреевич | |
import java.util.Scanner; | |
public class Tipovik2 { | |
public static void main(String[] args) { | |
// input | |
Scanner scanner = new Scanner(System.in); |
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
n = int(input()) | |
list = [] | |
ans = [] | |
result = [] | |
d = {a : chr(a + ord('A')) for a in range(0, n)} | |
for i in range (2**n): | |
temp = "" | |
while(len(temp)!=n+1): | |
temp = input() | |
temp = temp.replace(' ', '') |
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
// Java Hamming code alghoritm | |
package io.github.zerumi; | |
import java.util.Arrays; | |
import java.util.Scanner; | |
import java.util.stream.IntStream; | |
public class Main { | |
public static void main(String[] args) { | |
try { |