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
conj, seq = [int(i) for i in input().split()] | |
A = [int(i) for i in input().split()][:conj] | |
jogadas = [int(i) for i in input().split()][:seq] | |
B = [] | |
for jogada in range(0, len(jogadas)): | |
if jogadas[jogada] in A: | |
B.append(jogadas[jogada]) | |
elif len(B) == 0: |
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
compr, qtd = [int(i) for i in input().split()] | |
print((compr - qtd + 1) ** 2 + qtd - 1) |
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
qtd_notas = int(input()) | |
notas = [int(nota) for nota in input().split()] | |
freq, top = {}, (0, 0) | |
for i in range(0, qtd_notas): | |
if notas[i] not in freq: | |
freq[notas[i]] = 0 | |
freq[notas[i]] += 1 | |
for key in freq: |
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
$("a").each(function(c,a){"PDF"==a.innerHTML&&$.get(a.href,function(a){$(a).find("a").each(function(a,b){"Baixar este arquivo PDF"==b.innerHTML&&window.open(b.href,null)})})}); |
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
#!/usr/bin/bash | |
# /usr/local/bin/automount | |
label=$(blkid -o value -s LABEL $1) | |
if [[ "x${label}" == "x" ]]; then | |
label=$(blkid -o value -s UUID $1) | |
fi | |
if [[ "x${label}" != "x" ]]; then | |
dest="/media/${label}" | |
mkdir -p ${dest} |
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
from builtins import KeyError | |
import string | |
class Steckerbrett: | |
def __init__(self, *args): | |
self.map = {} | |
for arg in args: | |
if arg[0] in self.map or arg[1] in self.map: |
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
def quicksort(l): | |
if len(l) == 0: | |
return l | |
pivot = l.pop() | |
return quicksort([x for x in l if x < pivot]) + [pivot] + quicksort([x for x in l if x >= pivot]) |
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
function cleanPreviousIndentation(line) | |
return line:gsub("^%s+", ""):gsub("%s+$", "") | |
end | |
function escapeString(str) | |
return str:gsub("[()]", "%%%1") | |
end | |
function string:split(delimiter) | |
local array = {} |
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
#!/usr/bin/env php | |
<?php | |
require 'simple_html_dom.php'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); |
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
function cleanPreviousIndentation(line) | |
return line:gsub("^%s+", ""):gsub("%s+$", "") | |
end | |
function escapeString(str) | |
return str:gsub("[()]", "%%%1") | |
end | |
function string:split(delimiter) | |
local array = {} |