Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10-oesnuj #34

Merged
merged 5 commits into from
Jul 10, 2024
Merged

10-oesnuj #34

merged 5 commits into from
Jul 10, 2024

Conversation

oesnuj
Copy link
Member

@oesnuj oesnuj commented Jul 3, 2024

๐Ÿ”— ๋ฌธ์ œ ๋งํฌ

๋ฐฑ์ค€ | ์ƒ์–ด์ดˆ๋“ฑํ•™๊ต

โœ”๏ธ ์†Œ์š”๋œ ์‹œ๊ฐ„

2์‹œ๊ฐ„

โœจ ์ˆ˜๋„ ์ฝ”๋“œ

์–ด๋ ต๋‹ค๊ธฐ ๋ณด๋‹ค๋Š” ๊ท€์ฐฎ๊ณ  ์ƒ๊ฐํ• ๊ฒŒ ๋งŽ์€ ๊ตฌํ˜„๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค.
์ด๋ฒˆ์—๋Š” c++๋ง๊ณ  javascript๋กœ ํ’€์–ด๋ดค์Šต๋‹ˆ๋‹ค.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋ฌธ์ œ ํ’€์ด๋Š” ์ „์ฒด ์ž…๋ ฅ์„ txtํŒŒ์ผ๋กœ ๋ฐ›์•„์˜จ ํ›„, ์›ํ•˜๋Š”๋Œ€๋กœ ์งค๋ผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ์‹์„ ์ฃผ๋กœ ์”๋‹ˆ๋‹ค.

- ์„ค๊ณ„

  1. ์ž…๋ ฅ๋œ ์ˆœ์„œ๋Œ€๋กœ ์•‰ํžŒ๋‹ค.

  2. ํ•™์ƒ์„ ์•‰ํž ๋•Œ ํ˜„์žฌ ๊ต์‹ค(board)์˜ ๋ชจ๋“  ๋นˆ์ž๋ฆฌ์— ๋Œ€ํ•œ ์ธ์ ‘ ์ •๋ณด๋ฅผ ๋ฐ›์•„์„œ ์ €์žฅ

  3. ์ธ์ ‘ ์ •๋ณด๋Š” ํ•ด๋‹น ๋นˆ์ž๋ฆฌ์˜ ์ขŒํ‘œ, ์ธ์ ‘ ๋นˆ์ž๋ฆฌ ๊ฐœ์ˆ˜, ์ธ์ ‘ ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ์˜ ์ˆ˜๋ฅผ ๊ฐ€์ง„๋‹ค.

  4. 3์œผ๋กœ ์ˆ˜์ง‘ํ•œ ์ธ์ ‘ ์ •๋ณด๋“ค์„ ์กฐ๊ฑด์— ๋งž๊ฒŒ ์ •๋ ฌํ•˜์—ฌ ํŠน์ • ํ•™์ƒ์˜ ์ตœ์ ์˜ ์ž๋ฆฌ ์„ ์ •

  5. ํ•ด๋‹น ์ž๋ฆฌ์— ํ•™์ƒ์„ ์•‰ํžŒ๋‹ค.

  6. ๋ชจ๋‘ ์•‰ํžŒ ์ดํ›„ ๋งŒ์กฑ๋„๋ฅผ ์กฐ์‚ฌํ•œ๋‹ค.

- ๋ณ€์ˆ˜

N : ํ•™์ƒ์ˆ˜
students : ํ•™์ƒ, ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ๋ฒˆํ˜ธ๋กœ ์ด๋ฃจ์–ด์ง„ ๋ฐฐ์—ด
board : ์ž๋ฆฌ๋ฐฐ์น˜๋ฅผ ํ‘œ์‹œํ•˜๋Š” 2์ฐจ์› ๋ฐฐ์—ด

- ๊ตฌํ˜„ ํ•จ์ˆ˜ ์„ค๋ช…

getSeatInfo(r, c, studentNum) : ํŠน์ • ์ž๋ฆฌ ์ขŒํ‘œ์™€ ํ•™์ƒ ๋ฒˆํ˜ธ๋ฅผ ๋งค๊ฐœ๋ณ€์ˆ˜๋กœ ๋ฐ›์Œ

ํŠน์ • ์ž๋ฆฌ ์ขŒํ‘œ๋ฅผ ๊ธฐ์ค€์œผ๋กœ 4๋ฐฉํ–ฅ ํƒ์ƒ‰ -> ๋นˆ์ž๋ฆฌ ์ˆ˜, studentNum์— ํ•ด๋‹นํ•˜๋Š” ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ ์ˆ˜ ๊ณ„์‚ฐ


