Skip to content

Instantly share code, notes, and snippets.

@jwon0615
jwon0615 / 1402.cpp
Created March 26, 2018 08:39
1_codeup_연습문제_동적할당
#include <stdio.h>
#include <stdlib.h>
int main() {
int i,n;
scanf("%d",&n);
//int *p = (int *)malloc(sizeof(int));
int *p = (int *)malloc(sizeof(int)*n);
for (i=0; i<n; i++) scanf("%d",p+i);
for (i=(n-1); i>=0; i--) printf("%d ",*(p+i));
@jwon0615
jwon0615 / dominofilling9.cpp
Created May 3, 2018 03:20
블럭채우기9번 문제
//
// dominofilling9.cpp
// 블럭채우기 9
//
// Created by 박지원 on 2018. 5. 2..
// Copyright © 2018년 Sejong Academy of Science and Arts. All rights reserved.
//
#include <stdio.h>
#define m 100007
#include <stdio.h>
#include <queue>
using namespace std;
queue<int> q;
int n,sum,d;
void dfs(int k){
#include <stdio.h>
int n,sum;
void dfs(int k, int p1, int p2){
if(k>n) return;
if(k==n) {
sum++; return;
}
if((p1==3) or (p2==3)){
#include <stdio.h>
#include <queue>
int arr[201][201],chk[201];
std::queue<int> q;
int main(void) {
int i, j, v, n, cnt=0;
scanf("%d %d",&v,&n);
for(i=0;i<n;i++) {
int a,b;
//가공자본 구하기
//자본금(대변) 100억 A회사에서 80억을 출자해 B회사 설립의 자본금(대변)으로 기록되었다.
//B회사 주식 80억은 A회사의 자산(차변)으로 기록된다.
//여전히 A회사의 자본금(대변)은 100억원이다.
//A회사와 B회사의 자본 총합은 180억원이되므로
//이때 80억은 가공자본이라 한다.
//기업의 지배 구조가 방향 그래프로 주어졌을때, 가공자본의 규모를 계산하시오.
//http://mydb.tistory.com/222
#include <stdio.h>
@jwon0615
jwon0615 / SAmurai.cpp
Created June 19, 2018 04:26
사무라이
#include <stdio.h>
int G[100][100];
bool chk[100][100];
int n, m, cnt;
void dfs(int x, int y){
if(x<0||x>=n||y<0||y>=m) return;
if(chk[x][y]==true) return;
chk[x][y]=true;
@jwon0615
jwon0615 / capitalism_ho.cpp
Created June 19, 2018 04:38
가공자본
//가공자본 구하기
//자본금(대변) 100억 A회사에서 80억을 출자해 B회사 설립의 자본금(대변)으로 기록되었다.
//B회사 주식 80억은 A회사의 자산(차변)으로 기록된다.
//여전히 A회사의 자본금(대변)은 100억원이다.
//A회사와 B회사의 자본 총합은 180억원이되므로
//이때 80억은 가공자본이라 한다.
//기업의 지배 구조가 방향 그래프로 주어졌을때, 가공자본의 규모를 계산하시오.
//http://mydb.tistory.com/222 (순환출자 예시-롯데)
#include <stdio.h>
//파급효과
//
//기업의 수 n이 주어지고 자본이 이동하는 간선 m이 주어진다
//n+1줄까지 자본의 크기(long long int)가 주어진다
//이후 m줄 동안 a번째 기업이 b번째 기업에 투자하는 비율c가 주어진다.
//마지막 줄엔 하나의 기업을 선택한다
//한 기업을 선택했을때,이 기업으로부터 야기된 유동자본의 규모를 계산하시오.
//
//http://mydb.tistory.com/222 (순환출자 예시-롯데)
@jwon0615
jwon0615 / still_alive.ino
Last active December 3, 2018 11:55
2207 박지원 공학 프로젝트 코드
/*************************************************
* Public Constants
*************************************************/
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41