BOJ

알고리즘 문제 풀이/1DP_과제(~180615)

180301_1931_회의실 배정

//https://www.acmicpc.net/problem/1931 #include #include #include using namespace std;#define lli long long int int main() { int n; cin >> n; vector arr; for(int i=0; i> a >> b; arr.push_back(pair(b,a)); } sort(arr.begin(), arr.end()); int cnt=1; int end=arr[0].first; for(int i=1; i

알고리즘 문제 풀이/1DP_과제(~180615)

180301_1920_수 찾기

//https://www.acmicpc.net/problem/1920 #include #include using namespace std;int A[100001]; bool find_x(int x,int start, int end){ int m; while(end-start>=0){ m=(end+start)/2; if(A[m]==x) return true; if(A[m]

알고리즘 문제 풀이/1DP_과제(~180615)

180227_1008_A/B

//https://www.acmicpc.net/problem/1008 #include using namespace std; int main(){ double A, B; cin >> A >> B; cout.precision(10); cout

알고리즘 문제 풀이/1DP_과제(~180615)

180217_2660_회장뽑기

//https://www.acmicpc.net/problem/2660 #include #include using namespace std;bool frd[51][51];bool visit[51];int score[51];int list[51];int n;int mn=51*51;int num; void input();int bfs(int people);void find();void init(); int main(){ input(); for(int i=1; i> n; int a=1, b=1; while(a!=-1 && b!=-1) { cin >> a >> b; frd[a][b]=frd[b][a]=1; }} int bfs(int people){ queue q; int tmp_cnt=1; int scr=-1; ..

bong sue
'BOJ' 태그의 글 목록 (9 Page)