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 <iostream> | |
#include <cstring> | |
using namespace std; | |
const int INF = 0x3c3c3c3c; | |
int n, w[16][16], dp[1<<16][16]; | |
int main() { | |
scanf("%d",&n); | |
for(int i=0; i<n; i++) | |
for(int j=0; j<n; j++) |
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 <iostream> | |
using namespace std; | |
int n, m, k; | |
int c[31][31]; // Combination nCk | |
int main() { | |
for(int i=0; i<=30; i++) { | |
c[i][0] = 1; | |
for(int j=1; j<=i; j++) | |
c[i][j] = c[i-1][j] + c[i-1][j-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
#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자리 이하의 감소하는 수 개수 |
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 <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 <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 <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 "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
#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
#version 330 core | |
out vec4 FragColor; | |
struct Material { | |
sampler2D diffuse; | |
sampler2D specular; | |
float shininess; | |
}; | |
struct DirLight { |
OlderNewer