This file contains hidden or 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
/* 1등 ikatanic 코드 참고 함 */ | |
#include <iostream> | |
#include <string> | |
#include <algorithm> | |
#include <fstream> | |
using namespace std; | |
#define FOR(i, N) for(int i = 0; i < N; i++) | |
#define ll long long |
This file contains hidden or 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
/* 1등 nika 코드 참고함 */ | |
#include <iostream> | |
#include <cstdio> | |
#include <vector> | |
#include <algorithm> | |
#include <queue> | |
#include <sstream> | |
using namespace std; | |
#define FOR(i,N) for(int i=1; i<=N; i++) |
This file contains hidden or 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 <vector> | |
using namespace std; | |
#define MAXN 1000100 | |
int N, q[MAXN], p[MAXN], visited[MAXN]; | |
vector<vector<int> > cycle[MAXN]; | |
void input(){ | |
scanf("%d", &N); |
This file contains hidden or 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 <cmath> | |
using namespace std; | |
#define EPSILON 0.0001 | |
/* 먼저 벡터를 표현하는 구조체를 정의합니다. */ | |
struct vector2{ | |
double x, y; | |
//생성자 | |
vector2(){} |
This file contains hidden or 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> | |
#define MAX_SIZE 1000 | |
#define MAX_NUM 10000 | |
int main(){ | |
int N, A[MAX_SIZE+1], B[MAX_SIZE+1], count[MAX_NUM+1], countSum[MAX_NUM+1]; | |
//수열의 길이 N은 MAX_SIZE이하여야합니다. | |
scanf("%d", &N); |
This file contains hidden or 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 <vector> | |
#include <algorithm> | |
using namespace std; | |
#define MAXN 100100 | |
vector<vector<int> > tree; |
This file contains hidden or 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 <vector> | |
#include <algorithm> | |
#include <map> | |
using namespace std; | |
#define MAXN 200100 | |
This file contains hidden or 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 <map> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
#define MAXN 3100 | |
#define ll long long | |
typedef struct Point{ |
This file contains hidden or 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; | |
#define MAXN 100100 | |
#define INF 987654321 | |
int p=1; |
This file contains hidden or 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> | |
using namespace std; | |
#define MAXN 100100 | |
int IndexTree[4 * MAXN]; | |
int N, M; | |