choiceSeat( studentNum)
studentNum์ด ์•‰์„ ์ตœ์ ์˜ ์ž๋ฆฌ๋ฅผ ์„ ์ •ํ•˜์—ฌ ์•‰ํžŒ๋‹ค.
๋ชจ๋“  ์ž๋ฆฌ ํƒ์ƒ‰ -> ๋นˆ์ž๋ฆฌ์— ๋Œ€ํ•ด์„œ getSeatInfo ์ˆ˜ํ–‰ -> ์ธ์ ‘ ์ •๋ณด ๋ฐฐ์—ด(neighborInfos)์— ์ €์žฅ
image
neighborInfos์„ ์œ„ ์กฐ๊ฑด์— ๋งž๊ฒŒ ์ •๋ ฌ์‹œํ‚จ๋‹ค. ์ •๋ ฌ ํ›„ ๊ฐ€์žฅ ์•ž์˜ ๊ฐ์ฒด๊ฐ€ ์ตœ์ ์˜ ์ž๋ฆฌ


calcSatisfy()
๋ชจ๋“  ์ž๋ฆฌ์— ๋Œ€ํ•ด์„œ getSeatInfo๋กœ ๊ทธ ํ•™์ƒ๊ณผ ์ธ์ ‘ํ•œ ์นธ์— ์•‰์€ ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ์˜ ์ˆ˜๋ฅผ ๋ฐ›์•„์˜ค๊ณ  ์ด์— ๋”ฐ๋ผ ๋งŒ์กฑ๋„ ์ฒ˜๋ฆฌ

โ—์ฃผ์˜ํ•  ์ 

result += Math.floor(10 ** (getSeatInfo(i, j ,board[i][j]).match-1));

๋งŒ์กฑ๋„ ์ฒ˜๋ฆฌ ์‹œ์— match๊ฐ€ 0์ธ ๊ฒฝ์šฐ 10์˜ -1์Šน์€ 0.1 ์ด๋ฏ€๋กœ 0์œผ๋กœ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด Math.floor๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•จ
math.floor(x) : x ์ดํ•˜์˜ ๊ฐ€์žฅ ํฐ ์ •์ˆ˜ ๋ฐ˜ํ™˜

๐Ÿ“ƒ ์ „์ฒด ์ฝ”๋“œ

const fs = require('fs');
const filepath = process.platform === 'linux' ? '/dev/stdin' : './input.txt';
const input = fs.readFileSync(filepath).toString().trim().split('\n');
//์ž…๋ ฅ ๋ฐ์ดํ„ฐ ์ •๋ฆฌ
const N = +input.shift();
const students = input.map(x => {
    const [num, ...likes] = x.trim().split(' ').map(Number);
    return { num, likes };
});

let board = Array.from({ length: N }, () => Array(N).fill(0)); 

const dr = [-1, 1, 0, 0];
const dc = [0, 0, -1, 1];

main();

function main(){
    for(let i=0; i< N**2; i++){
        if(i == 0){
            board[1][1] = students[i].num; //์ฒซํ•™์ƒ์€ 1,1์— ๋ฌด์กฐ๊ฑด ์•‰๋Š”๋‹ค.
            continue;
        }
        choiceSeat(students[i].num); //ํ•™์ƒ์„ ์กฐ๊ฑด์— ๋งž๊ฒŒ ์•‰ํžˆ๊ธฐ
    }
    console.log(calcSatisfy()); //๋ชจ๋‘ ์•‰์€ ํ›„ ๋งŒ์กฑ๋„ ๊ณ„์‚ฐํ•˜๊ธฐ
}

