์ด ์˜์—ญ์„ ๋ˆ„๋ฅด๋ฉด ์ฒซ ํŽ˜์ด์ง€๋กœ ์ด๋™
caputdraconis ๋ธ”๋กœ๊ทธ์˜ ์ฒซ ํŽ˜์ด์ง€๋กœ ์ด๋™

caputdraconis

ํŽ˜์ด์ง€ ๋งจ ์œ„๋กœ ์˜ฌ๋ผ๊ฐ€๊ธฐ

caputdraconis

๋„คํŠธ์›Œํฌ ๊ด€์ ์—์„œ์˜ ํด๋ผ์šฐ๋“œ ์ปดํ“จํŒ…์„ ๊ณต๋ถ€ํ•˜๋Š” ์ค‘์ž…๋‹ˆ๋‹ค :)

[MAC] bits/stdc++.h ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•

  • 2021.07.30 20:01
  • ๐Ÿฅš๊ณ ๋ฆฌ์ฆ˜
๊ธ€ ์ž‘์„ฑ์ž: caputdraconis
๋ฐ˜์‘ํ˜•

 /* ๋งฅ์—์„œ bits/stdc++.h๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•์ž…๋‹ˆ๋‹ค..! */

 

 ์šฐ์„  bits/stdc++.h๋Š” ๋งŽ์ด ์“ฐ์ด๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ํฌํ•จํ•œ ๋ชจ๋“  ํ‘œ์ค€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์ด ํฌํ•จ๋œ ํ—ค๋”๋กœ ํ•„์š”ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค๋งˆ๋‹ค ์ถ”๊ฐ€ํ•ด์ค˜์•ผ๋˜๋Š” ์ˆ˜๊ณ ๋ฅผ ๋œ์–ด์ค„ ์ˆ˜ ์žˆ๋Š” ๊ทธ๋Ÿฐ ์™„๋ตฅํ•œ ํ—ค๋”์ž…๋‹ˆ๋‹ค. ์ด๋ฅผ ๋งฅ์—์„œ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋”ฐ๋กœ ์ถ”๊ฐ€๋ฅผ ํ•ด์ค˜์•ผํ•ฉ๋‹ˆ๋‹ค..!

 

 

cd /usr/local/include

์šฐ์„  ์œ„์˜ ๋ช…๋ น์–ด๋ฅผ ํ„ฐ๋ฏธ๋„์— ์ž…๋ ฅํ•ด  /usr/local/include ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™ํ•ด์ค๋‹ˆ๋‹ค.

 ๋ฐฑ์ค€, ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ๋“ฑ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ๋ฌธ์ œ ์‚ฌ์ดํŠธ์˜ ์ฑ„์  ์„œ๋ฒ„์—์„œ๋Š” ์ปดํŒŒ์ผ๋Ÿฌ๋กœ gcc๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. gcc์˜ default include path๋ฅผ ํ™•์ธํ•ด๋ณด๋ฉด ์œ„ ์‚ฌ์ง„๊ณผ ๊ฐ™์ด /usr/local/include ์—์„œ ๊ฐ€์ ธ์˜ค๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ณ ๋ ‡๋‹ค๋ฉด!? ์ € ๋””๋ ‰ํ† ๋ฆฌ์— ํ•„์š”ํ•œ stdc++.h ํ—ค๋”ํŒŒ์ผ์„ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ์ €ํฌ์˜ ์˜๋„๋Œ€๋กœ ๋งฅ์—์„œ๋„ stdc++.h ํ—ค๋”ํŒŒ์ผ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. 

 

 mkdir bits

์œ„์˜ ๋ช…๋ น์–ด๋ฅผ ํ„ฐ๋ฏธ๋„์— ์ž…๋ ฅํ•ด /usr/local/include ๋””๋ ‰ํ† ๋ฆฌ ์•ˆ์— bits๋ผ๋Š” ์ด๋ฆ„์˜ ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ๋งŒ๋“ค์–ด์ค๋‹ˆ๋‹ค. ์ด ์•ˆ์— stdc++.h ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์ค„๊ฒ๋‹ˆ๋‹ค..!

 

cd bits

์œ„์˜ ๋ช…๋ น์–ด๋ฅผ ํ„ฐ๋ฏธ๋„์— ์ž…๋ ฅํ•ด ๋ฐฉ๊ธˆ ๋งŒ๋“ค์–ด์ค€ bits ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™ํ•ด์ค๋‹ˆ๋‹ค..!

 

