목록C++ (33)
Deep Learning study
#include using namespace std; int main(){ ios_base::sync_with_stdio(false); int t; cin >> t; for(int T = 1 ; T > m >> c >> i; char C[100010] = {0,}, I[5000] = {0,}; cin >> C >> I; int point = 0, input_p = 0,cnt = 0; char mem[100010] = {0,}; int brack[100010] = {0,},min_loop_idx = 0, max_loop_idx = 0; stack bracket; for(int i=0 ;i< c ; i++){ if(C[i] == '[') bracket.push(i); else if(C[i]==']'){ br..
#include using namespace std; int A[50][50],N,M,K,ANS = 1e9; vector order; struct{ int r,c,s; }rot[6]; void go(int r, int c, int s){ if(!s) return; int sr = r - s, sc = c - s, er = r + s, ec = c + s; int x = A[sr][sc], y = A[sr][ec], z = A[er][ec], w = A[er][sc]; for(int i = sr ; i sc ; i--) if(i==sc+1) A[sr..
#include using namespace std; int N, pop[12],visit[12],divi[12],ANS = 1e9; vector G; void dfs(int cur, int division){ visit[cur] = 1; for(int next : G[cur]) if(!visit[next] && divi[next] == division) dfs(next, division); } void update(){ int div0 = -1, div1 = -1; for(int i=0 ;i pop[i]; for(int i=0; i> k; for(;k>0;k--){ int p; cin >> p; G[i].push_back(p-1); } } div(0); cout
#include using namespace std; #define pb push_back bool bracket[30]; vector oper; vector num; vector new_num; vector new_oper; int ANS = -1e9; int cal(int a , int b , char oper){ if(oper == '+') return a + b; else if(oper == '-') return a - b; else return a * b; } int fin_cal(int N){ new_num.clear(); new_oper.clear(); for(int i=0 ;i> N; cin >> arr; for(int i=0 ;i
#include using namespace std; #define pb push_back int game[55][10]; int where[4]; int score,inni = 1; int main(){ cin.tie(NULL); ios_base::sync_with_stdio(false); int N; cin >> N; for(int i=1 ;i game[i][j]; vector t(8); for(int i=2 ; i
#include using namespace std; int paper[11][11]; int cnt[6] = {0,}; int ans = 1e9; void update(int size, int x, int y, int num){ for(int i = x ; i 10) return false; for(int i = x ; i
#include using namespace std; int main(){ ios_base::sync_with_stdio(false); int N, dp[20][20][3] = {0,}, r[20][20]; cin >> N; for(int i=1 ; i r[i][j]; dp[1][2][0] = 1; for(int i = 1 ; i
#include #include using namespace std; #define x first #define y second #define INF 1e9 #define WALL 100 int g[10][10]; pair r,b,h; int n,m; bool rdrop = false; bool bdrop = false; void move(pair *a,pair *b,int opt){ int &rx = (*a).x, &ry = (*a).y; int &bx = (*b).x, &by = (*b).y; if(opt == 0){//왼쪽 for(int i=0 ; i m; char c; for(int i=0 ;i c; if(c == '#') g[i][j] = WALL; else if(c == 'O') h.x = i..