동백역 하얀집
맛있고, 예쁘고 다 좋은데
문을 잘 안 연다.
인스타그램 공지를 확인하고 한번쯤 가볼만한 곳
동백역 하얀집
맛있고, 예쁘고 다 좋은데
문을 잘 안 연다.
인스타그램 공지를 확인하고 한번쯤 가볼만한 곳
엠이 알려준 리북집
진짜 맛있다.
오빠 언제 오나
동백역 하얀집 화과자 (1) | 2017.07.13 |
---|---|
리북집 족발 맛있다 (0) | 2017.07.13 |
새 카메라 (2) | 2017.02.10 |
상추랑 깻잎 1 (6) | 2015.05.12 |
서울 루덴스 (1) | 2013.12.15 |
삼겹살 친구 데려왔다
단순연결리스트 [Singly linked list]
#includestruct Node { int data; struct Node* next; }; void PrintNodes(struct Node* root) { Node* temp = root; printf("--------------NODES--------------\n"); int i = -1; while( temp != NULL){ if(i == -1) printf("root"); else { printf("pos"); printf("%d", i); } printf(": "); printf("%d", (int)temp); printf(" / data: "); printf("%d", temp->data); printf(" / next: "); printf("%d", (int)temp->next); printf("\n"); temp = temp->next; i++; }printf("---------------------------------\n"); } Node* CreateNode(Node* newnew) { newnew = new Node; newnew->data = 0; newnew->next = NULL; return newnew; } int GetNodeCount(Node* root) { int count = 0; Node* temp = root; while( temp->next != NULL ) { count++; temp = temp->next; } return count; } Node* GetNode(Node* root, int pos) { int count = 0; Node* get = root; while( get->next != NULL) { get = get->next; if( count == pos ) break; count++; } return get; } int Insert(struct Node* root, int position) { Node* NewNode = NULL; NewNode = CreateNode(NewNode); Node* prev = NULL; prev = GetNode(root, position-1); if(GetNodeCount(root) < position) return 0; //없는거 못 만든다. if( position == GetNodeCount(root) ) { prev->next = NewNode; return 1; } else { Node* after = NULL; after = GetNode(root, position); if( position==0 ) root->next = NewNode; else prev->next = NewNode; NewNode->next = after; return 1; } return 0; } int Delete(struct Node* root, int position) { int a = GetNodeCount(root); if(GetNodeCount(root) <= position) return 0; //없는거 못 지운다. else { Node* deletedNode = NULL; deletedNode = GetNode(root, position); Node* afterDeletedNode = NULL; afterDeletedNode = GetNode(root, position+1); if(position == 0) root->next = afterDeletedNode; //첫번째꺼 지우면 root에 나머지 연결 else { Node* prevDeletedNode = NULL; prevDeletedNode = GetNode(root, position-1); int a = GetNodeCount(root); if(position == GetNodeCount(root)-1) prevDeletedNode->next = NULL; else prevDeletedNode->next = afterDeletedNode; } delete deletedNode; return 1; } } int SetData(struct Node* root, int position, int data) { if( root->next != NULL && GetNodeCount(root) > position ) { GetNode(root,position)->data = data; return 1; } else return 0; } int GetData(struct Node* root, int position, int* data) { if( root->next != NULL && GetNodeCount(root) > position ) { *data = GetNode(root,position)->data; return 1; } else return 0; } void main() { Node* root = NULL; root = CreateNode(root); int data = 0; /* position==0 created */ printf("%d ", Insert(root,0)); printf(" inserted \n"); /* position==0 set to 7 */ printf("%d ", SetData(root,0,7)); printf(" set \n"); /* position==1 created */ printf("%d ", Insert(root,1)); printf(" inserted \n"); /* position==0 added */ printf("%d ", Insert(root,0)); printf(" inserted \n"); /* --> 원래 있던 노드 밀어냄 */ /* position==3 created */ printf("%d ", Insert(root,3)); printf(" inserted \n"); /* position==3 deleted */ printf("%d ", Delete(root,3)); printf(" inserted \n"); /* position==5 created */ printf("%d ", Delete(root,5)); printf(" inserted \n"); /* --> 앞에 빈 노드 있으므로 생성 못함 */ /* position==3 created */ printf("%d ", Insert(root,3)); printf(" inserted \n"); /* position==2 set to 5 */ printf("%d ", SetData(root,2,5)); printf(" set \n"); /* position==3 set to 6 */ printf("%d ", SetData(root,3,6)); printf(" set \n"); /* position==7 get */ GetData(root, 7, &data); printf("%d ", data); printf(" got \n"); /* --> 빈 노드이므로 데이터 얻지 못함 */ /* position==2 get */ GetData(root, 2, &data); printf("%d ", data); printf(" got \n"); PrintNodes(root); printf("total nodes: "); printf("%d ", GetNodeCount(root)); printf("\n\n"); delete root; }
Beijing
2014/02/03 - 2014/02/25
2014 제주도 경미식당 맛나식당 전복밥 (0) | 2017.07.13 |
---|---|
2014 제주도 신라호텔 (2) | 2017.07.13 |
북경01 (0) | 2014.02.05 |
[2013스페인] 론다 거리 (0) | 2013.08.29 |
[2013스페인] 론다 선경이 (0) | 2013.08.29 |
선배가 그려준 지도 한장 들고
북경, 베이징에 도착했다.
10호선 하늘색라인
첫 날은 전 출장자들과 함께
춘절이라 그나마 한가하지만 요새 인기라는 녹차 식당에 갔다.
싼 가격의 메뉴가 엄청 많아서 골라먹는 재미로 유명한가부다.
요리 이름이 한글로도 적혀있다.
쇠고기의 유혹 닭의 유혹, 유혹 시리즈도 있고
오번역 된 것들도 있고 재밌다 흐흐
(돼지고기 바비큐)
짭짤하지만 제일 한국 음식과 비슷하다.
(메뉴 이름 기억안남)
간장궁중떡볶이 맛 떡과 버섯
(아이스겨자)
샐러리(?)같은 얼음에 꽂힌 채소를 간장+겨자많이 소스에 찍어먹는데,
훔 의외로 괜찮다.
(닭 ??)
훔
(매콤한 새우)
훔
(두부연어샐러드)
두부연어샐러드를 왜 간장+겨자많이 소스에..으앗
중독된다며 계속 드시는 분도 계셨다.
(닭 바비큐)
짭짤하고 맥주 안주 맛 ㅎㅎ
(파초나무 버섯요리)
버섯은 맛있었고 파초나무인지 나물은 움..시키지 말자!
(누룽지탕)
시키지 말자!
(개구리)
비주얼에 압박당함.
(우유빙수)
장난감과자 맛
히히 노트북을 이고다녀 온몸이 피곤했고
영어와 카드는 공항 호텔 말고는 통하지 않았고
춘절기간이라 한산하지만 어디선가 여기저기서 계속 폭죽을 터뜨리는 나라가 신기했다.
2014 제주도 신라호텔 (2) | 2017.07.13 |
---|---|
북경 (0) | 2014.03.12 |
[2013스페인] 론다 거리 (0) | 2013.08.29 |
[2013스페인] 론다 선경이 (0) | 2013.08.29 |
[2013스페인] 마드리드 (3) | 2013.08.18 |