Skip to content

Instantly share code, notes, and snippets.

@zych1751
zych1751 / SplayTreeWithLazyPropagation.cpp
Last active July 10, 2018 21:34
SplayTreeWithLazyPropagation.cpp
#include <bits/stdc++.h>
using namespace std;
// 각 노드별로 subtree의 크기, 구간 합 정보를 가지는 SplayTree를 LazyPropagation을 이용해 구현하였습니다.
// 인덱스는 0-base입니다.
//
// lazy prorpagation을 단순 합이 아닌 다른 구현을 할 경우에는
// lazy 변수와 base변수의 타입과 값, lazy 변수에 할당하는 부분, push_down함수만 바꾸어 주면 됩니다.
@zych1751
zych1751 / 1166.cpp
Created November 15, 2017 15:28
1166.cpp
#include<bits/stdc++.h>
using namespace std;
int n, l, w, h;
bool check(double A)
{
long long cnt = (long long)(l/A) * (long long)(w/A) * (long long)(h/A);
return cnt >= n;
@zych1751
zych1751 / 2805.cpp
Created November 15, 2017 14:38
2805.cpp
#include<bits/stdc++.h>
using namespace std;
int n, m;
int h[1000000];
bool check(int H)
{
long long sum = 0;
@zych1751
zych1751 / 1920.cpp
Created November 15, 2017 04:57
1920.cpp
#include<bits/stdc++.h>
using namespace std;
int n, m;
int arr[100000];
bool check(int obj)
{
int l = 0, r = n; // arr[l] <= obj, arr[r] > obj
@zych1751
zych1751 / 11660.cpp
Created November 9, 2017 08:20
11660.cpp
#include<bits/stdc++.h>
using namespace std;
int n, m;
int arr[1025][1025];
int psum[1025][1025];
int main()
{
@zych1751
zych1751 / 2749.cpp
Created November 9, 2017 07:49
2749.cpp
#include<bits/stdc++.h>
using namespace std;
const int MOD = 1000000;
struct matrix
{
long long arr[2][2];
@zych1751
zych1751 / 14894 data
Last active October 28, 2017 11:32
14894 data
This file has been truncated, but you can view the full file.
500000
499999 499997 499995 499993 499991 499989 499987 499985 499983 499981 499979 499977 499975 499973 499971 499969 499967 499965 499963 499961 499959 499957 499955 499953 499951 499949 499947 499945 499943 499941 499939 499937 499935 499933 499931 499929 499927 499925 499923 499921 499919 499917 499915 499913 499911 499909 499907 499905 499903 499901 499899 499897 499895 499893 499891 499889 499887 499885 499883 499881 499879 499877 499875 499873 499871 499869 499867 499865 499863 499861 499859 499857 499855 499853 499851 499849 499847 499845 499843 499841 499839 499837 499835 499833 499831 499829 499827 499825 499823 499821 499819 499817 499815 499813 499811 499809 499807 499805 499803 499801 499799 499797 499795 499793 499791 499789 499787 499785 499783 499781 499779 499777 499775 499773 499771 499769 499767 499765 499763 499761 499759 499757 499755 499753 499751 499749 499747 499745 499743 499741 499739 499737 499735 499733 499731 499729 499727 499725 499723 499721 499719 499717 499715 499713 499711 49
@zych1751
zych1751 / 11660.cpp
Created October 8, 2017 12:07
acmicpc.net/11660
#include<bits/stdc++.h>
using namespace std;
int n, m;
int arr[1025][1025];
int psum[1025][1025];
int main()
{
@zych1751
zych1751 / 11659.cpp
Created October 8, 2017 11:32
acmicpc.net/11659
#include<bits/stdc++.h>
using namespace std;
int n, m;
int arr[100001];
int psum[100001];
int main()
{
@zych1751
zych1751 / 9251.cpp
Created October 8, 2017 10:49
acmicpc.net/9251
#include<bits/stdc++.h>
using namespace std;
char A[1001], B[1001];
int dp[1001][1001];
int main()
{
scanf("%s", A+1);