# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1011009 | ttamx | 마술쇼 (APIO24_show) | C++17 | 컴파일 에러 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "Alice.h"
using namespace std;
vector<pair<int,int>> Alice(){
int n=200;
long long x=setN(n);
vector<pair<int,int>> res;
for(int i=1;i<n;i++)res.emplace_back(x%i+1,i+1);
return res;
}
#include <bits/stdc++.h>
#include "Bob.h"
using namespace std;
using i128 = __int128_t;
long long Bob(vector<pair<int,int>> e){
const i128 LIM=1e18;
i128 a=0,m=0;
for(auto [u,v]:e){
if(m>LIM)break;
u--,v--;
if(u>v)swap(u,v);
if(m==0){
a=u,m=v;
continue;
}
while(a%v!=u)a+=m;
m=lcm(m,v);
}
return a;
}
컴파일 시 표준 에러 (stderr) 메시지
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:84, from Bob.cpp:1: /usr/include/c++/10/numeric: In instantiation of 'constexpr std::common_type_t<_Mn, _Nn> std::lcm(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]': Bob.cpp:20:18: required from here /usr/include/c++/10/numeric:147:21: error: static assertion failed: lcm arguments are integers 147 | static_assert(is_integral_v<_Mn>, "lcm arguments are integers"); | ^~~~~~~~~~~~~~~~~~ /usr/include/c++/10/numeric: In instantiation of 'constexpr std::common_type_t<_Mn, _Nn> std::__detail::__lcm(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]': /usr/include/c++/10/numeric:153:29: required from 'constexpr std::common_type_t<_Mn, _Nn> std::lcm(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]' Bob.cpp:20:18: required from here /usr/include/c++/10/numeric:115:29: error: use of deleted function 'void std::__detail::__abs_integral(bool)' 115 | ? (__detail::__abs_integral(__m) / __detail::__gcd(__m, __n)) | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/10/numeric:98:8: note: declared here 98 | void __abs_integral(bool) = delete; | ^~~~~~~~~~~~~~ /usr/include/c++/10/numeric: In instantiation of 'constexpr std::common_type_t<_Mn, _Nn> std::__detail::__gcd(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]': /usr/include/c++/10/numeric:115:52: required from 'constexpr std::common_type_t<_Mn, _Nn> std::__detail::__lcm(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]' /usr/include/c++/10/numeric:153:29: required from 'constexpr std::common_type_t<_Mn, _Nn> std::lcm(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]' Bob.cpp:20:18: required from here /usr/include/c++/10/numeric:105:39: error: use of deleted function 'void std::__detail::__abs_integral(bool)' 105 | : __n == 0 ? __detail::__abs_integral(__m) | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/10/numeric:98:8: note: declared here 98 | void __abs_integral(bool) = delete; | ^~~~~~~~~~~~~~ /usr/include/c++/10/numeric: In instantiation of 'constexpr std::common_type_t<_Mn, _Nn> std::__detail::__gcd(_Mn, _Nn) [with _Mn = int; _Nn = __int128; std::common_type_t<_Mn, _Nn> = __int128]': /usr/include/c++/10/numeric:106:19: required from 'constexpr std::common_type_t<_Mn, _Nn> std::__detail::__gcd(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]' /usr/include/c++/10/numeric:115:52: required from 'constexpr std::common_type_t<_Mn, _Nn> std::__detail::__lcm(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]' /usr/include/c++/10/numeric:153:29: required from 'constexpr std::common_type_t<_Mn, _Nn> std::lcm(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]' Bob.cpp:20:18: required from here /usr/include/c++/10/numeric:104:49: error: use of deleted function 'void std::__detail::__abs_integral(bool)' 104 | return __m == 0 ? __detail::__abs_integral(__n) | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/10/numeric:98:8: note: declared here 98 | void __abs_integral(bool) = delete; | ^~~~~~~~~~~~~~ /usr/include/c++/10/numeric: In instantiation of 'constexpr std::common_type_t<_Mn, _Nn> std::__detail::__gcd(_Mn, _Nn) [with _Mn = __int128; _Nn = __int128; std::common_type_t<_Mn, _Nn> = __int128]': /usr/include/c++/10/numeric:106:19: recursively required from 'constexpr std::common_type_t<_Mn, _Nn> std::__detail::__gcd(_Mn, _Nn) [with _Mn = int; _Nn = __int128; std::common_type_t<_Mn, _Nn> = __int128]' /usr/include/c++/10/numeric:106:19: required from 'constexpr std::common_type_t<_Mn, _Nn> std::__detail::__gcd(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]' /usr/include/c++/10/numeric:115:52: required from 'constexpr std::common_type_t<_Mn, _Nn> std::__detail::__lcm(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]' /usr/include/c++/10/numeric:153:29: required from 'constexpr std::common_type_t<_Mn, _Nn> std::lcm(_Mn, _Nn) [with _Mn = __int128; _Nn = int; std::common_type_t<_Mn, _Nn> = __int128]' Bob.cpp:20:18: required from here /usr/include/c++/10/numeric:104:49: error: use of deleted function 'void std::__detail::__abs_integral(bool)' 104 | return __m == 0 ? __detail::__abs_integral(__n) | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/10/numeric:98:8: note: declared here 98 | void __abs_integral(bool) = delete; | ^~~~~~~~~~~~~~ /usr/include/c++/10/numeric:105:39: error: use of deleted function 'void std::__detail::__abs_integral(bool)' 105 | : __n == 0 ? __detail::__abs_integral(__m) | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/10/numeric:98:8: note: declared here 98 | void __abs_integral(bool) = delete; | ^~~~~~~~~~~~~~