// ์ตœ์ ์˜ ์ž๋ฆฌ ์„ ํƒ ๋ฐ ํ•™์ƒ ๋ฐฐ์น˜ ํ•จ์ˆ˜
function choiceSeat(studentNum){
    const neighborInfos = []; //์ธ์ ‘ ์ž๋ฆฌ ์ •๋ณด๋ฅผ ๋ชจ์œผ๋Š” ๋ฐฐ์—ด
    for(let i = 0; i<N; i++){ 
        for(let j =0; j<N; j++){
            if(board[i][j] !== 0) continue; //์ด๋ฏธ ์ฐจ์žˆ๋Š” ์ž๋ฆฌ ํŒจ์Šค
            neighborInfos.push(getSeatInfo(i, j, studentNum));
            }    
        }
        neighborInfos.sort((a, b) => {
            if (a.match !== b.match) {
                return b.match - a.match; // match ๊ธฐ์ค€ ๋‚ด๋ฆผ์ฐจ์ˆœ ์ •๋ ฌ
            } else if (a.empty !== b.empty) {
                return b.empty - a.empty; // empty ๊ธฐ์ค€ ๋‚ด๋ฆผ์ฐจ์ˆœ ์ •๋ ฌ
            } else if (a.r !== b.r) {
                return a.r - b.r; // r ๊ธฐ์ค€ ์˜ค๋ฆ„์ฐจ์ˆœ ์ •๋ ฌ
            } else {
                return a.c - b.c; // c ๊ธฐ์ค€ ์˜ค๋ฆ„์ฐจ์ˆœ ์ •๋ ฌ
            }
        });
        board[neighborInfos[0].r][neighborInfos[0].c] = studentNum; //์ตœ์ ์˜ ์œ„์น˜์— ์•‰ํžˆ๊ธฐ
}

// ํŠน์ • ์ž๋ฆฌ์˜ ์ธ์ ‘ ์ •๋ณด ๊ณ„์‚ฐ ํ•จ์ˆ˜
function getSeatInfo(r, c, studentNum){
    let empty = 0;
    let match = 0;
    // ํ•™์ƒ ๋ฒˆํ˜ธ์— ๋งž๋Š” ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ๋“ค ์ฐพ๊ธฐ
    let studentLikes = students.find(student => student.num === studentNum)?.likes || [];
    for(let i = 0; i< 4; i++){
        nr = r + dr[i];
        nc= c + dc[i];
        if(nr < 0 || nc < 0 || nr >= N || nc >= N) continue;
        if (board[nr][nc] == 0) empty++;
        else if(studentLikes.includes(board[nr][nc])) match++
    }
    return { r: r, c: c, empty: empty, match: match };
}

//๋งŒ์กฑ๋„ ์ฒ˜๋ฆฌ
function calcSatisfy(){
    let result = 0;
    for(let i = 0; i<N; i++){ //๋‚จ์•„์žˆ๋Š” ๋ชจ๋“  ์ž๋ฆฌ์˜ ์ •๋ณด๋ฅผ ์ˆ˜์ง‘
        for(let j =0; j<N; j++){
            result += Math.floor(10 ** (getSeatInfo(i, j ,board[i][j]).match-1));
            }    
        }
    return result;
}

๐Ÿ“š ์ƒˆ๋กญ๊ฒŒ ์•Œ๊ฒŒ๋œ ๋‚ด์šฉ

  1. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์ž„์˜ ์ •๋ ฌ ํ•˜๋Š”๋ฒ• - ๋ฐฐ์—ด ๋ฉ”์„œ๋“œ ์‚ฌ์šฉ
    ์ž๋ฐ” ์Šคํฌ๋ฆฝํŠธ๋Š” ๋น„๊ต ์กฐ๊ฑด์— ๋”ฐ๋ฅธ ๋ฐ˜ํ™˜ ๊ฐ’์— ๋”ฐ๋ผ a, b๋ฅผ ์ •๋ ฌํ•œ๋‹ค.
    ๋ฐ˜ํ™˜ ๊ฐ’์ด ์Œ์ˆ˜๋ผ๋ฉด a๋ฅผ ์•ž์— ์ •๋ ฌ
    ๋ฐ˜ํ™˜ ๊ฐ’์ด ์–‘์ˆ˜๋ผ๋ฉด b๋ฅผ ์•ž์— ์ •๋ ฌ
๋ฐฐ์—ด.sort(๋น„๊ตํ•จ์ˆ˜);

๋ฐฐ์—ด.sort(function(a, b) {๋น„๊ต์กฐ๊ฑด}); //ํ•จ์ˆ˜์‚ฌ์šฉ
๋ฐฐ์—ด.sort((a, b) => {๋น„๊ต ์กฐ๊ฑด}); 	//ํ™”์‚ดํ‘œ ํ•จ์ˆ˜ ์‚ฌ์šฉ

ex) a == 1, b == 3 a<b์ธ ์ƒํ™ฉ์ด๋ผ๋ฉด
์˜ค๋ฆ„์ฐจ์ˆœ ์ •๋ ฌ 
return a - b; (์Œ์ˆ˜ ๋ฐ˜ํ™˜)

