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
#include <bits/stdc++.h> | |
using namespace std; | |
void main_() { | |
// implement your solution here | |
} | |
void run_with_stack_size(size_t sz, void (*f)(void)) { | |
assert(sz % 16 == 0); | |
char *s = (char *)malloc(sz), *e = s + sz; |
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 requests | |
import itertools | |
import time | |
from tqdm.auto import tqdm | |
ALL_GYM_LIST_URL = 'https://codeforces.com/api/contest.list?gym=true' | |
CONTEST_STATUS_URL_TEMPLATE = 'https://codeforces.com/api/contest.status?contestId={}&from={}&count={}&handle={}' | |
USERS_LIST = ['tourist', 'andrewzta', 'VArtem'] |
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
#include <bits/stdc++.h> | |
using namespace std; | |
using llf = long double; | |
using pdd = complex<llf>; | |
static constexpr llf EPS = 1e-8; | |
static constexpr llf pi = M_PI; | |
#define X real() | |
#define Y imag() |
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> | |
<html lang="en"> | |
<head> | |
<title>Chart</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.6.0/chart.min.js"></script> | |
<style> | |
body { | |
margin: 0; | |
} | |
#main { |
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
// problem link: https://codeforces.com/gym/102798/problem/I | |
#include <bits/stdc++.h> | |
using namespace std; | |
template <uint64_t x, size_t n> | |
struct Pow { | |
uint64_t v; | |
constexpr Pow(): v(1) { | |
for (size_t i = 0; i < n; ++i) v *= x; | |
} |
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
[--------- 1d unique_consecutive ---------] | |
| dim=0 | dim=None | |
1 threads: -------------------------------- | |
N = 10000 | 46.6 | 45.6 | |
N = 50000 | 106.7 | 105.9 | |
N = 100000 | 177.6 | 177.0 | |
N = 500000 | 919.5 | 907.0 | |
N = 1000000 | 2199.6 | 2198.6 | |
N = 5000000 | 39679.2 | 39668.5 | |
N = 10000000 | 79028.6 | 79015.1 |
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 | |
import concurrent.futures | |
from urllib.parse import urljoin | |
from bs4 import BeautifulSoup | |
import requests | |
PROXY = {} | |
SEASON = '2022/spring' |
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> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Example</title> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.1/clipboard.min.js'></script> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/components/prism-core.min.js'></script> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/components/prism-markup-templating.min.js'></script> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/components/prism-clike.min.js'></script> |
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
/* | |
* Compiled with: | |
* g++ png2webp.cpp -lwebp -lpng -lpthread -std=c++17 -O3 -march=native | |
* using libwebp 0.6.1 here | |
*/ | |
/* | |
* This is a modification from the source code of cwebp and libwebp, the | |
* original License is stated below. | |
*/ |
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 telnetlib | |
import subprocess | |
import time | |
class TelnetConnection: | |
def __init__(self, host, port): | |
self.host = host | |
self.port = port | |
def telnet(self): |
NewerOlder