Skip to content

Instantly share code, notes, and snippets.

import pygame as pg
import random
FPS = 30
W = 1000
H = 1000
R = 50
menu = True
@crazydiver
crazydiver / py
Last active February 12, 2020 11:21
Demo_ex-2019-5
import pygame as pg
FPS = 30
W = 1000
H = 1000
R = 50
menu = True
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <climits>
using namespace std;
competitors = [0] * (int(input()))
for election in map(int, input().split()):
if 0 < election <= len(competitors):
competitors[election - 1] += 1
if len(competitors) > 0:
win_res = max(competitors)
else:
win_res = 0
if win_res != 0:
for i in range(len(competitors)):
n, m = map(int, input().split())
mas = []
sumin = 0
sumout = 0
massorted = []
for i in range(n+m):
f = input()
ch = int(f[1:])
if f[0] == '-':
mas.append(ch)
type
pelment = ^telement;
telement = record
int:longint;
next:^telement;
end;
procedure push(var lr,rr:pelment; el:longint);
var
var
i, n, Place, lth, maxLth :longint;
room : array[1..9] of boolean;
begin
for i:=1 to 9 do
room[i]:=true;
readln (n);
for i:=1 to n do
begin
read (Place);
type
mas = array[1..10000] of longint;
procedure vvod (var n :longint; var A :mas);
var
i :longint;
begin
readln (n);
for i:=1 to n do
read (A[i]);
@crazydiver
crazydiver / sort-matrix.pas
Created March 19, 2018 06:45
sort matrix
type
mas = array [1..100, 1..100] of longint;
procedure vvod(
var
k, kolstr, kolst: longint;
var
random(b-a)+a