Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
進捗ダメです

charter monhime

:octocat:
進捗ダメです
View GitHub Profile
View ABC215_D.py
import sys, math, copy
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
# sys.setrecursionlimit(1000000)
def input(): return sys.stdin.readline().rstrip()
class Sieve: #区間[2,n]の値の素因数分解 O(nloglogn+logn)
View ABC215_C.py
import sys, math, copy
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from typing import Container
# sys.setrecursionlimit(1000000)
def input(): return sys.stdin.readline().rstrip()
View ABC215_B.py
import sys, math, copy
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
# sys.setrecursionlimit(1000000)
def input(): return sys.stdin.readline().rstrip()
def main():
View ABC215_A.py
import sys, math, copy
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
# sys.setrecursionlimit(1000000)
def input(): return sys.stdin.readline().rstrip()
def main():
View ABC214_C.py
import sys
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
import math # math.inf
import copy
def input(): return sys.stdin.readline().rstrip()
View ABC214_B.py
import sys
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
import math # math.inf
def input(): return sys.stdin.readline().rstrip()
def main():
View ABC214_A.py
import sys
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
import math # math.inf
def input(): return sys.stdin.readline().rstrip()
def main():
@monhime
monhime / accum_string.cpp
Last active Jan 18, 2021
vector<string>を全結合
View accum_string.cpp
#include <iostream>
#include <vector>
#include <numeric>
#include <string>
using namespace std;
int main(){
vector<string> A = {"I", "have", "a", "pen."};
@monhime
monhime / accum_pair.cpp
Last active Jan 18, 2021
pair型のベクタのfirst, secondそれぞれの和
View accum_pair.cpp
#include <iostream>
#include <vector>
#include <numeric>
using namespace std;
int main(){
vector<int> A = {1, 2, 3, 3, 2};
int sum = accumulate(A.begin(), A.end(), 0, [](int init, int v){ return init + v; });
cout << sum << "\n";
@monhime
monhime / ABC187_D.py
Created Jan 3, 2021
ABC187 D問題 解答
View ABC187_D.py
import sys
def input(): return sys.stdin.readline().rstrip()
from bisect import bisect_left,bisect
from itertools import accumulate
def main():
n = int(input())
AB = [tuple(map(int,input().split())) for i in range(n)]
C = [0]*n
sum_a = 0
for i, (a, b) in enumerate(AB):