티스토리 툴바


2010 43rd Annual IEEE/ACM International Synposium on Microarchitecture
Jeffrey stuecheli et al.

Basic Idea
Read / Write는 Burst한 성향을 가지고 있다.read/write들이 Refresh와 충돌이 일어날 가능성을 줄이기 위해서 read/write가 일어나는 시점이라면 refresh를 뒤로 미뤘다가 read/write가 안일어나는 시점에 refresh를 한다는게 이 paper의 idea이다.

tRFC = 550ns , tREFI = 3900ns 으로 셋팅해서 bandwidth overhead가 14.10%
latency overhead가 38.775ns 라고 가정을 해놓고 실험을 한다.
tRFC 를 550ns으로 잡는 부분이 약간 미심쩍기도 하며 tREFI를 7800ns가 아닌 3900ns를 잡아 놓고 refresh overhead를 부각시켜 실험을 진행한 부분도 좀 그렇다.
Posted by kinax
아래의 커맨드로 make 시 각종 기록을 파일로 남길 수 있다.
# make 2>&1 | tee [파일명]

기본적으로 리눅스는 3가지의 파일 식별자가 존재한다. 각각 표준 입력(stdin), 표준 출력(stdout), 표준 에러(stderr)를 뜻한다.

보통 터미널상에서 make를 하면 출력되는 메시지들중 오류메시지들은 stderr로 출력을 하게되고 stdout은 make안에 echo로 설정된 부분을 출력하게
된다.

리눅스에서 'tee' 명령어는 표준 입력을 읽어서(read) 표준 출력과 파일로 쓰기(write) 위한 명령어이다.

즉 'make 2>&1 | tee [파일명]'는 make 시 표준 에러를 표준 출력에 보내고 이와 동시에 표준 출력 시키고 [파일명]에 기록하라는 뜻이다.

출처 http://tasia.tistory.com/99
Posted by kinax

253 CUBE

ACM 2008/02/19 02:11
vertical roatation , horizon rotation 의 함정에 빠져서 한참을 헤매였다.
돌파구는 x,y,z rotation 이였다!
Your best accepted try
Ranking Submission Run Time Language Submission Date
22         6240579         0.000        ANSI C  2008-02-18 16:38:24
 

 Cube painting 

We have a machine for painting cubes. It is supplied with three different colors: blue, red and green. Each face of the cube gets one of these colors. The cube's faces are numbered as in Figure 1.

picture21

Figure 1.

Since a cube has 6 faces, our machine can paint a face-numbered cube in tex2html_wrap_inline126 different ways. When ignoring the face-numbers, the number of different paintings is much less, because a cube can be rotated. See example below. We denote a painted cube by a string of 6 characters, where each character is a b, r, or g. The tex2html_wrap_inline128 character ( tex2html_wrap_inline130 ) from the left gives the color of face i. For example, Figure 2 is a picture of rbgggr and Figure 3 corresponds to rggbgr. Notice that both cubes are painted in the same way: by rotating it around the vertical axis by 90 tex2html_wrap_inline134 , the one changes into the other.

tex2html_wrap138 tex2html_wrap140

Input

The input of your program is a textfile that ends with the standard end-of-file marker. Each line is a string of 12 characters. The first 6 characters of this string are the representation of a painted cube, the remaining 6 characters give you the representation of another cube. Your program determines whether these two cubes are painted in the same way, that is, whether by any combination of rotations one can be turned into the other. (Reflections are not allowed.)

Output

The output is a file of boolean. For each line of input, output contains TRUE if the second half can be obtained from the first half by rotation as describes above, FALSE otherwise.

Sample Input

rbgggrrggbgr
rrrbbbrrbbbr
rbgrbgrrrrrg

Sample Output

TRUE
FALSE
FALSE
Posted by kinax

454 Anagrams

ACM 2008/02/19 02:09
Ranking Submission Run Time Language Submission Date
286          5956948       0.020          C++     2007-10-04 11:39:33


 Anagrams 

An anagram is a word or phrase formed by rearranging the letters of another word or phrase. For example, ``carthorse" is an anagram of ``orchestra". Blanks within a phrase are ignored in forming anagrams. Thus, ``orchestra" and ``horse cart" are also anagrams.

