# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
789768 | normankr07 | 원숭이와 사과 나무 (IZhO12_apple) | C++17 | 1 ms | 212 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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));
}
cerr << "CPU Type: " << CPUBrandString << endl;
// cout << CPUBrandString << endl;
// stringstream ss;
// ss << CPUBrandString;
// string s = ss.str();
// s.erase(std::remove_if(s.begin(), s.end(), ::isspace),
// s.end());
// cout << s;
const auto processor_count = std::thread::hardware_concurrency();
cout << processor_count;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |