제출 #789761

#제출 시각아이디문제언어결과실행 시간메모리
789761Deepesson도시들 (IOI15_towns)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include <cpuid.h> using namespace std; int main(){ char CPUBrandString[0x40]; unsigned int CPUInfo[4] = {0,0,0,0}; __cpuid(0x80000000, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); unsigned int nExIds = CPUInfo[0]; memset(CPUBrandString, 0, sizeof(CPUBrandString)); for (unsigned int i = 0x80000000; i <= nExIds; ++i) { __cpuid(i, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); if (i == 0x80000002) memcpy(CPUBrandString, CPUInfo, sizeof(CPUInfo)); else if (i == 0x80000003) memcpy(CPUBrandString + 16, CPUInfo, sizeof(CPUInfo)); else if (i == 0x80000004) memcpy(CPUBrandString + 32, CPUInfo, sizeof(CPUInfo)); } cout << "CPU Type: " << CPUBrandString << endl; }

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

/usr/bin/ld: /tmp/ccRIwiXo.o: in function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccnvbKer.o:towns.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccRIwiXo.o: in function `main':
grader.c:(.text.startup+0x83): undefined reference to `hubDistance(int, int)'
collect2: error: ld returned 1 exit status