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
// max cht (integer type query) | |
// Usage: | |
// Insert: cht.insert({a,b}) | |
// Query: cht.query(x) | |
struct CHT { | |
using ll=__int128; | |
using Line=pair<ll,ll>; | |
using Point=pair<ll,Line>; | |
const ll INF=1e15; | |
set<Line> line_set; |
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
/* 2016.01.20 | |
Chess AI by junodeveloper | |
Notes: | |
- Promotion is not implemented. | |
- Only used minimax algorithm (not alpha-beta prunning). | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string> |
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
#version 330 core | |
out vec4 FragColor; | |
struct Material { | |
sampler2D diffuse; | |
sampler2D specular; | |
float shininess; | |
}; | |
struct DirLight { |
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
#version 330 core | |
out vec4 FragColor; | |
in vec3 ourColor; | |
void main() | |
{ | |
FragColor = vec4(ourColor, 1.0f); | |
} |
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 "opencv2/opencv.hpp" | |
#include <iostream> | |
#include <string> | |
using namespace cv; | |
using namespace std; | |
int main(int, char**) | |
{ | |
cv::String path("*.png"); |
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> | |
#define sz(x) ((int)x.size()) | |
#define all(x) (x).begin(), (x).end() | |
using namespace std; | |
typedef long long ll; | |
typedef long double ld; | |
int n, A[100010], B[100010], P[100010][2]; | |
ll s[200010]; | |
vector<pair<int,int> > v; | |
int 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
#include <bits/stdc++.h> | |
using namespace std; | |
struct line { | |
long long a, b; | |
}; | |
vector<line> S; | |
double cross(line L1, line L2) { | |
if(L1.a == L2.a) return L1.b <= L2.b ? -1e18 : 1e18; | |
return (double)(L1.b - L2.b) / (L2.a - L1.a); |
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 <iostream> | |
#include <cstdio> | |
#include <algorithm> | |
#include <queue> | |
#include <utility> | |
using namespace std; | |
queue< pair < int , int > > q; | |
int memo[100001][4] , A , B; |
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 <iostream> | |
#include <cstdio> | |
#include <algorithm> | |
using namespace std; | |
int min( int a , int b) | |
{ | |
return a>b ? b : a; | |
} |
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<cstdio> | |
#include<algorithm> | |
using namespace std; | |
int a[10],c[11][11],n; // c : 조합 | |
int main() { | |
scanf("%d",&n); | |
for(int i=0;i<=10;i++) c[i][0]=c[i][i]=1; | |
for(int i=1;i<=10;i++) for(int j=1;j<i;j++) c[i][j]=c[i-1][j]+c[i-1][j-1]; | |
if(n<1023) { | |
int k=1,s=0; // k : 자릿수, s : k자리 이하의 감소하는 수 개수 |
NewerOlder