Skip to content

Instantly share code, notes, and snippets.

View AnuarTB's full-sized avatar
:octocat:

Anuar Talipov AnuarTB

:octocat:
  • Google
  • South Korea
View GitHub Profile
@AnuarTB
AnuarTB / sieve_eratosthenes.py
Created November 29, 2021 13:54
Manim animation of Sieve of Eratosthenes
from manim import *
class SieveEratosthenes(Scene):
def construct(self):
text = Text("Sieve of Eratosthenes").scale(1.5)
self.play(Write(text))
self.wait(2)
self.play(text.animate.shift(3 * UP).scale(0.5))
W = 7
#include <climits>
class Solution {
public:
int myAtoi(string str) {
long long num = 0;
int mult = 1;
int it = 0;
while(it < (int)str.length() && str[it] == ' ') it++;
#include <bits/stdc++.h>
#define F first
#define S second
//#define debug
using namespace std;
const int MXN = 1e5 + 10;
const int INF = 1e9 + 7;
@AnuarTB
AnuarTB / solution.cpp
Last active October 7, 2019 01:10
My solution to QTREE3 (spoj.com)
#include <bits/stdc++.h>
//#define file_stream
//#define debug
using namespace std;
const int MXN = 1e5 + 10;
vector <int> g[MXN], order, tmp[MXN];
@AnuarTB
AnuarTB / HLD.cpp
Last active October 7, 2019 01:10
My version of heavy-light decomposition (not ready!)
/*
HLD by Anuar Talipov
Data of upload: 04.03.2014
*/
#include <bits/stdc++.h>
#define file_stream
using namespace std;