This file contains 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 itertools import count, takewhile, accumulate | |
import operator | |
from pprint import pprint | |
def to_task_name(n): | |
return chr(ord('A') + n) | |
def create_tasks_iter(first_time, last_time): |
This file contains 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 functools import reduce | |
from itertools import count, permutations | |
from pprint import pprint | |
def to_task_name(n): | |
return chr(ord('A') + n) | |
def name_time_cost_to_task(t): |
This file contains 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
<!DOCTYPE html> | |
<!-- saved from url=(0072)http://planfact.ru/project.html?executedFunction=article&articleId=24126 --> | |
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Статья</title> | |
<link href="http://planfact.ru/custom.css" rel="stylesheet"> | |
<link href="http://planfact.ru/osans.css" rel="stylesheet"> |
This file contains 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.Linq; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using SampleAi; | |
namespace Tests | |
{ | |
[TestClass] | |
public class MapTests | |
{ | |
#region Tests |
This file contains 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.Diagnostics; | |
using System.Linq; | |
namespace SampleAi | |
{ | |
[DebuggerDisplay("Pont({X}, {Y})")] | |
public class Point | |
{ |
This file contains 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
var username = document.getElementsByTagName('h1')[0].innerText; | |
var gameTable = document.getElementsByClassName('gamesTable')[0]; | |
for(var i = 1, row; row = gameTable.rows[i]; ++i) { | |
winner = row.cells[4].children[0].children[0]; | |
winnerPlace = row.cells[7].children[0].innerText; | |
loserPlace = row.cells[7].children[2].innerText; | |
if(winner.title == username && winnerPlace != loserPlace) { | |
row.hidden = true; |
This file contains 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
import os | |
with open('original', 'r') as o: | |
original = set(o.readlines()) | |
with open('report.txt', 'w') as report: | |
for subdir, _, files in os.walk('submissions_462'): | |
for f in files: | |
with open(os.path.join(subdir, f), 'r') as file: | |
s = set(file.readlines()) |
This file contains 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 python3 | |
from itertools import islice | |
from bs4 import BeautifulSoup | |
from codeforces import CodeforcesAPI, VerdictType | |
from urllib import request | |
import sys | |
def load_source_code_from_submission(submission): |