WookjeBlog
    • 블로그
    • 소개
    • 태그
    • 수업/강의
    • 라이브러리
    Main
    • Share to Facebook

    FFT

    All Posts in fast-fourier-transform

    • [BOJ] 10531 : Golf Bot

      10531 : Golf Bot 풀이 골프 봇이 칠 수 있는 거리를 체킹 배열 a와 b에 체크했다고 생각하자. 두 배열을 bool 곱셈한 배열을 c배열이라고 하자. 만약 a[i] != 0 && b[j] != 0라면 c[i+j] != 0도 성립한다. 코드 #define _USE_MATH_DEFINES #include <cstdio> #include <cmath> #include <complex> #include <vector> #include <algorithm> using namespace std; #define sz(v) ((int)(v).size()) #define all(v) (v).begin(),(v).end() typedef complex<double> base; void fft(vector<base> &a, bool invert) { int n = sz(a); for (int i=1,j=0;i<n;i++){ int...

      boj acm-icpc fast-fourier-transform math

      wookje.kwon's profile image

      wookje.kwon

      2018-06-30 15:59

    • [BOJ] 1067 : 이동

      1067 : 이동 풀이 . 코드 #define _USE_MATH_DEFINES #include <cstdio> #include <cmath> #include <complex> #include <vector> #include <algorithm> using namespace std; #define sz(v) ((int)(v).size()) #define all(v) (v).begin(),(v).end() typedef complex<double> base; void fft(vector<base> &a, bool invert) { int n = sz(a); for (int i=1,j=0;i<n;i++){ int bit = n >> 1; for (;j>=bit;bit>>=1) j -= bit; j += bit; if (i < j) swap(a[i],a[j]); } for (int len=2;len<=n;len<<=1){ double ang = 2*M_PI/len*(invert?-1:1); base wlen(cos(ang),sin(ang)); for (int i=0;i<n;i+=len){...

      boj fast-fourier-transform

      wookje.kwon's profile image

      wookje.kwon

      2018-06-30 09:21

    • github
    • facebook
    • rss

    Copyright © Wookje Kwon. All rights reserved.