# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
623224 | Koosha_mv | 던전 (IOI21_dungeons) | C++17 | 컴파일 에러 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dungeons.h"
#include <bits/stdc++.h>
using namespace std;
#define dbgv(v) cout<<#v<<" = "; f(i,0,int(v.size())) cout<<v[i]<<" "; cout<<endl
#define dbga(a,x,y) cout<<#a<<" = "; f(i,x,y) cout<<a[i]<<" "; cout<<endl
#define erorp(x) cout<<#x<<"={"<<x.F<<" , "<<x.S<<"}"<<endl
#define eror(x) cout<<#x<<'='<<(x)<<endl
#define f_(i,a,b) for(int i=a;i>=b;i--)
#define f(i,a,b) for(int i=a;i<b;i++)
#define nb(x) __builtin_popcount(x)
#define all(v) v.begin(),v.end()
#define bit(n,k) (((n)>>(k))&1)
#define Add(x,y) x=(x+y)%mod
#define maxm(a,b) a=max(a,b)
#define minm(a,b) a=min(a,b)
#define lst(x) x[x.size()-1]
#define sz(x) int(x.size())
#define mp make_pair
#define ll long long
#define pb push_back
#define S second
#define F first
const int N=400400,lg=25;
int n,par[N][lg][lg];
vector<ll> s,p,w,l;
void init(int _n,vector<int> _s,vector<int> _p,vector<int> _w,vector<int> _l) {
n=_n;
s=_s,p=_p,w=_w,l=_l;
s.pb((1<<(lg-1)));
f(i,0,N) f(j,0,lg) f(k,0,lg) par[i][j][k]=i+j+k;
}
long long simulate(int x, int z) {
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
dungeons.cpp: In function 'void init(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)': dungeons.cpp:31:4: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'std::vector<int>') 31 | s=_s,p=_p,w=_w,l=_l; | ^~ In file included from /usr/include/c++/10/vector:72, from dungeons.h:1, from dungeons.cpp:1: /usr/include/c++/10/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 198 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc:199:42: note: no known conversion for argument 1 from 'std::vector<int>' to 'const std::vector<long long int>&' 199 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/10/vector:67, from dungeons.h:1, from dungeons.cpp:1: /usr/include/c++/10/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<long long int>&&' 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 730 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::initializer_list<long long int>' 730 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ dungeons.cpp:31:9: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'std::vector<int>') 31 | s=_s,p=_p,w=_w,l=_l; | ^~ In file included from /usr/include/c++/10/vector:72, from dungeons.h:1, from dungeons.cpp:1: /usr/include/c++/10/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 198 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc:199:42: note: no known conversion for argument 1 from 'std::vector<int>' to 'const std::vector<long long int>&' 199 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/10/vector:67, from dungeons.h:1, from dungeons.cpp:1: /usr/include/c++/10/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<long long int>&&' 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 730 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::initializer_list<long long int>' 730 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ dungeons.cpp:31:14: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'std::vector<int>') 31 | s=_s,p=_p,w=_w,l=_l; | ^~ In file included from /usr/include/c++/10/vector:72, from dungeons.h:1, from dungeons.cpp:1: /usr/include/c++/10/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 198 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc:199:42: note: no known conversion for argument 1 from 'std::vector<int>' to 'const std::vector<long long int>&' 199 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/10/vector:67, from dungeons.h:1, from dungeons.cpp:1: /usr/include/c++/10/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<long long int>&&' 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 730 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::initializer_list<long long int>' 730 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ dungeons.cpp:31:19: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'std::vector<int>') 31 | s=_s,p=_p,w=_w,l=_l; | ^~ In file included from /usr/include/c++/10/vector:72, from dungeons.h:1, from dungeons.cpp:1: /usr/include/c++/10/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 198 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc:199:42: note: no known conversion for argument 1 from 'std::vector<int>' to 'const std::vector<long long int>&' 199 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/10/vector:67, from dungeons.h:1, from dungeons.cpp:1: /usr/include/c++/10/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<long long int>&&' 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = long long int; _Alloc = std::allocator<long long int>]' 730 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::initializer_list<long long int>' 730 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~