vi stdc++.h

์œ„์˜ ๋ช…๋ น์–ด๋ฅผ ํ„ฐ๋ฏธ๋„์— ์ž…๋ ฅํ•ด stdc++.h ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์ฃผ๊ณ  ์•„๋ž˜์˜ ๋‚ด์šฉ์„ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค. ์•„๋ž˜์˜ ์ฝ”๋“œ๋Š” https://gist.github.com/reza-ryte-club/97c39f35dab0c45a5d924dd9e50c445f ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

// C++ includes used for precompiling -*- C++ -*-

// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

/** @file stdc++.h
 *  This is an implementation file for a precompiled header.
 */

// 17.4.1.2 Headers

// C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

 

์ด๋ฅผ ์ž…๋ ฅํ•ด์ฃผ๊ณ  ์ €์žฅํ•ด์ฃผ๋ฉด ๋งฅ์—์„œ bits/stdc++.h ํ—ค๋”๋ฅผ ์‚ฌ์šฉํ•  ์ค€๋น„๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

 

 

์ด์ œ ๋‹น๋‹นํžˆ ์œ„์˜ include ๋ฌธ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค..๋„ํ•ณ

 

 bits/stdc++.h๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ์—ˆ๋Š”๋ฐ IDE์— ์ž‘์„ฑํ•œ include ๋ฌธ์—์„œ ์˜ค๋ฅ˜๊ฐ€ ๋‚œ๋‹ค๋ฉด, IDE๋ฅผ ์žฌ์‹œ์ž‘ ํ•œ ํ›„ ํ™•์ธํ•ด๋ณด์‹œ๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹น..!

 

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€

์ด ๊ธ€ ๊ณต์œ ํ•˜๊ธฐ

  • ๊ตฌ๋…ํ•˜๊ธฐ

    ๊ตฌ๋…ํ•˜๊ธฐ

  • ์นด์นด์˜คํ†ก

    ์นด์นด์˜คํ†ก

  • ๋ผ์ธ

    ๋ผ์ธ

  • ํŠธ์œ„ํ„ฐ

    ํŠธ์œ„ํ„ฐ

  • Facebook

    Facebook

  • ์นด์นด์˜ค์Šคํ† ๋ฆฌ

    ์นด์นด์˜ค์Šคํ† ๋ฆฌ

  • ๋ฐด๋“œ

    ๋ฐด๋“œ

  • ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ

    ๋„ค์ด๋ฒ„ ๋ธ”๋กœ๊ทธ

  • Pocket

    Pocket

  • Evernote

    Evernote

๋‹ค๋ฅธ ๊ธ€

  • [c++] scanf & cin ์†๋„ ์ฐจ์ด(์ž…๋ ฅ ์‹œ๊ฐ„ ์ดˆ๊ณผ)

    [c++] scanf & cin ์†๋„ ์ฐจ์ด(์ž…๋ ฅ ์‹œ๊ฐ„ ์ดˆ๊ณผ)

    2021.08.27
  • [C++] pair vector๋ฅผ sort! ๋“ค์–ด์˜จ ์ˆœ์„œ๋„ ๊ธฐ์ค€์œผ๋กœ ๋‘˜ ์ˆ˜ ์žˆ๋‹ค๊ฑฐ!

    [C++] pair vector๋ฅผ sort! ๋“ค์–ด์˜จ ์ˆœ์„œ๋„ ๊ธฐ์ค€์œผ๋กœ ๋‘˜ ์ˆ˜ ์žˆ๋‹ค๊ฑฐ!

    2021.08.06
  • [C++] pair vector๋ฅผ sort! ๋‘๋ฒˆ์งธ๊ฐ’์„ ๊ธฐ์ค€์œผ๋กœ๋„ ์ •๋ ฌ ๊ฐ€๋Šฅํ•˜๋‹ค๊ฑฐ!

    [C++] pair vector๋ฅผ sort! ๋‘๋ฒˆ์งธ๊ฐ’์„ ๊ธฐ์ค€์œผ๋กœ๋„ ์ •๋ ฌ ๊ฐ€๋Šฅํ•˜๋‹ค๊ฑฐ!

    2021.08.06
  • [C++]๋ฐฑ์ค€ 1100๋ฒˆ ํ•˜์–€ ์นธ

    [C++]๋ฐฑ์ค€ 1100๋ฒˆ ํ•˜์–€ ์นธ

    2020.07.14