๋‚ด๋ฆผ์ฐจ์ˆœ ์ •๋ ฌ
return b - a; (์–‘์ˆ˜ ๋ฐ˜ํ™˜)
  1. 2์ฐจ์› ๋ฐฐ์—ด ์ดˆ๊ธฐํ™” ์‹œํ‚ค๊ธฐ
let board = Array.from({ length: N }, () => Array(N).fill(0));

Copy link
Collaborator

@pu2rile pu2rile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜ค ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ...!! ๊ฐ ๋ณ€์ˆ˜, ํ•จ์ˆ˜๋งˆ๋‹ค ๋”ฐ๋กœ ์„ค๋ช…์„ ์ ์–ด ์ฃผ์…”์„œ ์ข€ ๋” ์ดํ•ดํ•˜๊ธฐ๊ฐ€ ์ˆ˜์›”ํ–ˆ์–ด์š”!!
์ €๋Š” ํŒŒ์ด์ฌ์œผ๋กœ ํ•œ๋ฒˆ ํ’€์–ด๋ดค๋Š”๋ฐ, ๋”•์…”๋„ˆ๋ฆฌ like ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๊ฐ ํ•™์ƒ์˜ ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ ๋ชฉ๋ก์„ ์ €์žฅํ•˜๋‹ˆ ๊ฐ„ํŽธํ•˜๋”๋ผ๊ณ ์š”!

  • ํ‚ค: ํ•™์ƒ ๋ฒˆํ˜ธ
  • ๊ฐ’: ํ•ด๋‹น ํ•™์ƒ์ด ์ข‹์•„ํ•˜๋Š” 4๋ช…์˜ ํ•™์ƒ ๋ฒˆํ˜ธ ๋ชฉ๋ก

๋˜, ํ•™์ƒ ๋ฐฐ์น˜ ๋กœ์ง์—์„œ๋Š” ๋ฆฌ์ŠคํŠธ seats_candidates ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋ชจ๋“  ์ขŒ์„์„ ์ˆœํšŒํ•˜๊ณ , ๋นˆ ์ขŒ์„์ผ ๊ฒฝ์šฐ

  1. ์ธ์ ‘ํ•œ ์นธ์—์„œ ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ ์ˆ˜ like_seat ์™€ ๋นˆ์นธ ์ˆ˜ empty_seat ๊ณ„์‚ฐ
  2. ํ›„๋ณด ๋ฆฌ์ŠคํŠธ์— (like_seat, empty_seat, y, x) ์ถ”๊ฐ€
  3. ํ›„๋ณด ๋ฆฌ์ŠคํŠธ๋ฅผ ์ •๋ ฌํ•˜์—ฌ ์ตœ์ ์˜ ์ž๋ฆฌ ์„ ํƒ
  4. ํ•™์ƒ์„ ํ•ด๋‹น ์ž๋ฆฌ(seats_candidates[0])์— ๋ฐฐ์น˜

์ด๋ ‡๊ฒŒ ๊ตฌํ˜„ํ•ด ๋ดค์Šต๋‹ˆ๋‹ค! ์ค€์„œ๋‹˜ ๋ง๋Œ€๋กœ ์ •๋ง... ๊ณ ๋ฏผํ•  ๊ฒŒ ๋งŽ์€ ๋ฌธ์ œ์˜€๋˜ ๊ฒƒ ๊ฐ™์•„์š” ํ—‰ํ—‰ pr ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค!

์ฝ”๋“œ
N = int(input())
seats = [[0] * N for _ in range(N)]
like = {}  # ๊ฐ ํ•™์ƒ์˜ ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ ๋ชฉ๋ก ๋”•์…”๋„ˆ๋ฆฌ
students = []  # ํ•™์ƒ ๋ฐฐ์น˜ ์ˆœ์„œ ๋ฆฌ์ŠคํŠธ

dy = [-1, 1, 0, 0] # ๋ฐฉํ–ฅ ๋ฒกํ„ฐ
dx = [0, 0, -1, 1]

for _ in range(N * N):
    data = list(map(int, input().split()))  # ํ•™์ƒ ๋ฒˆํ˜ธ, ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ 4๋ช… ์ž…๋ ฅ
    student = data[0]  # ํ•™์ƒ ๋ฒˆํ˜ธ
    students.append(student)  # ํ•™์ƒ ๋ฐฐ์น˜ ์ˆœ์„œ ๋ฆฌ์ŠคํŠธ์— ์ถ”๊ฐ€
    like[student] = data[1:]  # ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ ๋ชฉ๋ก ๋”•์…”๋„ˆ๋ฆฌ์— ์ €์žฅ

