제출 #985697

#제출 시각아이디문제언어결과실행 시간메모리
985697benjaminkleynJakarta Skyscrapers (APIO15_skyscraper)C++17
컴파일 에러
0 ms0 KiB
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,avx2,fma,bmi,bmi2")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
    int N, x = 0;
    srand(time(0));
    N = 14000 + rand() % 5;
    for (int i = 0; i < N; i++)
        for (int j = 0; j < N; j++)
            x += __builtin_popcnt(i * j);
    cout << x << '\n';
}

컴파일 시 표준 에러 (stderr) 메시지

skyscraper.cpp: In function 'int main()':
skyscraper.cpp:14:18: error: '__builtin_popcnt' was not declared in this scope; did you mean '__builtin_popcount'?
   14 |             x += __builtin_popcnt(i * j);
      |                  ^~~~~~~~~~~~~~~~
      |                  __builtin_popcount