Write a program that reads a list of phrases and prints all pairs of anagrams occurring in the list.

Input

The input file will contain a single integer at the first line of the input, indicate the number of test case you need to test followed by a blank line. Each test case will consist of from 1 to 100 lines. A completely empty or blank line signals the end of a test case. Each line constitutes one phrase.

Output

Some number of lines (including possibly 0 if there are no anagrams in the list), each line containing two anagrammatic phrases separated by `='.

Each anagram pair should be printed exactly once, and the order of the two phrases within a printed pair must be lexicographic, as well as the first phrases and the second ones in case some first are equal.

Two consecutive output for two consecutive input is separated by a single blank line.

Sample Input

1

carthorse
horse
horse cart
i do not know u
ok i now donut
orchestra

Sample Output

carthorse = horse cart
carthorse = orchestra
horse cart = orchestra
i do not know u = ok i now donut
Posted by kinax
Presentation Error가 난다.. 왜 그런지 도저히 알수가 ..

The Never Ending Towers of Hanoi

The Problem

In 1883, Edward Lucas invented, or perhaps reinvented, one of the most popular puzzles of all times - the Tower of Hanoi, as he called it - which is still used today in many computer science textbooks to demonstrate how to write a recursive algorithm or program. First of all, we will make a list of the rules of the puzzle:

· There are three pegs: A, B and C.
· There are n disks. The number n is constant while working the puzzle.
· All disks are different in size.
· The disks are initially stacked on peg A so that they increase in size from the top to the bottom.
· The goal of the puzzle is to transfer the entire tower from the A peg to the peg C.
· One disk at a time can be moved from the top of a stack either to an empty peg or to a peg with a larger disk than itself on the top of its stack.

Your job will be to write a program which will show a copy of the puzzle on the screen step by step, as you move the disks around. This program has to solve the problem in an efficient way.

TIP: It is well known and rather easy to prove that the minimum number of moves needed to complete the puzzle with n disks is  2n -1.
 

The Input

The input file will consist of a series of lines. Each line will contain two integers n, m. n, lying within the range [1,250], will denote the number of disks and m, belonging to [0,2n-1], will be the number of the last move, you may assume that m will also be less than 216, and you may also assume that a good algorithm will always have enough time. The file will end at a line formed by two zeros.

The Output

The output will consist again of a series of lines, formatted as show below.
NOTES: There are 3 spaces between de ‘=>’ and the first number printed. If there isn't any number, there should be no spaces.
              All the disks in a single peg are printed in a single line.
Print a blank line after every problem.

Sample Input

64 2
8 45
0 0

Sample Output

Problem #1

A=> 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
B=>
C=>

A=> 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2
B=> 1
C=>

A=> 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26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 2
B=> 5 4 3
C=> 6 1

A=> 8 7 2 1
B=> 5 4 3
C=> 6

A=> 8 7 2 1
B=> 5 4
C=> 6 3

A=> 8 7 2
B=> 5 4 1
C=> 6 3

A=> 8 7
B=> 5 4 1
C=> 6 3 2

A=> 8 7
B=> 5 4
C=> 6 3 2 1

A=> 8 7 4
B=> 5
C=> 6 3 2 1

A=> 8 7 4 1
B=> 5
C=> 6 3 2

A=> 8 7 4 1
B=> 5 2
C=> 6 3

A=> 8 7 4
B=> 5 2 1
C=> 6 3

A=> 8 7 4 3
B=> 5 2 1
C=> 6

A=> 8 7 4 3
B=> 5 2
C=> 6 1
Posted by kinax

천하장사들

Life Story 2007/09/17 12:00
사용자 삽입 이미지

천하장사들

과연 천하장사들이다..
Posted by kinax

북한산 정상

Life Story 2007/09/17 11:59
사용자 삽입 이미지
북한산 정상
Posted by kinax

마지막 관문

Life Story 2007/09/17 11:58
사용자 삽입 이미지

마지막 관문

정상을 향한 마지막 관문
Posted by kinax

북한산

Life Story 2007/09/17 11:55
사용자 삽입 이미지
산 정상을 향해서
Posted by kinax
사용자 삽입 이미지

북한산 계곡에서

북한산 계곡에서 김대욱,김석기,박원진
Posted by kinax