# ๋ฐฐ์น˜
for student in students:
    seats_candidates = []  # ๊ฐ€๋Šฅํ•œ ์ขŒ์„ ํ›„๋ณด ๋ชฉ๋ก ์ดˆ๊ธฐํ™”
    for y in range(N):
        for x in range(N):
            if seats[y][x] != 0:  # ์ด๋ฏธ ํ•™์ƒ์ด ์•‰์•„ ์žˆ๋‹ค๋ฉด ํŒจ์Šค
                continue
            like_seat = 0  # ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ ์ˆ˜
            empty_seat = 0  # ๋นˆ ์ž๋ฆฌ ์ˆ˜
            for dir in range(4):  # ์ธ์ ‘ํ•œ ์นธ ํ™•์ธ
                ny, nx = y + dy[dir], x + dx[dir]  # ์ƒˆ๋กœ์šด ์ขŒํ‘œ ๊ณ„์‚ฐ
                if 0 <= ny < N and 0 <= nx < N:  # ์ขŒํ‘œ๊ฐ€ ์œ ํšจํ•œ์ง€ ํ™•์ธ
                    if seats[ny][nx] in like[student]:  # ์ธ์ ‘ ์นธ์— ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ์ด ์žˆ๋Š”์ง€ ํ™•์ธ
                        like_seat += 1
                    if seats[ny][nx] == 0:  # ์ธ์ ‘ ์นธ์ด ๋น„์–ด ์žˆ๋Š”์ง€ ํ™•์ธ
                        empty_seat += 1
            # ๊ฐ€๋Šฅํ•œ ์ขŒ์„ ํ›„๋ณด์— ์ถ”๊ฐ€
            seats_candidates.append((like_seat, empty_seat, y, x))
    # ์กฐ๊ฑด์— ๋งž๋Š” ์ž๋ฆฌ ์ •๋ ฌ
    seats_candidates.sort(key=lambda x: (-x[0], -x[1], x[2], x[3]))
    y, x = seats_candidates[0][2], seats_candidates[0][3]  # ์ตœ์ ์˜ ์ž๋ฆฌ ์„ ํƒ
    seats[y][x] = student  # ํ•™์ƒ ๋ฐฐ์น˜

result = 0  # ์ตœ์ข… ๋งŒ์กฑ๋„ ์ ์ˆ˜ ์ดˆ๊ธฐํ™”
# ๋งŒ์กฑ๋„ ๊ณ„์‚ฐ
for y in range(N):
    for x in range(N):
        student = seats[y][x]
        like_seat = 0  # ์ธ์ ‘ํ•œ ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ ์ˆ˜
        for dir in range(4):  # ์ธ์ ‘ํ•œ ์นธ ํ™•์ธ
            ny, nx = y + dy[dir], x + dx[dir]  # ์ƒˆ๋กœ์šด ์ขŒํ‘œ ๊ณ„์‚ฐ
            if 0 <= ny < N and 0 <= nx < N and seats[ny][nx] in like[student]:  # ์œ ํšจํ•œ ์ขŒํ‘œ์ธ์ง€ ํ™•์ธ, ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ์ธ์ง€ ํ™•์ธ
                like_seat += 1
        if like_seat > 0:  # ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ์ด ํ•˜๋‚˜ ์ด์ƒ ์žˆ์„ ๊ฒฝ์šฐ ๋งŒ์กฑ๋„ ๊ณ„์‚ฐ
            result += 10 ** (like_seat - 1)  # ๋งŒ์กฑ๋„ ๊ณ„์‚ฐ ๊ณต์‹

print(result)  # ์ตœ์ข… ๋งŒ์กฑ๋„ ์ถœ๋ ฅ

Copy link
Collaborator

@suhyun113 suhyun113 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๋ฒˆ์—๋„ ๊ตฌํ˜„ ๋ฌธ์ œ๊ตฐ์š”!! ๋ฌธ์ œ ์ด๋ฆ„์ด ์–ด๋–ป๊ฒŒ ์ƒ์–ด์ดˆ๋“ฑํ•™๊ต?!๐Ÿฆˆ ์ด๋ฆ„์ด ๊ท€์—ฝ๊ตฐ์š”,,
๋Š˜ ํ•˜๋˜ c++์ด ์•„๋‹Œ javascript๋กœ ํ•˜์…”์…” ์‹ ๊ธฐํ–ˆ์Šต๋‹ˆ๋‹น. ์ž์Šค..๊ฐœ์ธ์ ์œผ๋กœ ์–ด๋ ค์›Œํ•˜๋Š” ์–ธ์–ด ์ค‘ ํ•˜๋‚˜ใ…œใ…œ์ž…๋‹ˆ๋‹ค.

