new_data = list()
for i in range(len(data["Долг"])):
temp = list()
for key,_ in data.items():
temp.append(key+"="+data[key][i])
pass
new_data.append(temp.copy())
def bypass(tree, find):
arr = tree
for e in arr['edges']:
for p in find:
if e['name'] == p:
find.remove(p)
arr = e
if len(e['edges']) == 0:
print(e["df"]['Риск'].iloc[-1])
else:
bypass(arr, find)
for i in new_data:
bypass(Tree, i)
for i in range(len(data["Долг"])):
temp = list()
for key,_ in data.items():
temp.append(key+"="+data[key][i])
pass
new_data.append(temp.copy())
print(new_data)
print('--------------------')
def bypass(tree, data_x, data_y, data_z):
name_tree = tree["name"]
target_tree = str(cstr(tree["df"].iloc[:,-1]) if len(tree["edges"])==0 else "")
for i in [data_x, data_y, data_z]:
if i == name_tree:
for e in tree["edges"]:
name_tree += bypass(e, data_x, data_y, data_z)
pass
print(i, name_tree)
for e in tree["edges"]:
name_tree += bypass(e, data_x, data_y, data_z)
pass
return name_tree
for i in range(len(new_data)):
bypass(Tree, new_data[i][3], new_data[i][0], new_data[i][1])
#!/bin/bash
read N
arr=($(cat))
maxPos=0
minPos=0
j=0
for ((i=0; i < N; i++))
do
if ((${arr[minPos]} > ${arr[i]}))
then
minPos=$i
fi
if ((${arr[maxPos]} < ${arr[i]}))
then
maxPos=$i
fi
done
if (($minPos<$maxPos))
then
first=$minPos
second=$maxPos
else
first=$maxPos
second=$minPos
fi
for ((i=0; i<first+1; i++))
do
echo ${arr[i]}
done
for ((i=second-1; i>=first+1; i--))
do
echo ${arr[i]}
done
for ((i=second; i<N; i++))
do
echo ${arr[i]}
done
#!/bin/bash
read str
if [ $str == "y" ] || [ $str == "Y" ]
then echo "YES"
else echo "NO"
fi
typedef struct NODE NODE;
typedef struct NODE* PNODE;
typedef struct DLIST DLIST;
typedef struct DLIST* PDLIST;
struct NODE {
int key;
int info;
PNODE prev, next;
}node;
struct DLIST {
int count, size;
PNODE left, right;
}list;
int main () {
nd->key = 1; // Ключ узла для поиска, удаления и т.п.
nd->info = 1996; // Информация узла
}