Skip to content

Instantly share code, notes, and snippets.

View Bloofer's full-sized avatar

Joonmo Yang Bloofer

View GitHub Profile
@Bloofer
Bloofer / immigration.cpp
Created April 13, 2021 14:30
immigration
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int N, M; // N:심사대, M:친구들
vector<long long> T;
int main(){
ios_base::sync_with_stdio(0);
@Bloofer
Bloofer / immigration.cpp
Created April 13, 2021 02:26
immigration
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int N, M;
vector<int> T;
int main(){
ios_base::sync_with_stdio(0);
#include <iostream>
#include <string>
#include <queue>
#include <map>
#include <algorithm>
using namespace std;
map<string, int> myMap;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
#include <iostream>
#include <algorithm>
#include <queue>
#include <vector>
using namespace std;
int visit[3][3][3][3] = {0, }; // x/y:0의 위치와 i/j:판의 상태, 엔트리: 해당배열내 값
vector<vector<int>> status[3][3];
struct entry{
int x,y,move;
@Bloofer
Bloofer / keys.cpp
Created March 24, 2021 15:09
keys.cpp
#include <iostream>
#include <queue>
using namespace std;
char arr[101][101];
bool visit[101][101];
bool keys[26] = {0, };
bool keyFound = true;
bool docFound[101][101];
int ans = 0;
@Bloofer
Bloofer / robot.cpp
Created March 23, 2021 10:25
robot
#include <iostream>
#include <queue>
using namespace std;
int M, N;
int arr[100][100];
bool chk[100][100][4] = {0, };
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0}; // 동, 남, 서, 북
int dirMap[5] = {0, 0, 2, 1, 3};
@Bloofer
Bloofer / fireball.cpp
Created March 11, 2021 10:53
fireball
#include <iostream>
#include <vector>
using namespace std;
int N, M, K;
// 각 방향 정보에 따른 좌표이동방향
int dx[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
vector<int> arr[50][50];
typedef struct{
@Bloofer
Bloofer / conveyor.cpp
Created March 8, 2021 15:47
conveyor
#include <iostream>
#include <algorithm>
using namespace std;
int N, K;
int conveyorDurable[200]; // 각 엔트리: 컨베이어 벨트 내구도
bool conveyorRobots[200]; // 각 엔트리: 로봇의 존재 유무
int main(){
int cnt = 0; // 내구도 0인 칸의 갯수
@Bloofer
Bloofer / chat.cpp
Created February 26, 2021 15:58
chat
#include <string>
#include <iostream>
#include <sstream>
#include <vector>
#include <map>
using namespace std;
map<string, string> aliasMap;
vector<string> solution(vector<string> record) {
@Bloofer
Bloofer / tuple.cpp
Created February 21, 2021 03:15
tuple
#include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <algorithm>
using namespace std;
bool check[100001] = {0, };
bool cmp(vector<int> &v1, vector<int> &v2){ return v1.size() < v2.size(); }