๋‹ค๋ฅธ ๊ธ€ ๋” ๋‘˜๋Ÿฌ๋ณด๊ธฐ

์ •๋ณด

caputdraconis ๋ธ”๋กœ๊ทธ์˜ ์ฒซ ํŽ˜์ด์ง€๋กœ ์ด๋™

caputdraconis

  • caputdraconis์˜ ์ฒซ ํŽ˜์ด์ง€๋กœ ์ด๋™

๊ฒ€์ƒ‰

๋ฉ”๋‰ด

    ์นดํ…Œ๊ณ ๋ฆฌ

    • ๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (168)
      • Cloud (3)
      • Computer Network (12)
      • Database (2)
      • Terraform (2)
      • ๐Ÿฅš๊ณ ๋ฆฌ์ฆ˜ (13)
      • ๊ฒ…๋ถ€๊ฒ…๋ถ€๐Ÿ™ƒ (10)
        • Naver CS50 ์ฝ”์นญ์Šคํ„ฐ๋”” (2)
        • Machine Learning (1)
        • Computing System (6)
      • ์–ธ์–ด&ํ”„๋ ˆ์ž„์›Œํฌ (20)
        • Python (4)
        • Django (10)
        • Node JS (1)
        • C++ (2)
        • Java (1)
        • Flutter (2)
      • Security (76)
        • WebHacking Study (11)
        • ์ง€์˜ฅ๋ฐฉ ์Šคํ„ฐ๋”” (22)
        • ์—ฌ๋ฆ„๋ฐฉํ•™ ์Šคํ„ฐ๋”” (2)
        • PWN Study (6)
        • SUA Reversing Study (3)
        • PWN (3)
        • WebHacking (20)
        • Reversing (4)
      • ์•Œ๊ณ  ์žˆ์œผ๋ฉด ๋„์›€๋˜์ง€ ์•Š์„๊นŒ,,? (23)
      • ์ผ์ƒ๋‹ค๋ฐ˜์‚ฌ (1)
      • ๊ทผํ™ฉ ์ •๋ฆฌ (1)
      • 42 Seoul (1)
        • Setting (1)

    ์ตœ๊ทผ ๊ธ€

    ์ธ๊ธฐ ๊ธ€

    ๋Œ“๊ธ€

    ๊ณต์ง€์‚ฌํ•ญ

    ์•„์นด์ด๋ธŒ

    ํƒœ๊ทธ

    • Python
    • ํŒŒ์ด์ฌ๊ธฐ์ดˆ
    • ๋ฆฌ์ŠคํŠธํ•จ์ˆ˜
    • ๋“œ๋ฆผํ•ต
    • ํŒŒ์ด์ฌํ•จ์ˆ˜
    • old-16
    • ํŒŒ์ด์ฌ
    • ์›นํ•ดํ‚น.kr

    ๋‚˜์˜ ์™ธ๋ถ€ ๋งํฌ

    • Github
    • solved.ac
    • caputdraconis@kakao.com

    ์ •๋ณด

    caputdraconis์˜ caputdraconis

    caputdraconis

    caputdraconis

    ๋ธ”๋กœ๊ทธ ๊ตฌ๋…ํ•˜๊ธฐ

    • ๊ตฌ๋…ํ•˜๊ธฐ
    • RSS ํ”ผ๋“œ

    ๋ฐฉ๋ฌธ์ž

    • ์ „์ฒด ๋ฐฉ๋ฌธ์ž
    • ์˜ค๋Š˜
    • ์–ด์ œ

    ํ‹ฐ์Šคํ† ๋ฆฌ

    • ํ‹ฐ์Šคํ† ๋ฆฌ ํ™ˆ
    • ์ด ๋ธ”๋กœ๊ทธ ๊ด€๋ฆฌํ•˜๊ธฐ
    • ๊ธ€์“ฐ๊ธฐ
    Powered by Tistory / Kakao. Copyright © caputdraconis.

    ํ‹ฐ์Šคํ† ๋ฆฌํˆด๋ฐ”