์ค€์„œ๋‹˜์ด ์—„์ฒญ ๊ผผ๊ผผํ•˜๊ฒŒ ์„ค๋ช…ํ•ด์ฃผ์…”์„œ ๋ฌธ์ œ์™€ ์ฝ”๋“œ๋ฅผ ์ดํ•ดํ•˜๋Š”๋ฐ ๋„์›€์ด ๋งŽ์ด ๋˜์—ˆ์–ด์š”!
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋Š” ์ž…๋ ฅ ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ถ€๋ถ„์ด ์—„์ฒญ ๊ธธ๋˜๋ฐ,, ๋‹ค๋ฅธ ์–ธ์–ด์™€ ๋น„์Šทํ•œ ๊ฒƒ ๊ฐ™์œผ๋ฉด์„œ ์กฐ๊ธˆ ๋‹ค๋ฅธ ..์‹ ๊ธฐํ–ˆ์Šต๋‹ˆ๋‹คใ…
ํ•™์ƒ๋“ค ์ž๋ฆฌ๋ฅผ ๋ฐฐ์น˜ํ•˜๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜๋„ ๋”ฐ๋กœ ํ•จ์ˆ˜๋ฅผ ์ด์šฉํ•ด ๊ตฌํ˜„ํ•˜์—ฌ ๋ณด๊ธฐ ์ข‹์•˜์–ด์š”! choiceSeatํ•จ์ˆ˜์—์„œ๋Š” getSeatInfoํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ํ˜„์žฌ ์ž๋ฆฌ์˜ ์ธ์ ‘ ์ž๋ฆฌ ์ •๋ณด๋ฅผ ๊ณ„์‹ผํ•ด ๋นˆ ์ž๋ฆฌ ์ˆ˜์™€ ์ข‹์•„ํ•˜๋Š” ํ•™์ƒ ์ˆ˜๋ฅผ ๋ฐ˜ํ™˜ํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ •๋ ฌํ•ด ๊ฐ€์žฅ ์ข‹์€ ์ž๋ฆฌ์— ํ•™์ƒ์„ ๋ฐฐ์น˜ํ•˜๋Š” ํ•จ์ˆ˜๋ฅผ ๊ตฌํ˜„ํ•œ ๊ฒƒ์ด ๋„ˆ๋ฌด ๊น”๋”ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ฃผ์„๋„ ๋งŽ์ด ๋‹ฌ์•„์ฃผ์…”์„œ ์ดํ•ด๋„ ์ž˜ ๋˜์—ˆ์Šต๋‹ˆ๋‹น

๋งˆ์ง€๋ง‰์œผ๋กœ calcSatisfyํ•จ์ˆ˜๋ฅผ ํ†ตํ•ด ๋งŒ์กฑ๋„๋ฅผ ๊ณ„์‚ฐํ•˜๋Š” ํ•จ์ˆ˜๊นŒ์ง€ ์ฝ”๋“œ๊ฐ€ ์ž˜ ์งœ์—ฌ์žˆ๋Š” ๊ฒƒ ๊ฐ™์•„์š”! ํ˜„์žฌ ์ฝ”๋“œ๋„ ์ข‹์ง€๋งŒ, ํ•™์ƒ๋“ค์„ ์ž๋ฆฌ์— ๋ฐฐ์น˜ํ•  ๋•Œ, ๋ชจ๋“  ๋นˆ ์ž๋ฆฌ๋ฅผ ํƒ์ƒ‰ํ•˜๊ณ  ์žˆ๋Š” ํ˜„์žฌ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์šฐ์„ ์ˆœ์œ„ ํ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด ์ตœ์ ์˜ ์ž๋ฆฌ๋ฅผ ๋” ๋นจ๋ฆฌ ์ฐพ์„ ์ˆ˜ ์žˆ์–ด ์‹œ๊ฐ„ ๋ณต์žก๋„๋ฅผ ์ค„์ผ ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์š”! ์ดํ•ด๋„ ์ž˜ ๋˜๊ตฌ ์ข‹์€ PR ์ž‘์„ฑํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค๐Ÿค“

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants