# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
362646 | mosiashvililuka | Detecting Molecules (IOI16_molecules) | C++14 | 컴파일 에러 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
SUBMISSION #362645
# Submission timeUTC+4 Handle Problem Language Result Execution time Memory
362645 2021-02-04 00:07:43 mosiashvililuka Detecting Molecules (IOI16_molecules) C++14
0 / 100
1 ms 512 KB
molecules
#include "molecules.h"
#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,e,i,j,ii,jj,zx,xc,f[200009],jm[200009];
pair <long long, long long> p[200009];
int ka;
vector<int> find_subset(int l, int r, vector<int> w) {
a=w.size();
for(i=1; i<=a; i++){
p[i].first=w[i-1];
p[i].second=i-1;
}
sort(p+1,p+a+1);
for(i=1; i<=a; i++){
f[i]=p[i].first;
jm[i]=jm[i-1]+f[i];
}
j=1;
for(i=1; i<=a; i++){
j=max(j,i);
while(j<a&&jm[j]-jm[i-1]<l) j++;
c=jm[j]-jm[i-1];
if(l<=c&&c<=r){
vector <int> vv;
for(ii=i; ii<=j; ii++){
ka=p[ii].second;
vv.push_back(ka);
}
return vv;
}
}
vector <int> vv;
return vv;
}
컴파일 시 표준 에러 (stderr) 메시지
molecules.cpp:2:12: error: stray '#' in program 2 | SUBMISSION #362645 | ^ molecules.cpp:5:3: error: invalid preprocessing directive #Submission 5 | # Submission timeUTC+4 Handle Problem Language Result Execution time Memory | ^~~~~~~~~~ molecules.cpp:2:1: error: 'SUBMISSION' does not name a type 2 | SUBMISSION #362645 | ^~~~~~~~~~ In file included from /usr/include/c++/9/bits/stl_algobase.h:62, from /usr/include/c++/9/vector:60, from molecules.h:3, from molecules.cpp:10: /usr/include/c++/9/ext/type_traits.h:162:35: error: 'bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 162 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/9/ext/type_traits.h:157:5: note: previous declaration 'template<class _Type> bool __gnu_cxx::__is_null_pointer(_Type)' 157 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/9/ext/type_traits.h:162:26: error: 'nullptr_t' is not a member of 'std' 162 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/9/bits/move.h:55, from /usr/include/c++/9/bits/stl_pair.h:59, from /usr/include/c++/9/bits/stl_algobase.h:64, from /usr/include/c++/9/vector:60, from molecules.h:3, from molecules.cpp:10: /usr/include/c++/9/type_traits:361:31: error: 'std::size_t' has not been declared 361 | template<typename _Tp, std::size_t _Size> | ^~~~~~ /usr/include/c++/9/type_traits:362:25: error: '_Size' was not declared in this scope 362 | struct is_array<_Tp[_Size]> | ^~~~~ /usr/include/c++/9/type_traits:362:31: error: template argument 1 is invalid 362 | struct is_array<_Tp[_Size]> | ^ /usr/include/c++/9/type_traits:560:42: error: 'nullptr_t' is not a member of 'std' 560 | struct __is_null_pointer_helper<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/9/type_traits:560:42: error: 'nullptr_t' is not a member of 'std' /usr/include/c++/9/type_traits:560:51: error: template argument 1 is invalid 560 | struct __is_null_pointer_helper<std::nullptr_t> | ^ /usr/include/c++/9/type_traits:1253:37: error: 'size_t' is not a member of 'std' 1253 | : public integral_constant<std::size_t, alignof(_Tp)> { }; | ^~~~~~ /usr/include/c++/9/type_traits:1253:37: error: 'size_t' is not a member of 'std' /usr/include/c++/9/type_traits:1253:57: error: template argument 1 is invalid 1253 | : public integral_constant<std::size_t, alignof(_Tp)> { }; | ^ /usr/include/c++/9/type_traits:1253:57: note: invalid template non-type parameter /usr/include/c++/9/type_traits:1258:37: error: 'size_t' is not a member of 'std' 1258 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/include/c++/9/type_traits:1258:37: error: 'size_t' is not a member of 'std' /usr/include/c++/9/type_traits:1258:46: error: template argument 1 is invalid 1258 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/9/type_traits:1258:46: note: invalid template non-type parameter /usr/include/c++/9/type_traits:1260:31: error: 'std::size_t' has not been declared 1260 | template<typename _Tp, std::size_t _Size> | ^~~~~~ /usr/include/c++/9/type_traits:1261:21: error: '_Size' was not declared in this scope 1261 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/9/type_traits:1261:27: error: template argument 1 is invalid 1261 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/9/type_traits:1262:37: error: 'size_t' is not a member of 'std' 1262 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/9/type_traits:1262:37: error: 'size_t' is not a member of 'std' /usr/include/c++/9/type_traits:1262:65: error: template argument 1 is invalid 1262 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/9/type_traits:1262:65: note: invalid template non-type parameter /usr/include/c++/9/type_traits:1266:37: error: 'size_t' is not a member of 'std' 1266 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/9/type_traits:1266:37: error: 'size_t' is not a member of 'std' /usr/include/c++/9/type_traits:1266:65: error: template argument 1 is invalid 1266 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/9/type_traits:1266:65: note: invalid template non-type parameter /usr/include/c++/9/type_traits:1271:37: error: 'size_t' is not a member of 'std' 1271 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/include/c++/9/type_traits:1271:37: error: 'size_t' is not a member of 'std' /usr/include/c++/9/type_traits:1271:46: error: template argument 1 is invalid 1271 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/9/type_traits:1271:46: note: invalid template non-type parameter /usr/include/c++/9/type_traits:1273:47: error: 'std::size_t' has not been declared 1273 | template<typename _Tp, unsigned _Uint, std::size_t _Size> | ^~~~~~ /usr/include/c++/9/type_traits:1274:23: error: '_Size' was not declared in this scope 1274 | struct extent<_Tp[_Size], _Uint> | ^~~~~ /usr/include/c++/9/type_traits:1274:36: error: template argument 1 is invalid 1274 | struct extent<_Tp[_Size], _Uint> | ^ /usr/include/c++/9/type_traits:1275:37: error: 'size_t' is not a member of 'std' 1275 | : public integral_constant<std::size_t, | ^~~~~~ /usr/include/c++/9/type_traits:1275:37: error: 'size_t' is not a member of 'std' /usr/include/c++/9/type_traits:1276:24: error: '_Size' was not declared in this scope 1276 | _Uint == 0 ? _Size : extent<_Tp, | ^~~~~ /usr/include/c++/9/type_traits:1277:28: error: template argument 1 is invalid 1277 | _Uint - 1>::value> | ^ /usr/include/c++/9/type_traits:1277:28: note: invalid template non-type parameter /usr/include/c++/9/type_traits:1282:37: error: 'size_t' is not a member of 'std' 1282 | : public integral_constant<std::size_t, | ^~~~~~ /usr/include/c++/9/type_traits:1282:37: error: 'size_t' is not a member of 'std' /usr/include/c++/9/type_traits:1284:31: error: template argument 1 is invalid 1284 | _Uint - 1>::value> | ^ /usr/include/c++/9/type_traits:1284:31: note: invalid template non-type parameter /usr/include/c++/9/type_traits:1616:26: error: 'size_t' does not name a type 1616 | { static constexpr size_t __size = sizeof(_Tp); }; | ^~~~~~ In file included from /usr/include/c++/9/bits/move.h:55, from /usr/include/c++/9/bits/stl_pair.h:59, from /usr/include/c++/9/bits/stl_algobase.h:64, from /usr/include/c++/9/vector:60, from molecules.h:3, from molecules.cpp:10: /usr/include/c++/9/type_traits:1:1: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'? +++ |+#include <cstddef> 1 | // C++11 <type_traits> -*- C++ -*- In file included from /usr/include/c++/9/bits/move.h:55, from /usr/include/c++/9/bits/stl_pair.h:59, from /usr/include/c++/9/bits/stl_algobase.h:64, from /usr/include/c++/9/vector:60, from molecules.h:3, from molecules.cpp:10: /usr/include/c++/9/type_traits:1618:14: error: 'size_t' has not been declared 1618 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~~~~ /usr/include/c++/9/type_traits:1618:48: error: '_Sz' was not declared in this scope 1618 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~ /usr/include/c++/9/type_traits:1619:14: error: no default argument for '_Tp' 1619 | struct __select; | ^~~~~~~~ /usr/include/c++/9/type_traits:1621:14: error: 'size_t' has not been declared 1621 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/9/type_traits:1622:23: error: '_Sz' was not declared in this scope 1622 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^~~ /usr/include/c++/9/type_traits:1622:57: error: template argument 1 is invalid 1622 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^ /usr/include/c++/9/type_traits:1625:14: error: 'size_t' has not been declared 1625 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/9/type_traits:1626:23: error: '_Sz' was not declared in this scope 1626 | struct __select<_Sz, _List<_Uint, _UInts...>, false> | ^~~ /usr/include/c++/9/type_traits:1626:58: error: template argument 1 is invalid 1626 | struct __select<_Sz, _List<_Uint, _UInts...>, false> | ^ /usr/include/c++/9/type_traits:1627:18: error: '_Sz' was not declared in this scope 1627 | : __select<_Sz, _List<_UInts...>> | ^~~ /usr/include/c++/9/type_traits:1627:38: error: template argument 1 is invalid 1627 | : __select<_Sz, _List<_UInts...>> | ^~ /usr/include/c++/9/type_traits:1618:52: error: '__size' is not a member of 'std::__make_unsigned_selector_base::_List<unsigned char, short unsigned int, unsigned int, long unsigned int, long long unsigned int>' 1618 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ~~~~~^~~~~~~~~~~~~~~ /usr/include/c++/9/type_traits:1640:68: error: template argument 3 is invalid 1640 | using __unsigned_type = typename __select<sizeof(_Tp), _UInts>::__type; | ^ /usr/include/c++/9/type_traits:1644:40: error: '__unsigned_type' was not declared in this scope 1644 | = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; | ^~~~~~~~~~~~~~~ /usr/include/c++/9/type_traits:1644:55: error: template argument 2 is invalid 1644 | = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; | ^ /usr/include/c++/9/type_traits:1656:61: error: '__type' in 'class std::__make_unsigned_selector<wchar_t, false, true>' does not name a type 1656 | = typename __make_unsigned_selector<wchar_t, false, true>::__type; | ^~~~~~ /usr/include/c++/9/type_traits:1673:62: error: '__type' in 'class std::__make_unsigned_selector<char16_t, false, true>' does not name a type 1673 | = typename __make_unsigned_selector<char16_t, false, true>::__type; | ^~~~~~ /usr/include/c++/9/type_traits:1680:62: error: '__type' in 'class std::__make_unsigned_selector<char32_t, false, true>' does not name a type 1680 | = typename __make_unsigned_selector<char32_t, false, true>::__type; | ^~~~~~ /usr/include/c++/9/type_traits: In instantiation of 'class std::__make_unsigned_selector<wchar_t, true, false>': /usr/include/c++/9/type_traits:1767:62: required from 'class std::__make_signed_selector<wchar_t, false, true>' /usr/include/c++/9/type_traits:1782:57: required from here /usr/include/c++/9/type_traits:1601:13: error: no type named '__type' in 'struct std::__make_unsigned<wchar_t>' 1601 | using __unsigned_type | ^~~~~~~~~~~~~~~ /usr/include/c++/9/type_traits:1605:13: error: no type named '__type' in 'struct std::__make_unsigned<wchar_t>' 1605 | using __type | ^~~~~~ /usr/include/c++/9/type_traits:1782:59: error: invalid combination of multiple type-specifiers 1782 | = typename __make_signed_selector<wchar_t, false, true>::__type; | ^~~~~~ /usr/include/c++/9/type_traits: In instantiation of 'class std::__make_unsigned_selector<char16_t, true, false>': /usr/include/c++/9/type_traits:1767:62: required from 'class std::__make_signed_selector<char16_t, false, true>' /usr/include/c++/9/type_traits:1799:58: required from here /usr/include/c++/9/type_traits:1601:13: error: no type named '__type' in 'struct std::__make_unsigned<char16_t>' 1601 | using __unsigned_type | ^~~~~~~~~~~~~~~ /usr/include/c++/9/type_traits:1605:13: error: no type named '__type' in 'struct std::__make_unsigned<char16_t>' 1605 | using __type | ^~~~~~ /usr/include/c++/9/type_traits:1799:60: error: invalid combination of multiple type-specifiers 1799 | = typename __make_signed_selector<char16_t, false, true>::__type; | ^~~~~~ /usr/include/c++/9/type_traits: In instantiation of 'class std::__make_unsigned_selector<char32_t, true, false>': /usr/include/c++/9/type_traits:1767:62: required from 'class std::__make_signed_selector<char32_t, false, true>' /usr/include/c++/9/type_traits:1806:58: required from here /usr/include/c++/9/type_traits:1601:13: error: no type named '__type' in 'struct std::__make_unsigned<char32_t>' 1601 | using __unsigned_type | ^~~~~~~~~~~~~~~ /usr/include/c++/9/type_traits:1605:13: error: no type named '__type' in 'struct std::__make_unsigned<char32_t>' 1605 | using __type | ^~~~~~ /usr/include/c++/9/type_traits:1806:60: error: invalid combination of multiple type-specifiers 1806 | = typename __make_signed_selector<char32_t, false, true>::__type; | ^~~~~~ /usr/include/c++/9/type_traits:1838:31: error: 'std::size_t' has not been declared 1838 | template<typename _Tp, std::size_t _Size> | ^~~~~~ /usr/include/c++/9/type_traits:1839:30: error: '_Size' was not declared in this scope 1839 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/9/type_traits:1839:36: error: template argument 1 is invalid 1839 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/9/type_traits:1851:31: error: 'std::size_t' has not been declared 1851 | template<typename _Tp, std::size_t _Size> | ^~~~~~ /usr/include/c++/9/type_traits:1852:35: error: '_Size' was not declared in this scope 1852 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/9/type_traits:1852:41: error: template argument 1 is invalid 1852 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/9/type_traits:1910:17: error: 'std::size_t' has not been declared 1910 | template<std::size_t _Len> | ^~~~~~ /usr/include/c++/9/type_traits:1915:23: error: '_Len' was not declared in this scope 1915 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/9/type_traits:1930:17: error: 'std::size_t' has not been declared 1930 | template<std::size_t _Len, std::size_t _Align = | ^~~~~~ /usr/include/c++/9/type_traits:1930:35: error: 'std::size_t' has not been declared 1930 | template<std::size_t _Len, std::size_t _Align = | ^~~~~~ /usr/include/c++/9/type_traits:1931:48: error: '_Len' was not declared in this scope 1931 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/9/type_traits:1931:52: error: template argument 1 is invalid 1931 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/9/type_traits:1936:23: error: '_Len' was not declared in this scope 1936 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/9/type_traits:1937:37: error: '_Align' was not declared in this scope 1937 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/9/type_traits:1944:20: error: 'size_t' does not name a type 1944 | static const size_t _S_alignment = 0; | ^~~~~~ /usr/include/c++/9/type_traits:1944:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'? /usr/include/c++/9/type_traits:1945:20: error: 'size_t' does not name a type 1945 | static const size_t _S_size = 0; | ^~~~~~ /usr/include/c++/9/type_traits:1945:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'? /usr/include/c++/9/type_traits:1951:20: error: 'size_t' does not name a type 1951 | static const size_t _S_alignment = | ^~~~~~ /usr/include/c++/9/type_traits:1951:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'? /usr/include/c++/9/type_traits:1954:20: error: 'size_t' does not name a type 1954 | static const size_t _S_size = | ^~~~~~ /usr/include/c++/9/type_traits:1954:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'? /usr/include/c++/9/type_traits:1969:13: error: 'size_t' has not been declared 1969 | template <size_t _Len, typename... _Types> | ^~~~~~ /usr/include/c++/9/type_traits:1976:20: error: 'size_t' does not name a type 1976 | static const size_t _S_len = _Len > __strictest::_S_size | ^~~~~~ /usr/include/c++/9/type_traits:1976:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'? /usr/include/c++/9/type_traits:1980:20: error: 'size_t' does not name a type 1980 | static const size_t alignment_value = __strictest::_S_alignment; | ^~~~~~ /usr/include/c++/9/type_traits:1980:20: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'? /usr/include/c++/9/type_traits:1982:40: error: '_S_len' was not declared in th