# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
983616 | user736482 | Two Transportations (JOI19_transportations) | C++17 | 컴파일 에러 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include<Azar.h>
using namespace std;
vector<int> answer,akliczby;
int p,akwaga=1,akbit=-1,rec;
vector<bool>tym;
void InitA(int N, int A, vector<int>U,V,C ){
set<pair<int,pair<int,int>>>krawedzie;
for(int i=0;i<N;i++){
answer.push_back(9999999);
}
anwer[0]=0;
for(int i=0;i<A;i++){
krawedzie.insert({C[i],{U[i],V[i]}});
}
while(krawedzie.size()!=N-1){
p=2*2;
}
}
void ReceiveA(bool x){
if(akbit==-1){
if(!x)
akbit=0;
else
akwaga++;
}
else{
tym.push_back(x);
akbit++;
if(akbit==11){
akbit=-1;
rec=0;
for(itn i=10;i>=0;i--){
rec*=2;
rec+=tym[i];
}
akliczby.push_back(rec);
if(akliczby.size()==2){
krawedzie.insert({akwaga,{akliczby[0],akliczby[1]}});
akliczby.clear();
}
}
}
}
vector<int> Answer(){
return answer;
}
/*int main(){
cout<<guess_sequence(3);
}*/
#include<bits/stdc++.h>
#include<Baijan.h>
using namespace std;
void InitB(int N, int B, vector<int>U,V,C ){
set<pair<int,pair<int,int>>>krawedzie;
int akwaga=1,ak;
for(int i=0;i<B;i++){
krawedzie.insert({C[i],{U[i],V[i]}});
}
for(auto i=krawedzie.begin();i<B;i++){
while(*i.first>akwaga){
akwaga++;
SendB(1);
}
SendB(0);
ak=*i.second.first;
for(int i=0;i<11;i++){
SendB(ak%2);
ak/=2;
}
ak=*i.second.second;
for(int i=0;i<11;i++){
SendB(ak%2);
ak/=2;
}
}
}
void ReceiveB(bool y){
}
컴파일 시 표준 에러 (stderr) 메시지
Azer.cpp:2:9: fatal error: Azar.h: No such file or directory 2 | #include<Azar.h> | ^~~~~~~~ compilation terminated. Baijan.cpp:5:39: error: 'V' has not been declared 5 | void InitB(int N, int B, vector<int>U,V,C ){ | ^ Baijan.cpp:5:41: error: 'C' has not been declared 5 | void InitB(int N, int B, vector<int>U,V,C ){ | ^ Baijan.cpp: In function 'void InitB(int, int, std::vector<int>, int, int)': Baijan.cpp:9:27: error: 'C' was not declared in this scope 9 | krawedzie.insert({C[i],{U[i],V[i]}}); | ^ Baijan.cpp:9:38: error: 'V' was not declared in this scope 9 | krawedzie.insert({C[i],{U[i],V[i]}}); | ^ Baijan.cpp:9:44: error: no matching function for call to 'std::set<std::pair<int, std::pair<int, int> > >::insert(<brace-enclosed initializer list>)' 9 | krawedzie.insert({C[i],{U[i],V[i]}}); | ^ In file included from /usr/include/c++/10/set:61, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87, from Baijan.cpp:1: /usr/include/c++/10/bits/stl_set.h:509:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::pair<int, std::pair<int, int> >; _Compare = std::less<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<std::pair<int, std::pair<int, int> > >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<int, std::pair<int, int> >]' 509 | insert(const value_type& __x) | ^~~~~~ /usr/include/c++/10/bits/stl_set.h:509:32: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, std::pair<int, int> >&'} 509 | insert(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_set.h:518:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = std::pair<int, std::pair<int, int> >; _Compare = std::less<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<std::pair<int, std::pair<int, int> > >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<int, std::pair<int, int> >]' 518 | insert(value_type&& __x) | ^~~~~~ /usr/include/c++/10/bits/stl_set.h:518:27: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::pair<int, std::pair<int, int> > >::value_type&&' {aka 'std::pair<int, std::pair<int, int> >&&'} 518 | insert(value_type&& __x) | ~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_set.h:546:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = std::pair<int, std::pair<int, int> >; _Compare = std::less<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<std::pair<int, std::pair<int, int> > >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<int, std::pair<int, int> >]' 546 | insert(const_iterator __position, const value_type& __x) | ^~~~~~ /usr/include/c++/10/bits/stl_set.h:546:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/10/bits/stl_set.h:551:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = std::pair<int, std::pair<int, int> >; _Compare = std::less<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<std::pair<int, std::pair<int, int> > >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<int, std::pair<int, int> >]' 551 | insert(const_iterator __position, value_type&& __x) | ^~~~~~ /usr/include/c++/10/bits/stl_set.h:551:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/10/bits/stl_set.h:566:2: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = std::pair<int, std::pair<int, int> >; _Compare = std::less<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<std::pair<int, std::pair<int, int> > >]' 566 | insert(_InputIterator __first, _InputIterator __last) | ^~~~~~ /usr/include/c++/10/bits/stl_set.h:566:2: note: template argument deduction/substitution failed: Baijan.cpp:9:44: note: candidate expects 2 arguments, 1 provided 9 | krawedzie.insert({C[i],{U[i],V[i]}}); | ^ In file included from /usr/include/c++/10/set:61, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87, from Baijan.cpp:1: /usr/include/c++/10/bits/stl_set.h:578:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::pair<int, std::pair<int, int> >; _Compare = std::less<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<std::pair<int, std::pair<int, int> > >]' 578 | insert(initializer_list<value_type> __l) | ^~~~~~ /usr/include/c++/10/bits/stl_set.h:578:43: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::pair<int, std::pair<int, int> > >' 578 | insert(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_set.h:598:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::node_type&&) [with _Key = std::pair<int, std::pair<int, int> >; _Compare = std::less<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<std::pair<int, std::pair<int, int> > >; std::set<_Key, _Compare, _Alloc>::insert_return_type = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::insert_return_type; std::set<_Key, _Compare, _Alloc>::node_type = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::node_type]' 598 | insert(node_type&& __nh) | ^~~~~~ /usr/include/c++/10/bits/stl_set.h:598:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::pair<int, std::pair<int, int> > >::node_type&&' {aka 'std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::node_type&&'} 598 | insert(node_type&& __nh) | ~~~~~~~~~~~~^~~~ /usr/include/c++/10/bits/stl_set.h:603:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::node_type&&) [with _Key = std::pair<int, std::pair<int, int> >; _Compare = std::less<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<std::pair<int, std::pair<int, int> > >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::const_iterator; std::set<_Key, _Compare, _Alloc>::node_type = std::_Rb_tree<std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >, std::_Identity<std::pair<int, std::pair<int, int> > >, std::less<std::pair<int, std::pair<int, int> > >, std::allocator<std::pair<int, std::pair<int, int> > > >::node_type]' 603 | insert(const_iterator __hint, node_type&& __nh) | ^~~~~~ /usr/include/c++/10/bits/stl_set.h:603:7: note: candidate expects 2 arguments, 1 provided Baijan.cpp:11:35: error: no match for 'operator<' (operand types are 'std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > >' and 'int') 11 | for(auto i=krawedzie.begin();i<B;i++){ | ~^~ | | | | | int | std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > > In file included from /usr/include/c++/10/regex:62, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110, from Baijan.cpp:1: /usr/include/c++/10/bits/regex.h:1075:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)' 1075 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1075:5: note: template argument deduction/substitution failed: Baijan.cpp:11:36: note: 'std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > >' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | for(auto i=krawedzie.begin();i<B;i++){ | ^ In file included from /usr/include/c++/10/regex:62, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110, from Baijan.cpp:1: /usr/include/c++/10/bits/regex.h:1156:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const std::__cxx11::sub_match<_BiIter>&)' 1156 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1156:5: note: template argument deduction/substitution failed: Baijan.cpp:11:36: note: 'std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > >' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 11 | for(auto i=krawedzie.begin();i<B;i++){ | ^ In file included from /usr/include/c++/10/regex:62, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110, from Baijan.cpp:1: /usr/include/c++/10/bits/regex.h:1249:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const std::__cxx11::sub_match<_BiIter>&, std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1249 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1249:5: note: template argument deduction/substitution failed: Baijan.cpp:11:36: note: 'std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > >' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | for(auto i=krawedzie.begin();i<B;i++){ | ^ In file included from /usr/include/c++/10/regex:62, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110, from Baijan.cpp:1: /usr/include/c++/10/bits/regex.h:1323:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const std::__cxx11::sub_match<_BiIter>&)' 1323 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1323:5: note: template argument deduction/substitution failed: Baijan.cpp:11:36: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 11 | for(auto i=krawedzie.begin();i<B;i++){ | ^ In file included from /usr/include/c++/10/regex:62, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110, from Baijan.cpp:1: /usr/include/c++/10/bits/regex.h:1417:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1417 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1417:5: note: template argument deduction/substitution failed: Baijan.cpp:11:36: note: 'std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > >' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | for(auto i=krawedzie.begin();i<B;i++){ | ^ In file included from /usr/include/c++/10/regex:62, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110, from Baijan.cpp:1: /usr/include/c++/10/bits/regex.h:1492:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const std::__cxx11::sub_match<_BiIter>&)' 1492 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1492:5: note: template argument deduction/substitution failed: Baijan.cpp:11:36: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 11 | for(auto i=krawedzie.begin();i<B;i++){ | ^ In file included from /usr/include/c++/10/regex:62, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110, from Baijan.cpp:1: /usr/include/c++/10/bits/regex.h:1592:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1592 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1592:5: note: template argument deduction/substitution failed: Baijan.cpp:11:36: note: 'std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > >' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | for(auto i=krawedzie.begin();i<B;i++){ | ^ In file included from /usr/include/c++/10/bits/stl_algobase.h:64, from /usr/include/c++/10/bits/specfun.h:45, from /usr/include/c++/10/cmath:1927, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41, from Baijan.cpp:1: /usr/include/c++/10/bits/stl_pair.h:489:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)' 489 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/10/bits/stl_pair.h:489:5: note: template argument deduction/substitution failed: Baijan.cpp:11:36: note: 'std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > >' is not derived from 'const std::pair<_T1, _T2>' 11 | for(auto i=krawedzie.begin();i<B;i++){ | ^ In file included from /usr/include/c++/10/bits/stl_algobase.h:67, from /usr/include/c++/10/bits/specfun.h:45, from /usr/include/c++/10/cmath:1927, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41, from Baijan.cpp:1: /usr/include/c++/10/bits/stl_iterator.h:366:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)' 366 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/10/bits/stl_iterator.h:366:5: note: template argument deduction/substitution failed: Baijan.cpp:11:36: note: 'std::_Rb_tree_const_iterator<std::pair<int, std::pair<int, int> > >' is not derived from 'const std::reverse_iterator<_Iterator>' 11 | for(auto i=krawedzie.begin();i<B;i++){ |