Skip to content

Instantly share code, notes, and snippets.

f = open("27-a.txt")
n = int(f.readline())
arr = [[] for i in range(9)]
for i in range(n):
now = int(f.readline())
arr[now % 9].append(now)
for i in range(9):
a = [[0] * 100 for i in range(100)]
for i in range(100):
for j in range(100):
if i + 1 + j >= 79 or 2 * i + j >= 79 or i + 2 * j >= 79:
a[i][j] = 1
for k in range(100):
for i in range(1, 100):
f = open("test.txt")
def get():
return list( map(int, f.readline().split()))
n = int(f.readline())
s = get()
@VxDxK
VxDxK / Main.py
Last active May 16, 2021 19:13
EGE
############################################################################
def dividers(n):
arr = []
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
arr.append(i)
if i*i != n:
arr.append(n // i)
arr.sort()
return arr
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
def toBase(base, num):
newNum = ''
while num > 0:
newNum = str(num % base) + newNum
num //= base
return newNum
def toDec(num, base):
iu = str(num)
cmake_minimum_required(VERSION 3.17)
project(WebSocket)
find_package(Boost REQUIRED COMPONENTS system)
include_directories( . ${Boost_INCLUDE_DIRS})
set(CMAKE_CXX_STANDARD 11)
add_executable(WebSocket main.cpp User.cpp User.h)
@VxDxK
VxDxK / pom.xml
Last active September 9, 2021 19:20
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.vdk</groupId>
<artifactId>example-test</artifactId>
<version>1.0-SNAPSHOT</version>
int gcd (int a, int b) {
while (b) {
a %= b;
swap (a, b);
}
return a;
}
int lcm (int a, int b) {
return a / gcd (a, b) * b;