submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s316092419
p00323
C++
#include <iostream> #include <cmath> #include <vector> using namespace std; int main() { int n, a, b; vector<int> v, t; cin >> n; for (int i = 0; i < n; ++i) { cin >> a >> b; v.push_back(a + b); } sort(v.begin(), v.end()); while (1) { int cnt = 1; bool check = true; for (int i = 0; i < v.size(); ++i) { if (i != v.size() - 1 && v[i] == v[i + 1]) { cnt++; } else { if (cnt >= 2) check = false; for (int j = 0; j < cnt / 2; ++j) { t.push_back(v[i] + 1); } if (cnt % 2 == 1) t.push_back(v[i]); cnt = 1; } } if (check) break; v = t; } for (auto elem: v) { cout << elem << " " << 0 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 17 | sort(v.begin(), v.end()); | ^~~~ | sqrt
s221364530
p00324
C++
#include <bits/stdc++.h> using namespace std; int main(){ ????long long n,i,j,c,k,m,l; ????cin>>n; ????long long a[n]; ????for(i=l=0;i<n;i++)cin>>a[i]; ????for(i=0;i<n;i++){ ????????for(j=i,c=m=k=0;j<n;j++){ ????????????c+=a[j]; ????????????if(c==0)k=j-i; ????????????m=max(k,m); ????????} ????????l=max(m,l); ????} ????for(i=n-1;i>=0;i--){ ????????for(j=i,c=m=k=0;j>=0;j--){ ????????????c+=a[j]; ????????????if(c==0)k=j-i; ????????????m=max(k,m); ????????} ????????l=max(m,l); ????} ????if(l)cout<<l+1<<endl; ????else cout<<l<<endl; }
a.cc: In function 'int main()': a.cc:4:1: error: expected primary-expression before '?' token 4 | ????long long n,i,j,c,k,m,l; | ^ a.cc:4:2: error: expected primary-expression before '?' token 4 | ????long long n,i,j,c,k,m,l; | ^ a.cc:4:3: error: expected primary-expression before '?' token 4 | ????long long n,i,j,c,k,m,l; | ^ a.cc:4:4: error: expected primary-expression before '?' token 4 | ????long long n,i,j,c,k,m,l; | ^ a.cc:4:5: error: expected primary-expression before 'long' 4 | ????long long n,i,j,c,k,m,l; | ^~~~ a.cc:4:5: error: expected ':' before 'long' 4 | ????long long n,i,j,c,k,m,l; | ^~~~ | : a.cc:4:5: error: expected primary-expression before 'long' 4 | ????long long n,i,j,c,k,m,l; | ^~~~ a.cc:4:5: error: expected ':' before 'long' 4 | ????long long n,i,j,c,k,m,l; | ^~~~ | : a.cc:4:5: error: expected primary-expression before 'long' 4 | ????long long n,i,j,c,k,m,l; | ^~~~ a.cc:4:5: error: expected ':' before 'long' 4 | ????long long n,i,j,c,k,m,l; | ^~~~ | : a.cc:4:5: error: expected primary-expression before 'long' 4 | ????long long n,i,j,c,k,m,l; | ^~~~ a.cc:4:5: error: expected ':' before 'long' 4 | ????long long n,i,j,c,k,m,l; | ^~~~ | : a.cc:4:5: error: expected primary-expression before 'long' 4 | ????long long n,i,j,c,k,m,l; | ^~~~ a.cc:5:1: error: expected primary-expression before '?' token 5 | ????cin>>n; | ^ a.cc:5:2: error: expected primary-expression before '?' token 5 | ????cin>>n; | ^ a.cc:5:3: error: expected primary-expression before '?' token 5 | ????cin>>n; | ^ a.cc:5:4: error: expected primary-expression before '?' token 5 | ????cin>>n; | ^ a.cc:5:10: error: 'n' was not declared in this scope; did you mean 'yn'? 5 | ????cin>>n; | ^ | yn a.cc:5:11: error: expected ':' before ';' token 5 | ????cin>>n; | ^ | : a.cc:5:11: error: expected primary-expression before ';' token a.cc:5:11: error: expected ':' before ';' token 5 | ????cin>>n; | ^ | : a.cc:5:11: error: expected primary-expression before ';' token a.cc:5:11: error: expected ':' before ';' token 5 | ????cin>>n; | ^ | : a.cc:5:11: error: expected primary-expression before ';' token a.cc:5:11: error: expected ':' before ';' token 5 | ????cin>>n; | ^ | : a.cc:5:11: error: expected primary-expression before ';' token a.cc:6:1: error: expected primary-expression before '?' token 6 | ????long long a[n]; | ^ a.cc:6:2: error: expected primary-expression before '?' token 6 | ????long long a[n]; | ^ a.cc:6:3: error: expected primary-expression before '?' token 6 | ????long long a[n]; | ^ a.cc:6:4: error: expected primary-expression before '?' token 6 | ????long long a[n]; | ^ a.cc:6:5: error: expected primary-expression before 'long' 6 | ????long long a[n]; | ^~~~ a.cc:6:5: error: expected ':' before 'long' 6 | ????long long a[n]; | ^~~~ | : a.cc:6:5: error: expected primary-expression before 'long' 6 | ????long long a[n]; | ^~~~ a.cc:6:5: error: expected ':' before 'long' 6 | ????long long a[n]; | ^~~~ | : a.cc:6:5: error: expected primary-expression before 'long' 6 | ????long long a[n]; | ^~~~ a.cc:6:5: error: expected ':' before 'long' 6 | ????long long a[n]; | ^~~~ | : a.cc:6:5: error: expected primary-expression before 'long' 6 | ????long long a[n]; | ^~~~ a.cc:6:5: error: expected ':' before 'long' 6 | ????long long a[n]; | ^~~~ | : a.cc:6:5: error: expected primary-expression before 'long' 6 | ????long long a[n]; | ^~~~ a.cc:7:1: error: expected primary-expression before '?' token 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^ a.cc:7:2: error: expected primary-expression before '?' token 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^ a.cc:7:3: error: expected primary-expression before '?' token 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^ a.cc:7:4: error: expected primary-expression before '?' token 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^ a.cc:7:5: error: expected primary-expression before 'for' 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^~~ a.cc:7:5: error: expected ':' before 'for' 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^~~ | : a.cc:7:5: error: expected primary-expression before 'for' 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^~~ a.cc:7:5: error: expected ':' before 'for' 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^~~ | : a.cc:7:5: error: expected primary-expression before 'for' 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^~~ a.cc:7:5: error: expected ':' before 'for' 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^~~ | : a.cc:7:5: error: expected primary-expression before 'for' 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^~~ a.cc:7:5: error: expected ':' before 'for' 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^~~ | : a.cc:7:5: error: expected primary-expression before 'for' 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^~~ a.cc:7:15: error: 'i' was not declared in this scope 7 | ????for(i=l=0;i<n;i++)cin>>a[i]; | ^ a.cc:8:1: error: expected primary-expression before '?' token 8 | ????for(i=0;i<n;i++){ | ^ a.cc:8:2: error: expected primary-expression before '?' token 8 | ????for(i=0;i<n;i++){ | ^ a.cc:8:3: error: expected primary-expression before '?' token 8 | ????for(i=0;i<n;i++){ | ^ a.cc:8:4: error: expected primary-expression before '?' token 8 | ????for(i=0;i<n;i++){ | ^ a.cc:8:5: error: expected primary-expression before 'for' 8 | ????for(i=0;i<n;i++){ | ^~~ a.cc:8:5: error: expected ':' before 'for' 8 | ????for(i=0;i<n;i++){ | ^~~ | : a.cc:8:5: error: expected primary-expression before 'for' 8 | ????for(i=0;i<n;i++){ | ^~~ a.cc:8:5: error: expected ':' before 'for' 8 | ????for(i=0;i<n;i++){ | ^~~ | : a.cc:8:5: error: expected primary-expression before 'for' 8 | ????for(i=0;i<n;i++){ | ^~~ a.cc:8:5: error: expected ':' before 'for' 8 | ????for(i=0;i<n;i++){ | ^~~ | : a.cc:8:5: error: expected primary-expression before 'for' 8 | ????for(i=0;i<n;i++){ | ^~~ a.cc:8:5: error: expected ':' before 'for' 8 | ????for(i=0;i<n;i++){ | ^~~ | : a.cc:8:5: error: expected primary-expression before 'for' 8 | ????for(i=0;i<n;i++){ | ^~~ a.cc:16:1: error: expected primary-expression before '?' token 16 | ????for(i=n-1;i>=0;i--){ | ^ a.cc:16:2: error: expected primary-expression before '?' token 16 | ????for(i=n-1;i>=0;i--){ | ^ a.cc:16:3: error: expected primary-expression before '?' token 16 | ????for(i=n-1;i>=0;i--){ | ^ a.cc:16:4: error: expected primary-expression before '?' token 16 | ????for(i=n-1;i>=0;i--){ | ^ a.cc:16:5: error: expected primary-expression before 'for' 16 | ????for(i=n-1;i>=0;i--){ | ^~~ a.cc:16:5: error: expected ':' before 'for' 16 | ????for(i=n-1;i>=0;i--){ | ^~~ | : a.cc:16:5: error: expected primary-expression before 'for' 16 | ????for(i=n-1;i>=0;i--){ | ^~~ a.cc:16:5: error: expected ':' before 'for' 16 | ????for(i=n-1;i>=0;i--){ | ^~~ | : a.cc:16:5: error: expected primary-expression before 'for' 16 | ????for(i=n-1;i>=0;i--){ | ^~~ a.cc:16:5: error: expected ':' before 'for' 16 | ????for(i=n-1;i>=0;i--){ | ^~~ | : a.cc:16:5: error: expected primary-expression before 'for' 16 | ????for(i=n-1;i>=0;i--){ | ^~~ a.cc:16:5: error: expected ':' before 'for' 16 | ????for(i=n-1;i>=0;i--){ | ^~~ | : a.cc:16:5: error: expected primary-expression before 'for' 16 | ????for(i=n-1;i>=0;i--){ | ^~~ a.cc:24:1: error: expected primary-expression before '?' token 24 | ????if(l)cout<<l+1<<endl; | ^ a.cc:24:2: error: expected primary-expression before '?' token 24 | ????if(l)cout<<l+1<<endl; | ^ a.cc:24:3: error: expected primary-expression before '?' token 24 | ????if(l)cout<<l+1<<endl; | ^ a.cc:24:4: error: expected primary-expression before '?' token 24 | ????if(l)cout<<l+1<<endl; | ^ a.cc:24:5: error: expected primary-expression before 'if' 24 | ????if(l)cout<<l+1<<endl; | ^~ a.cc:24:5: error: expected ':' before 'if' 24 | ????if(l)cout<<l+1<<endl; | ^~ | : a.cc:24:5: error: expected primary-expression before 'if' 24 | ????if(l)cout<<l+1<<endl; | ^~ a.cc:24:5: error: expected ':' before 'if' 24 | ????if(l)cout<<l+1<<endl; | ^~ | : a.cc:24:5: error: expected primary-expression before 'if' 24 | ????if(l)cout<<l+1<<endl; | ^~ a.cc:24:5: error: expected ':' before 'if' 24 | ????if(l)cout<<l+1<<endl; | ^~ | : a.cc:24:5: error: expected primary-expression before 'if' 24 | ????if(l)cout<<l+1<<endl; | ^~ a.cc:24:5: error: expected ':' before 'if' 24 | ????if(l)cout<<l+1<<endl; | ^~ | : a.cc:24:5: error: expected primary-expression before 'if' 24 | ????if(l)cout<<l+1<<endl; | ^~ a.cc:25:1: error: expected primary-expression before '?' token 25 | ????else cout<<l<<endl; | ^ a.cc:25:2: error: expected primary-expression before '?' token 25 | ????else cout<<l<<endl; | ^ a.cc:25:3: error: expected primary-expression before '?' token 25 | ????else cout<<l<<endl; | ^ a.cc:25:4: error: expected primary-expression before '?' token 25 | ????else cout<<l<<endl; | ^ a.cc:25:5: error: expected primary-expression before 'el
s007710814
p00324
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long n,i,j,c,k,m,l; cin>>n; long long a[n]; for(i=l=0;i<n;i++)cin>>a[i]; for(i=0;i<n;i++){ for(j=i,c=m=k=0;j<n;j++){ c+=a[j]; if(c==0)k=j-i+1; m=max(k,m); } l=max(m,l); } for(i=n-1;i>=0;i--){ for(j=i,c=m=k=0;j>=0;j--){ c+=a[j]; if(c==0)k=i-j; m=max(k,m); } l=max(m,l); } else cout<<l<<endl; }
a.cc: In function 'int main()': a.cc:24:3: error: 'else' without a previous 'if' 24 | else cout<<l<<endl; | ^~~~
s892265838
p00324
C++
#include <map> #include <algorithm> #include <cstdio> using namespace std; int main(){ map<long long,int>m={0,-1}; long long s=0,x; int N; scanf("%d",&N); for(int i=0;i<N;i++){ scanf("%lld",&x); s+=x; if(m.find(s)==m.end())m[s]=i; r=max(r,i-m[s]); } printf("%lld\n",r); }
a.cc: In function 'int main()': a.cc:15:17: error: 'r' was not declared in this scope 15 | r=max(r,i-m[s]); | ^ a.cc:17:25: error: 'r' was not declared in this scope 17 | printf("%lld\n",r); | ^ In file included from /usr/include/c++/14/map:63, from a.cc:1: /usr/include/c++/14/bits/stl_map.h: In instantiation of 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]': a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_map.h:287:38: error: no matching function for call to 'std::_Rb_tree<long long int, std::pair<const long long int, int>, std::_Select1st<std::pair<const long long int, int> >, std::less<long long int>, std::allocator<std::pair<const long long int, int> > >::_M_insert_range_unique(int&, int&)' 287 | { _M_t._M_insert_range_unique(__first, __last); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/map:62: /usr/include/c++/14/bits/stl_tree.h:1096:9: note: candidate: 'template<class _InputIterator> std::__enable_if_t<((bool)std::is_same<_Val, typename std::iterator_traits<_Iter>::value_type>::value)> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_range_unique(_InputIterator, _InputIterator) [with _Key = long long int; _Val = std::pair<const long long int, int>; _KeyOfValue = std::_Select1st<std::pair<const long long int, int> >; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 1096 | _M_insert_range_unique(_InputIterator __first, _InputIterator __last) | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_tree.h:1096:9: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_tree.h: In substitution of 'template<class _InputIterator> std::__enable_if_t<((bool)std::is_same<std::pair<const long long int, int>, typename std::iterator_traits< <template-parameter-1-1> >::value_type>::value), void> std::_Rb_tree<long long int, std::pair<const long long int, int>, std::_Select1st<std::pair<const long long int, int> >, std::less<long long int>, std::allocator<std::pair<const long long int, int> > >::_M_insert_range_unique(_InputIterator, _InputIterator) [with _InputIterator = int]': /usr/include/c++/14/bits/stl_map.h:287:31: required from 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 287 | { _M_t._M_insert_range_unique(__first, __last); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_tree.h:1095:58: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1095 | __enable_if_t<__same_value_type<_InputIterator>::value> | ^~~~~ /usr/include/c++/14/bits/stl_map.h: In instantiation of 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]': a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_tree.h:1105:9: note: candidate: 'template<class _InputIterator> std::__enable_if_t<((bool)(! std::is_same<_Val, typename std::iterator_traits<_Iter>::value_type>::value))> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_range_unique(_InputIterator, _InputIterator) [with _Key = long long int; _Val = std::pair<const long long int, int>; _KeyOfValue = std::_Select1st<std::pair<const long long int, int> >; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 1105 | _M_insert_range_unique(_InputIterator __first, _InputIterator __last) | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_tree.h:1105:9: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_tree.h: In substitution of 'template<class _InputIterator> std::__enable_if_t<((bool)(! std::is_same<std::pair<const long long int, int>, typename std::iterator_traits< <template-parameter-1-1> >::value_type>::value)), void> std::_Rb_tree<long long int, std::pair<const long long int, int>, std::_Select1st<std::pair<const long long int, int> >, std::less<long long int>, std::allocator<std::pair<const long long int, int> > >::_M_insert_range_unique(_InputIterator, _InputIterator) [with _InputIterator = int]': /usr/include/c++/14/bits/stl_map.h:287:31: required from 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 287 | { _M_t._M_insert_range_unique(__first, __last); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_tree.h:1104:59: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1104 | __enable_if_t<!__same_value_type<_InputIterator>::value> | ^~~~~
s544591260
p00324
C++
#include <map> #include <algorithm> #include <cstdio> using namespace std; int main(){ map<long long,int>m={0,-1}; long long s=0,x; int N; scanf("%d",&N); for(int i=0;i<N;i++){ scanf("%lld",&x); s+=x; if(m.find(s)==m.end())m[s]=i; r=max(r,i-m[s]); } printf("%lld\n",r); }
a.cc: In function 'int main()': a.cc:15:17: error: 'r' was not declared in this scope 15 | r=max(r,i-m[s]); | ^ a.cc:17:25: error: 'r' was not declared in this scope 17 | printf("%lld\n",r); | ^ In file included from /usr/include/c++/14/map:63, from a.cc:1: /usr/include/c++/14/bits/stl_map.h: In instantiation of 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]': a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_map.h:287:38: error: no matching function for call to 'std::_Rb_tree<long long int, std::pair<const long long int, int>, std::_Select1st<std::pair<const long long int, int> >, std::less<long long int>, std::allocator<std::pair<const long long int, int> > >::_M_insert_range_unique(int&, int&)' 287 | { _M_t._M_insert_range_unique(__first, __last); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/map:62: /usr/include/c++/14/bits/stl_tree.h:1096:9: note: candidate: 'template<class _InputIterator> std::__enable_if_t<((bool)std::is_same<_Val, typename std::iterator_traits<_Iter>::value_type>::value)> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_range_unique(_InputIterator, _InputIterator) [with _Key = long long int; _Val = std::pair<const long long int, int>; _KeyOfValue = std::_Select1st<std::pair<const long long int, int> >; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 1096 | _M_insert_range_unique(_InputIterator __first, _InputIterator __last) | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_tree.h:1096:9: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_tree.h: In substitution of 'template<class _InputIterator> std::__enable_if_t<((bool)std::is_same<std::pair<const long long int, int>, typename std::iterator_traits< <template-parameter-1-1> >::value_type>::value), void> std::_Rb_tree<long long int, std::pair<const long long int, int>, std::_Select1st<std::pair<const long long int, int> >, std::less<long long int>, std::allocator<std::pair<const long long int, int> > >::_M_insert_range_unique(_InputIterator, _InputIterator) [with _InputIterator = int]': /usr/include/c++/14/bits/stl_map.h:287:31: required from 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 287 | { _M_t._M_insert_range_unique(__first, __last); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_tree.h:1095:58: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1095 | __enable_if_t<__same_value_type<_InputIterator>::value> | ^~~~~ /usr/include/c++/14/bits/stl_map.h: In instantiation of 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]': a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_tree.h:1105:9: note: candidate: 'template<class _InputIterator> std::__enable_if_t<((bool)(! std::is_same<_Val, typename std::iterator_traits<_Iter>::value_type>::value))> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_range_unique(_InputIterator, _InputIterator) [with _Key = long long int; _Val = std::pair<const long long int, int>; _KeyOfValue = std::_Select1st<std::pair<const long long int, int> >; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 1105 | _M_insert_range_unique(_InputIterator __first, _InputIterator __last) | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_tree.h:1105:9: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_tree.h: In substitution of 'template<class _InputIterator> std::__enable_if_t<((bool)(! std::is_same<std::pair<const long long int, int>, typename std::iterator_traits< <template-parameter-1-1> >::value_type>::value)), void> std::_Rb_tree<long long int, std::pair<const long long int, int>, std::_Select1st<std::pair<const long long int, int> >, std::less<long long int>, std::allocator<std::pair<const long long int, int> > >::_M_insert_range_unique(_InputIterator, _InputIterator) [with _InputIterator = int]': /usr/include/c++/14/bits/stl_map.h:287:31: required from 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 287 | { _M_t._M_insert_range_unique(__first, __last); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_tree.h:1104:59: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1104 | __enable_if_t<!__same_value_type<_InputIterator>::value> | ^~~~~
s862654799
p00324
C++
#include <map> #include <algorithm> #include <cstdio> using namespace std; int main(){ map<long long,int>m={0,-1}; long long s=0,x; int N,r=0; scanf("%d",&N); for(int i=0;i<N;i++){ scanf("%lld",&x); s+=x; if(m.find(s)==m.end())m[s]=i; r=max(r,i-m[s]); } printf("%d\n",r); }
In file included from /usr/include/c++/14/map:63, from a.cc:1: /usr/include/c++/14/bits/stl_map.h: In instantiation of 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]': a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_map.h:287:38: error: no matching function for call to 'std::_Rb_tree<long long int, std::pair<const long long int, int>, std::_Select1st<std::pair<const long long int, int> >, std::less<long long int>, std::allocator<std::pair<const long long int, int> > >::_M_insert_range_unique(int&, int&)' 287 | { _M_t._M_insert_range_unique(__first, __last); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/map:62: /usr/include/c++/14/bits/stl_tree.h:1096:9: note: candidate: 'template<class _InputIterator> std::__enable_if_t<((bool)std::is_same<_Val, typename std::iterator_traits<_Iter>::value_type>::value)> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_range_unique(_InputIterator, _InputIterator) [with _Key = long long int; _Val = std::pair<const long long int, int>; _KeyOfValue = std::_Select1st<std::pair<const long long int, int> >; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 1096 | _M_insert_range_unique(_InputIterator __first, _InputIterator __last) | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_tree.h:1096:9: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_tree.h: In substitution of 'template<class _InputIterator> std::__enable_if_t<((bool)std::is_same<std::pair<const long long int, int>, typename std::iterator_traits< <template-parameter-1-1> >::value_type>::value), void> std::_Rb_tree<long long int, std::pair<const long long int, int>, std::_Select1st<std::pair<const long long int, int> >, std::less<long long int>, std::allocator<std::pair<const long long int, int> > >::_M_insert_range_unique(_InputIterator, _InputIterator) [with _InputIterator = int]': /usr/include/c++/14/bits/stl_map.h:287:31: required from 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 287 | { _M_t._M_insert_range_unique(__first, __last); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_tree.h:1095:58: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1095 | __enable_if_t<__same_value_type<_InputIterator>::value> | ^~~~~ /usr/include/c++/14/bits/stl_map.h: In instantiation of 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]': a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_tree.h:1105:9: note: candidate: 'template<class _InputIterator> std::__enable_if_t<((bool)(! std::is_same<_Val, typename std::iterator_traits<_Iter>::value_type>::value))> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_range_unique(_InputIterator, _InputIterator) [with _Key = long long int; _Val = std::pair<const long long int, int>; _KeyOfValue = std::_Select1st<std::pair<const long long int, int> >; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 1105 | _M_insert_range_unique(_InputIterator __first, _InputIterator __last) | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_tree.h:1105:9: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_tree.h: In substitution of 'template<class _InputIterator> std::__enable_if_t<((bool)(! std::is_same<std::pair<const long long int, int>, typename std::iterator_traits< <template-parameter-1-1> >::value_type>::value)), void> std::_Rb_tree<long long int, std::pair<const long long int, int>, std::_Select1st<std::pair<const long long int, int> >, std::less<long long int>, std::allocator<std::pair<const long long int, int> > >::_M_insert_range_unique(_InputIterator, _InputIterator) [with _InputIterator = int]': /usr/include/c++/14/bits/stl_map.h:287:31: required from 'std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = long long int; _Tp = int; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, int> >]' 287 | { _M_t._M_insert_range_unique(__first, __last); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ a.cc:7:27: required from here 7 | map<long long,int>m={0,-1}; | ^ /usr/include/c++/14/bits/stl_tree.h:1104:59: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1104 | __enable_if_t<!__same_value_type<_InputIterator>::value> | ^~~~~
s139451462
p00324
C++
#include <iostream> #include <algorithm> #include <array> #include <cstdint> #include <functional> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string> #include <utility> #include <vector> #define INF 1000000000 #define MOD 1000000007 #define rep(i,a,b) for(uint32 i = (a); i < (b); ++i) #define bitget(a,b) (((a) >> (b)) & 1) #define ALL(x) (x).begin(),(x).end() #define scanf scanf_s using int32 = std::int_fast32_t; using int64 = std::int_fast64_t; using uint32 = std::uint_fast32_t; using uint64 = std::uint_fast64_t; template<typename T> class hashmap64 { std::vector<std::pair<uint64, T>> map; uint64 mask, temp, count; uint64 hash64(uint64 key) { key = ~key; key ^= key << 13; key ^= key >> 19; return key ^ (key << 17); } public: hashmap64() :map(8192, std::make_pair(~static_cast<std::uint_fast64_t>(0), T())) { mask = 8191; count = 0; } hashmap64(size_t s) { s |= s << 1; s |= s >> 2; s |= s >> 4; s |= s >> 8; s |= s >> 16; s |= s >> 32; mask = s; count = 0; map.resize(s + 1, std::make_pair(~static_cast<std::uint_fast64_t>(0), T())); } T &operator[](uint64 suf) { temp = mask&hash64(suf); while (map[temp].first != suf) { temp = mask&(temp + 1); } return map[temp].second; } void insert(uint64 key, const T &value) { temp = mask&hash64(key); while (~map[temp].first) { if (map[temp].first == key) { map[temp].second = value; return; } temp = mask&(temp + 1); } map[temp] = std::make_pair(key, value); ++count; if ((count << 1) > mask) { std::pair<uint64, T> mkey; uint64 t = mask; mask = mask << 1 | 1; map.resize(mask + 1, std::make_pair(~static_cast<std::uint_fast64_t>(0), T())); while (~map[t].first) { --t; } while (++t <= (mask >> 1)) { mkey = map[t]; map[t].first = ~static_cast<std::uint_fast64_t>(0); temp = mask&hash64(mkey.first); while (~map[temp].first) { temp = mask&(temp + 1); } map[temp] = mkey; } for (t = 0;t <= mask >> 1;++t) { if (~map[t].first) { mkey = map[t]; map[t].first = ~static_cast<std::uint_fast64_t>(0); temp = mask&hash64(mkey.first); while (~map[temp].first) { temp = mask&(temp + 1); } map[temp] = mkey; } } } return; } bool find(uint64 key) { temp = mask&hash64(key); while (~map[temp].first) { if (map[temp].first == key) { return true; } temp = mask&(temp + 1); } return false; } bool empty(void) { return !count; } size_t size(void) { return count; } }; int main(void) { //std::ios::sync_with_stdio(false); std::cin.tie(0); hashmap64<uint32> map(200001); uint32 n; scanf("%u", &n); int64 a, sum = 1e15; uint32 ans = 0; map.insert(sum, 0); rep(i, 0, n) { scanf("%lld", &a); sum += a; if (map.find(sum)) { ans = std::max(ans, i + 1 - map[sum]); } else { map.insert(sum, i + 1); } } printf("%u\n", ans); return 0; }
a.cc: In function 'int main()': a.cc:20:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 20 | #define scanf scanf_s | ^~~~~~~ a.cc:125:9: note: in expansion of macro 'scanf' 125 | scanf("%u", &n); | ^~~~~
s207202442
p00324
C++
#include <iostream> #include <algorithm> #include <array> #include <cstdint> #include <functional> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string> #include <utility> #include <vector> #define NOMINMAX #include <windows.h> #define INF 1000000000 #define MOD 1000000007 #define rep(i,a,b) for(uint32 i = (a); i < (b); ++i) #define bitget(a,b) (((a) >> (b)) & 1) #define ALL(x) (x).begin(),(x).end() #define C(x) std::cout << #x << " : " << x << std::endl #define scanf scanf_s using int32 = std::int_fast32_t; using int64 = std::int_fast64_t; using uint32 = std::uint_fast32_t; using uint64 = std::uint_fast64_t; template<typename Key, typename Value> class hashmap { std::vector<std::pair<Key, Value>> map; uint64 mask, temp, rand, count; public: hashmap() :map(8192, std::make_pair(~static_cast<Key>(0), Value())) { mask = 8191; count = 0; rand = GetTickCount(); } hashmap(size_t s) { s |= s << 1; s |= s >> 2; s |= s >> 4; s |= s >> 8; s |= s >> 16; s |= s >> 32; mask = s; rand = GetTickCount(); count = 0; map.resize(s + 1, std::make_pair(~static_cast<Key>(0), Value())); } Value &operator[](Key suf) { temp = mask&std::hash<Key>()(suf^rand); while (map[temp].first != suf) { temp = mask&(temp + 1); } return map[temp].second; } void insert(Key key, const Value &value) { temp = mask&std::hash<Key>()(key^rand); while (~map[temp].first) { if (map[temp].first == key) { map[temp].second = value; return; } temp = mask&(temp + 1); } map[temp] = std::make_pair(key, value); ++count; if ((count << 1) > mask) { std::pair<Key, Value> mkey; uint64 t = mask; mask = mask << 1 | 1; map.resize(mask + 1, std::make_pair(~static_cast<Key>(0), Value())); while (~map[t].first) { --t; } while (++t <= (mask >> 1)) { mkey = map[t]; map[t].first = ~static_cast<Key>(0); temp = mask&std::hash<Key>()(mkey.first^rand); while (~map[temp].first) { temp = mask&(temp + 1); } map[temp] = mkey; } for (t = 0;t <= mask >> 1;++t) { if (~map[t].first) { mkey = map[t]; map[t].first = ~static_cast<Key>(0); temp = mask&std::hash<Key>()(mkey.first^rand); while (~map[temp].first) { temp = mask&(temp + 1); } map[temp] = mkey; } } } return; } bool find(Key key) { temp = mask&std::hash<Key>()(key^rand); while (~map[temp].first) { if (map[temp].first == key) { return true; } temp = mask&(temp + 1); } return false; } bool empty(void) { return !count; } size_t size(void) { return count; } }; int main(void) { std::ios::sync_with_stdio(false); std::cin.tie(0); hashmap<uint64,uint32> map(1); uint32 n; std::cin >> n; int64 a, sum = 1LL<<50; uint32 ans = 0; map.insert(sum, 0); rep(i, 0, n) { std::cin >> a; sum += a; if (map.find(sum)) { ans = std::max(ans, i + 1 - map[sum]); } else { map.insert(sum, i + 1); } } std::cout << ans << "\n"; return 0; }
a.cc:15:10: fatal error: windows.h: No such file or directory 15 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s738775168
p00324
C++
#include <iostream> #include <algorithm> #include <array> #include <cstdint> #include <functional> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string> #include <utility> #include <vector> #define NOMINMAX #include <Windows.h> #define INF 1000000000 #define MOD 1000000007 #define rep(i,a,b) for(uint32 i = (a); i < (b); ++i) #define bitget(a,b) (((a) >> (b)) & 1) #define ALL(x) (x).begin(),(x).end() #define C(x) std::cout << #x << " : " << x << std::endl #define scanf scanf_s using int32 = std::int_fast32_t; using int64 = std::int_fast64_t; using uint32 = std::uint_fast32_t; using uint64 = std::uint_fast64_t; template<typename Key, typename Value> class hashmap { std::vector<std::pair<Key, Value>> map; uint64 mask, temp, rand, count; public: hashmap() :map(8192, std::make_pair(~static_cast<Key>(0), Value())) { mask = 8191; count = 0; rand = GetTickCount(); } hashmap(size_t s) { s |= s << 1; s |= s >> 2; s |= s >> 4; s |= s >> 8; s |= s >> 16; s |= s >> 32; mask = s; rand = GetTickCount(); count = 0; map.resize(s + 1, std::make_pair(~static_cast<Key>(0), Value())); } Value &operator[](Key suf) { temp = mask&std::hash<Key>()(suf^rand); while (map[temp].first != suf) { temp = mask&(temp + 1); } return map[temp].second; } void insert(Key key, const Value &value) { temp = mask&std::hash<Key>()(key^rand); while (~map[temp].first) { if (map[temp].first == key) { map[temp].second = value; return; } temp = mask&(temp + 1); } map[temp] = std::make_pair(key, value); ++count; if ((count << 1) > mask) { std::pair<Key, Value> mkey; uint64 t = mask; mask = mask << 1 | 1; map.resize(mask + 1, std::make_pair(~static_cast<Key>(0), Value())); while (~map[t].first) { --t; } while (++t <= (mask >> 1)) { mkey = map[t]; map[t].first = ~static_cast<Key>(0); temp = mask&std::hash<Key>()(mkey.first^rand); while (~map[temp].first) { temp = mask&(temp + 1); } map[temp] = mkey; } for (t = 0;t <= mask >> 1;++t) { if (~map[t].first) { mkey = map[t]; map[t].first = ~static_cast<Key>(0); temp = mask&std::hash<Key>()(mkey.first^rand); while (~map[temp].first) { temp = mask&(temp + 1); } map[temp] = mkey; } } } return; } bool find(Key key) { temp = mask&std::hash<Key>()(key^rand); while (~map[temp].first) { if (map[temp].first == key) { return true; } temp = mask&(temp + 1); } return false; } bool empty(void) { return !count; } size_t size(void) { return count; } }; int main(void) { std::ios::sync_with_stdio(false); std::cin.tie(0); hashmap<uint64,uint32> map(1); uint32 n; std::cin >> n; int64 a, sum = 1LL<<50; uint32 ans = 0; map.insert(sum, 0); rep(i, 0, n) { std::cin >> a; sum += a; if (map.find(sum)) { ans = std::max(ans, i + 1 - map[sum]); } else { map.insert(sum, i + 1); } } std::cout << ans << "\n"; return 0; }
a.cc:15:10: fatal error: Windows.h: No such file or directory 15 | #include <Windows.h> | ^~~~~~~~~~~ compilation terminated.
s231000268
p00325
C++
#include <stdio.h> #include <cmath> #include <algorithm> #include <cfloat> #include <stack> #include <queue> #include <vector> #include <string> #include <iostream> #include <set> #include <map> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define MOD 1000000007 #define EPS 0.000000001 using namespace std; enum ORDER{ ADD, SUB, SET, IF, HALT, }; struct Info{ ORDER order; char var1,var2,var3; int con; }; int current_var[26]; int history_var[50][26]; int line[50],rev_line[1001]; Info info[50]; bool is_jumped[50]; char table[50][51]; int main(){ for(int i = 0; i <= 1000; i++)rev_line[i] = -1; for(int i = 0; i < 26; i++)current_var[i] = -1; for(int i = 0; i < 50; i++){ for(int k = 0; k < 26; k++)history_var[i][k] = -1; } for(int i = 0; i < 50; i++)is_jumped[i] = false; int N; scanf("%d",&N); getchar(); int tmp,index; for(int i = 0; i < N; i++){ fgets(table[i],50,stdin); //?????????????????? tmp = 0; for(index = 0; table[i][index] != ' '; index++){ tmp = 10*tmp+table[i][index]-'0'; } line[i] = tmp; rev_line[tmp] = i; index++; switch(table[i][index]){ case 'A': //ADD info[i].order = ADD; index += 4; info[i].var1 = table[i][index]; current_var[info[i].var1-'a'] = 0; index += 2; info[i].var2 = table[i][index]; current_var[info[i].var2-'a'] = 0; index += 2; if(table[i][index] >= 'a' && table[i][index] <= 'z'){ info[i].var3 = table[i][index]; current_var[info[i].var3-'a'] = 0; }else{ tmp = 0; for(;table[i][index] >= '0' && table[i][index] <= '9';index++){ tmp = 10*tmp + table[i][index]-'0'; } info[i].var3 = '@'; info[i].con = tmp; } break; case 'S': if(table[i][index+1] == 'U'){ info[i].order = SUB; index += 4; info[i].var1 = table[i][index]; current_var[info[i].var1-'a'] = 0; index += 2; info[i].var2 = table[i][index]; current_var[info[i].var2-'a'] = 0; index += 2; if(table[i][index] >= 'a' && table[i][index] <= 'z'){ info[i].var3 = table[i][index]; current_var[info[i].var3-'a'] = 0; }else{ tmp = 0; for(;table[i][index] >= '0' && table[i][index] <= '9';index++){ tmp = 10*tmp + table[i][index]-'0'; } info[i].var3 = '@'; info[i].con = tmp; } }else{ info[i].order = SET; index += 4; info[i].var1 = table[i][index]; current_var[info[i].var1-'a'] = 0; index += 2; if(table[i][index] >= 'a' && table[i][index] <= 'z'){ info[i].var2 = table[i][index]; current_var[info[i].var2-'a'] = 0; }else{ tmp = 0; for(;table[i][index] >= '0' && table[i][index] <= '9';index++){ tmp = 10*tmp + table[i][index]-'0'; } info[i].var2 = '@'; info[i].con = tmp; } } break; case 'I': info[i].order = IF; index += 3; info[i].var1 = table[i][index]; current_var[info[i].var1-'a'] = 0; index += 2; tmp = 0; for( ;table[i][index] >= '0' && table[i][index] <= '9'; index++){ tmp = 10*tmp+table[i][index]-'0'; } info[i].con = tmp; break; case 'H': info[i].order = HALT; break; } } bool LOOP_FLG = false,HALT_FLG = false; int line = 0; int tmp_1,tmp_2; while(true){ switch(info[line].order){ case ADD: tmp_1 = current_var[info[line].var2-'a']; if(info[line].var3 == '@'){ tmp_2 = info[line].con; }else{ tmp_2 = current_var[info[line].var3-'a']; } if(tmp_1+tmp_2 >= 16){ HALT_FLG = true; }else{ current_var[info[line].var1-'a'] = tmp_1+tmp_2; } line++; break; case SUB: tmp_1 = current_var[info[line].var2-'a']; if(info[line].var3 == '@'){ tmp_2 = info[line].con; }else{ tmp_2 = current_var[info[line].var3-'a']; } if(tmp_1-tmp_2 < 0){ HALT_FLG = true; }else{ current_var[info[line].var1-'a'] = tmp_1-tmp_2; } line++; break; case SET: if(info[line].var2 == '@'){ tmp_1 = info[line].con; }else{ tmp_1 = current_var[info[line].var2-'a']; } if(tmp_1 < 0 || tmp_1 >= 16){ HALT = true; }else{ current_var[info[line].var1-'a'] = tmp_1; } line++; break; case IF: if(current_var[info[line].var1-'a'] == 0){ line++; }else{ //?????£???????????? if(rev_line[info[line].con] == -1){ //?????£??????????????£?????? HALT_FLG = true; }else{ if(is_jumped[line] == false){ is_jumped[line] = true; for(int i = 0; i < 26; i++){ history_var[line][i] = current_var[i]; } line = rev_line[info[line].con]; }else{ LOOP_FLG = true; for(int i = 0; i < 26; i++){ if(history_var[line][i] != current_var[i]){ LOOP_FLG = false; break; } } if(!LOOP_FLG){ line = rev_line[info[line].con]; for(int i = 0; i < 26; i++){ history_var[line][i] = current_var[i]; } } } } } break; case HALT: HALT_FLG = true; break; } if(line == N || LOOP_FLG == true || HALT_FLG == true)break; } if(LOOP_FLG){ printf("inf\n"); }else{ for(int i = 0; i < 26; i++){ if(current_var[i] != -1){ printf("%c=%d\n",'a'+i,current_var[i]); } } } return 0; }
a.cc: In function 'int main()': a.cc:202:33: error: lvalue required as left operand of assignment 202 | HALT = true; | ^~~~
s778624970
p00325
C++
#include <bits/stdc++.h> using namespace std; vector<vector<string> > orders; vector<int> lists; map<string,int> m; map<string,int> bif; bool is_inf = false; std::vector<std::string> split(const std::string &str, char sep){ std::vector<std::string> v; std::stringstream ss(str); std::string buffer; while( std::getline(ss, buffer, sep) ) { v.push_back(buffer); } return v; } bool ADD(vector<string> vec,bool is_halt){ m[vec[1]] = m[vec[1]]; int con; if(isdigit(vec[3])){ stringstream ss; ss << vec[3]; ss >> con; if(m[vec[2]] + con < 16 && m[vec[2]] + con >= 0 && !is_halt) { m[vec[1]] = m[vec[2]] + con; } else{ return false; } } else{ if(m[vec[2]] + m[vec[3]] < 16 && m[vec[2]] + m[vec[3]] >= 0 && !is_halt) { m[vec[1]] = m[vec[2]] + m[vec[3]]; } else{ return false; } } return true; } bool SUB(vector<string> vec,bool is_halt){ m[vec[1]] = m[vec[1]]; int con; if(isdigit(vec[3])){ stringstream ss; ss << vec[3]; ss >> con; if(m[vec[2]] - con >= 0 && !is_halt) { m[vec[1]] = m[vec[2]] - con; } else{ return false; } } else{ if(m[vec[2]] - m[vec[3]] >= 0 && !is_halt) { m[vec[1]] = m[vec[2]] - m[vec[3]]; } else{ return false; } } return true; } bool SET(vector<string> vec,bool is_halt){ m[vec[1]] = m[vec[1]]; int con; if(isdigit(vec[2])){ stringstream ss; ss << vec[2]; ss >> con; if(con >= 0 && con < 16 && !is_halt) { m[vec[1]] = con; } else{ return false; } } else{ if(m[vec[2]] >= 0 && m[vec[2]] < 16 && !is_halt) { m[vec[1]] = m[vec[2]]; } else{ return false; } } return true; } bool IF(vector<string> vec,bool is_halt){ if(m[vec[1]] == 0){ return false; } int dest; stringstream ss; ss << vec[2]; ss >> dest; int index = 0; lists.push_back(dest); while(1){ if(lists[index] == dest){ break; } index++; } lists.pop_back(); if(index == lists.size()){ return false; } bif[vec[1]] = m[vec[1]];//if????????????????????? int stopline = lists.size()-1; while(stopline != index){ if(orders[index][0][0] == 'A'){//ADD if(!ADD(orders[index],is_halt)){ is_halt = true; } } else if(orders[index][0][0] == 'S' && orders[index][0][1] == 'U'){//SUB if(!SUB(orders[index],is_halt)){ is_halt = true; } } else if(orders[index][0][0] == 'S' && orders[index][0][1] == 'E'){//SET if(!SET(orders[index],is_halt)){ is_halt = true; } } else if(orders[index][0][0] == 'I'){//IF if(!IF(orders[index],is_halt)){ is_halt = true; } } index++; } if(bif[vec[1]] == m[vec[1]]){ is_inf = true; } else{ IF(vec,is_halt); } return true; } int main() { int n; cin >> n; cin.ignore(); bool is_halt = false; while(n--){ int line; cin >> line; cin.ignore(); string s; getline(cin,s); vector<string> vec; vec = split(s,' '); lists.push_back(line); orders.push_back(vec); if(s[0] == 'A'){//ADD if(!ADD(vec,is_halt)){ is_halt = true; } } else if(s[0] == 'S' && s[1] == 'U'){//SUB if(!SUB(vec,is_halt)){ is_halt = true; } } else if(s[0] == 'S' && s[1] == 'E'){//SET if(!SET(vec,is_halt)){ is_halt = true; } } else if(s[0] == 'I'){//IF if(!IF(vec,is_halt)){ is_halt = true; } if(is_inf){ cout << "inf" << endl; return 0; } } else{//HALT is_halt = true; } } for(map<string,int>::iterator itr = m.begin(); itr != m.end(); itr++){ cout << itr->first << "=" << itr->second << endl; } return 0; }
a.cc: In function 'bool ADD(std::vector<std::__cxx11::basic_string<char> >, bool)': a.cc:27:15: error: no matching function for call to 'isdigit(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)' 27 | if(isdigit(vec[3])){ | ~~~~~~~^~~~~~~~ In file included from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46, from /usr/include/c++/14/istream:40, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/bits/locale_facets.h:2649:5: note: candidate: 'template<class _CharT> bool std::isdigit(_CharT, const locale&)' 2649 | isdigit(_CharT __c, const locale& __loc) | ^~~~~~~ /usr/include/c++/14/bits/locale_facets.h:2649:5: note: candidate expects 2 arguments, 1 provided In file included from /usr/include/c++/14/cctype:42, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:35: /usr/include/ctype.h:111:1: note: candidate: 'int isdigit(int)' 111 | __exctype (isdigit); | ^~~~~~~~~ /usr/include/ctype.h:111:1: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'int' 111 | __exctype (isdigit); | ^~~~~~~~~ a.cc: In function 'bool SUB(std::vector<std::__cxx11::basic_string<char> >, bool)': a.cc:57:15: error: no matching function for call to 'isdigit(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)' 57 | if(isdigit(vec[3])){ | ~~~~~~~^~~~~~~~ /usr/include/c++/14/bits/locale_facets.h:2649:5: note: candidate: 'template<class _CharT> bool std::isdigit(_CharT, const locale&)' 2649 | isdigit(_CharT __c, const locale& __loc) | ^~~~~~~ /usr/include/c++/14/bits/locale_facets.h:2649:5: note: candidate expects 2 arguments, 1 provided /usr/include/ctype.h:111:1: note: candidate: 'int isdigit(int)' 111 | __exctype (isdigit); | ^~~~~~~~~ /usr/include/ctype.h:111:1: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'int' 111 | __exctype (isdigit); | ^~~~~~~~~ a.cc: In function 'bool SET(std::vector<std::__cxx11::basic_string<char> >, bool)': a.cc:86:15: error: no matching function for call to 'isdigit(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)' 86 | if(isdigit(vec[2])){ | ~~~~~~~^~~~~~~~ /usr/include/c++/14/bits/locale_facets.h:2649:5: note: candidate: 'template<class _CharT> bool std::isdigit(_CharT, const locale&)' 2649 | isdigit(_CharT __c, const locale& __loc) | ^~~~~~~ /usr/include/c++/14/bits/locale_facets.h:2649:5: note: candidate expects 2 arguments, 1 provided /usr/include/ctype.h:111:1: note: candidate: 'int isdigit(int)' 111 | __exctype (isdigit); | ^~~~~~~~~ /usr/include/ctype.h:111:1: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'int' 111 | __exctype (isdigit); | ^~~~~~~~~
s314235513
p00327
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define pb push_back #define rep(i, a, n) for(int i = (a); i < (n); i++) #define dep(i, a, n) for(int i = (a); i >= (n); i--) #define mod 1e9+7 __attribute__((constructor)) void initial() { cin.tie(0); ios::sync_with_stdio(false); } int main() { int n, a[100], b, f[100] = {}; cin >> n; if(n == 1) { cout << "no" << endl; return 0; } rep(i, 0, n) cin >> a[i]; stack<int> s; stack<int> li; map<int, int> mp; s.push(a[0]); int r = false; rep(i, 1, n) { if(s.size() > 0 && s.top() == a[i]) mp[a[i]] = i, r = true; else { if(r) { s.pop, r = false, i--; continue; } if(!mp[a[i]]) s.push(a[i]); else if(s.size() == 0) continue; else s.push(a[i]); } } if(r) s.pop(); if(s.size() > 0) cout << "no" << endl; else cout << "yes" << endl; }
a.cc: In function 'int main()': a.cc:35:11: error: invalid use of non-static member function 'void std::stack<_Tp, _Sequence>::pop() [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]' 35 | s.pop, r = false, i--; | ~~^~~ In file included from /usr/include/c++/14/stack:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:160, from a.cc:1: /usr/include/c++/14/bits/stl_stack.h:291:7: note: declared here 291 | pop() | ^~~
s162087620
p00328
C++
#include<vector> #include<unordered_map> #include<algorithm> class Compression { public: Compression(const std::vector<int>& list) : value_(list) { std::sort(begin(value_), end(value_)); value_.erase(std::unique(begin(value_), end(value_)), end(value_)); for(int i = 0; i < value_.size(); ++i) index_[value_[i]] = i; } int size() const {return value_.size();} int index(const int v) const {return index_.at(v);} int operator[](const int i) const {return value_.at(i);} private: std::unordered_map<int, int> index_; std::vector<int> value_; }; #include<bits/stdc++.h> using namespace std; class SegmentTree { public: explicit SegmentTree(int n) : size_(1) { while(size_ < n) size_ <<= 1; v_.assign(size_ << 1, set<int>()); } void update(int a, int b, int v) {update(a, b + 1, v, 1, 0, size_);} bool find(int a, int b, int c, int d) const {return find(a, b + 1, c, d, 1, 0, size_);} private: int left_child(int k) const {return k << 1;} int right_child(int k) const {return (k << 1) + 1;} void update(int a, int b, int v, int k, int l, int r) { if(b <= l || r <= a) return; if(a <= l && r <= b) {v_.at(k).insert(v); return;} update(a, b, v, left_child(k), l, (l+r)/2); update(a, b, v, right_child(k), (l+r)/2, r); } bool find(int a, int b, int c, int d, int k, int l, int r) const { if(b <= l || r <= a) return false; if(v_.at(k).lower_bound(c) != v_.at(k).upper_bound(d)) return true; if(a <= l && r <= b) return false; auto vl = find(a, b, c, d, left_child(k), l, (l+r)/2); auto vr = find(a, b, c, d, right_child(k), (l+r)/2, r); return vl || vr; } int size_; vector<set<int>> v_; }; int main() { int N; cin >> N; vector<int> px(N), py(N), qx(N), qy(N); for(int i = 0; i < N; ++i) { cin >> px[i] >> py[i] >> qx[i] >> qy[i]; if(px[i] > qx[i]) swap(px[i], qx[i]); if(py[i] > qy[i]) swap(py[i], qy[i]); } vector<int> x, y; for(auto c: {px, qx}) for(auto i: c) x.emplace_back(i); for(auto c: {py, qy}) for(auto i: c) y.emplace_back(i); Compression cx(x), cy(y); for(auto c: {&px, &qx}) for(auto& i: *c) i = cx.index(i); for(auto c: {&py, &qy}) for(auto& i: *c) i = cy.index(i); const bool IN = false, OUT = true; vector<set<pair<int, bool>>> ph(cy.size()), pv(cx.size()); auto dual = [](auto& p, auto i, auto j) { auto l = p.lower_bound({i, IN}); auto h = p.upper_bound({j, OUT}); if(l != h) return true; if(h == p.end()) return false; if(h->second == OUT) return true; return false; }; SegmentTree sh(cx.size()), sv(cy.size()); for(int i = 0; i < N; ++i) { if(px[i] == qx[i]) { if(sh.find(px[i], px[i], py[i], qy[i]) || dual(pv[px[i]], py[i], qy[i])) { cout << 0 << endl; continue; } sv.update(py[i], qy[i], px[i]); pv[px[i]].emplace(py[i], IN); pv[px[i]].emplace(qy[i], OUT); } else { if(sv.find(py[i], py[i], px[i], qx[i]) || dual(ph[py[i]], px[i], qx[i])) { cout << 0 << endl; continue; } sh.update(px[i], qx[i], py[i]); ph[py[i]].emplace(px[i], IN); ph[py[i]].emplace(qx[i], OUT); } cout << 1 << endl; } }
a.cc: In instantiation of 'main()::<lambda(auto:28&, auto:29, auto:30)> [with auto:28 = std::set<std::pair<int, bool> >; auto:29 = int; auto:30 = int]': a.cc:83:53: required from here 83 | if(sh.find(px[i], px[i], py[i], qy[i]) || dual(pv[px[i]], py[i], qy[i])) { | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:72:32: error: 'IN' is not captured 72 | auto l = p.lower_bound({i, IN}); | ^~ a.cc:71:16: note: the lambda has no capture-default 71 | auto dual = [](auto& p, auto i, auto j) { | ^ a.cc:69:14: note: 'const bool IN' declared here 69 | const bool IN = false, OUT = true; | ^~ a.cc:73:32: error: 'OUT' is not captured 73 | auto h = p.upper_bound({j, OUT}); | ^~~ a.cc:71:16: note: the lambda has no capture-default 71 | auto dual = [](auto& p, auto i, auto j) { | ^ a.cc:69:26: note: 'const bool OUT' declared here 69 | const bool IN = false, OUT = true; | ^~~
s884076211
p00329
C++
#include "bits/stdc++.h" using namespace std; typedef vector<short> Weight; struct Edge { int src, dest; int cap, rev; Weight weight; bool operator < (const Edge &rhs) const { for (int i = 0; i < weight.size(); ++i) { if (weight[i] > rhs.weight[i])return true; else if (weight[i] < rhs.weight[i])return false; } return false; } }; Weight operator+(const Weight&l, const Weight&r) { Weight t(l); for (int i = 0; i < l.size(); ++i) { t[i] += r[i]; } return t; } Weight operator-(const Weight&l, const Weight&r) { Weight t(l); for (int i = 0; i < l.size(); ++i) { t[i] -= r[i]; } return t; } Weight operator*(const int&l, const Weight&r) { Weight t(r); for (int i = 0; i < r.size(); ++i) { t[i] *= l; } return t; } const int V =1100; typedef vector<Edge> Edges; typedef vector<Edges> Graph; typedef vector<Weight> Array; typedef vector<Array> Matrix; Weight h[V]; //??????????????£??? Weight dist[V]; //???????????¢ int prevv[V], preve[V]; //??´???????????¨?????? void add_edge(Graph &g, int src, int dest, int cap, Weight weight) { g[src].push_back(Edge{ src, dest, cap, (int)g[dest].size(), weight }); Weight revweight(weight); { for (auto &e : revweight)e = -e; } g[dest].push_back(Edge{ dest, src, 0, (int)g[src].size() - 1, revweight }); } #define REP(i,n) for(int i=0;i<(int)n;++i) #define FOR(i,c) for(auto i=(c).begin();i!=(c).end();++i) #define ALL(c) (c).begin(), (c).end() Weight INF; Weight ZERO; //????????????double?????????eps????????? Weight min_cost_flow(Graph &g, int s, int t, int f) { Weight res = ZERO; for (int i = 0; i < V; ++i)h[i] = ZERO; typedef pair<Weight, int> P; while (f > 0) { priority_queue<P, vector<P>, greater<P> > que; fill(dist, dist + V, INF); dist[s] = ZERO; que.push(make_pair( ZERO, s )); while (!que.empty()) { P p = que.top(); que.pop(); const int v = p.second; if (dist[v] < p.first) continue; REP(i, g[v].size()) { Edge &e = g[v][i]; auto nextw(dist[v] + e.weight + h[v] - h[e.dest]); if (e.cap > 0 && dist[e.dest] > nextw) { dist[e.dest] = move(nextw); prevv[e.dest] = v; preve[e.dest] = i; que.push(make_pair(dist[e.dest], e.dest )); } } } if (dist[t] == INF)return vector<int>(0, 0); REP(v, V) h[v] = h[v] + dist[v]; int d = f; for (int v = t; v != s; v = prevv[v]) d = min(d, g[prevv[v]][preve[v]].cap); f -= d; res = res + d * h[t]; for (int v = t; v != s; v = prevv[v]) { Edge &e = g[prevv[v]][preve[v]]; e.cap -= d; g[v][e.rev].cap += d; } } return res; } int main() { int N; cin >> N; INF = vector<int>(N - 1,1000); ZERO = vector<int>(N - 1, 0); const int start = 0; const int in = start + 1; const int out = in + (N - 1); const int goal = out + (N - 1); Graph g(goal + 1); for (int i = 0; i < N - 1; ++i) { add_edge(g, start, in + i, 1, ZERO); } for (int i = 0; i < N - 1; ++i) { for (int j = 0; j < N - 1; ++j) { int a; cin >> a; if (a) { Weight cost(ZERO); cost[j] = i+1; add_edge(g, in + i, out + j, 1, cost); } } } for (int i = 0; i < N - 1; ++i) { add_edge(g, out + i,goal, 1, ZERO); } auto aa = min_cost_flow(g, start, goal, N - 1); if (aa.empty()) { cout << "no" << endl; } else { vector<int>ans(N - 1); for (int i = 0; i < N - 1; ++i) { ans[i] = aa[i]; } cout << "yes" << endl; for (int i = 0; i < N - 1; ++i) { cout << ans[i] << endl; } } return 0; }
a.cc: In function 'Weight min_cost_flow(Graph&, int, int, int)': a.cc:85:43: error: could not convert 'std::vector<int>(0, 0, std::allocator<int>())' from 'vector<int>' to 'vector<short int>' 85 | if (dist[t] == INF)return vector<int>(0, 0); | ^~~~~~~~~~~~~~~~~ | | | vector<int> a.cc: In function 'int main()': a.cc:104:37: error: no match for 'operator=' (operand types are 'Weight' {aka 'std::vector<short int>'} and 'std::vector<int>') 104 | INF = vector<int>(N - 1,1000); | ^ In file included from /usr/include/c++/14/vector:72, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = short int; _Alloc = std::allocator<short int>]' 210 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'std::vector<int>' to 'const std::vector<short int>&' 211 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/14/vector:66: /usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = short int; _Alloc = std::allocator<short int>]' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<short int>&&' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = short int; _Alloc = std::allocator<short int>]' 788 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::initializer_list<short int>' 788 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ a.cc:105:36: error: no match for 'operator=' (operand types are 'Weight' {aka 'std::vector<short int>'} and 'std::vector<int>') 105 | ZERO = vector<int>(N - 1, 0); | ^ /usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = short int; _Alloc = std::allocator<short int>]' 210 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'std::vector<int>' to 'const std::vector<short int>&' 211 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = short int; _Alloc = std::allocator<short int>]' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<short int>&&' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = short int; _Alloc = std::allocator<short int>]' 788 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::initializer_list<short int>' 788 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
s306216090
p00330
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UncheckedIOException; import java.util.StringTokenizer; public class D58 { public static void main(String[] args) { SC sc=new SC(System.in); int a=sc.nextInt(); pl(a*32); } static class SC { private BufferedReader reader = null; private StringTokenizer tokenizer = null; public SC(InputStream in) { reader = new BufferedReader(new InputStreamReader(in)); } public String next() { if (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new UncheckedIOException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String nextLine() { try { return reader.readLine(); } catch (IOException e) { throw new UncheckedIOException(e); } } } public static void pl(Object o) { System.out.println(o); } public static void pl() { System.out.println(); } public static void p(Object o) { System.out.print(o); } }
Main.java:8: error: class D58 is public, should be declared in a file named D58.java public class D58 { ^ 1 error
s272337773
p00330
Java
import java.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int W=sc.nextInt(); System.out.println(W*4); } }
Main.java:1: error: package java does not exist import java.*; ^ Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 3 errors
s926823771
p00330
Java
\import java.util.*; public class Main { public static void main(String[] args) { Scanner in=new Scanner(System.in); System.out.println(32*in.nextInt()); } }
Main.java:1: error: illegal character: '\' \import java.util.*; ^ Main.java:1: error: class, interface, enum, or record expected \import java.util.*; ^ 2 errors
s677193058
p00330
Java
public class ArithInt { public static void main(String [] args) { Scanner stdIn = new Scanner(System.in); int x = stdIn.nextInt(); system.out.println(x*32); } }
Main.java:1: error: class ArithInt is public, should be declared in a file named ArithInt.java public class ArithInt { ^ Main.java:4: error: cannot find symbol Scanner stdIn = new Scanner(System.in); ^ symbol: class Scanner location: class ArithInt Main.java:4: error: cannot find symbol Scanner stdIn = new Scanner(System.in); ^ symbol: class Scanner location: class ArithInt Main.java:8: error: package system does not exist system.out.println(x*32); ^ 4 errors
s913106976
p00330
Java
public class ArithInt { public static void main(String [] args) { Scanner stdIn = new Scanner(System.in); int x = stdIn.nextInt(); system.out.println(+ x*32); } }
Main.java:1: error: class ArithInt is public, should be declared in a file named ArithInt.java public class ArithInt { ^ Main.java:4: error: cannot find symbol Scanner stdIn = new Scanner(System.in); ^ symbol: class Scanner location: class ArithInt Main.java:4: error: cannot find symbol Scanner stdIn = new Scanner(System.in); ^ symbol: class Scanner location: class ArithInt Main.java:8: error: package system does not exist system.out.println(+ x*32); ^ 4 errors
s306526583
p00330
Java
public class ArithInt { public static void main(String [] args) { Scanner stdIn = new Scanner(System.in); int x = stdIn.nextInt(); system.out.println(+ (x*32)); } }
Main.java:1: error: class ArithInt is public, should be declared in a file named ArithInt.java public class ArithInt { ^ Main.java:4: error: cannot find symbol Scanner stdIn = new Scanner(System.in); ^ symbol: class Scanner location: class ArithInt Main.java:4: error: cannot find symbol Scanner stdIn = new Scanner(System.in); ^ symbol: class Scanner location: class ArithInt Main.java:8: error: package system does not exist system.out.println(+ (x*32)); ^ 4 errors
s018343395
p00330
Java
public class ArithInt { public static void main(String [] args) { Scanner stdIn = new Scanner(System.in); int x = stdIn.nextInt(); System.out.println(x*32); } }
Main.java:1: error: class ArithInt is public, should be declared in a file named ArithInt.java public class ArithInt { ^ Main.java:4: error: cannot find symbol Scanner stdIn = new Scanner(System.in); ^ symbol: class Scanner location: class ArithInt Main.java:4: error: cannot find symbol Scanner stdIn = new Scanner(System.in); ^ symbol: class Scanner location: class ArithInt 3 errors
s248562268
p00330
Java
import java.util.Scanner; public class ArithInt { public static void main(String [] args) { Scanner stdIn = new Scanner(System.in); int x = stdIn.nextInt(); System.out.println(x*32); } }
Main.java:3: error: class ArithInt is public, should be declared in a file named ArithInt.java public class ArithInt { ^ 1 error
s258545403
p00330
Java
import java.util.Scanner; public class ArithInt { public static void main(String [] args) { Scanner stdIn = new Scanner(System.in); int x = stdIn.nextInt(); System.out.println(x*32); } }
Main.java:3: error: class ArithInt is public, should be declared in a file named ArithInt.java public class ArithInt { ^ 1 error
s283079011
p00330
Java
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); int a = stdIn.nextInt(); int x = stdIn * 32; System.out.println(x); } }
Main.java:11: error: bad operand types for binary operator '*' int x = stdIn * 32; ^ first type: Scanner second type: int 1 error
s605847496
p00330
C
#include <stdio.h> int main(void) { int W; scanf("%d",&W); printf("%d\n",&W*32); return 0; }
main.c: In function 'main': main.c:6:25: error: invalid operands to binary * (have 'int *' and 'int') 6 | printf("%d\n",&W*32); | ~~^ | | | int *
s316673227
p00330
C
#include<algorithm> #include <iostream> #include <math.h> #include <cstdio> #include <string.h> using namespace std; int main(void){ int w; cin>>w; cout<<w*32<<endl; return 0; }
main.c:1:9: fatal error: algorithm: No such file or directory 1 | #include<algorithm> | ^~~~~~~~~~~ compilation terminated.
s118071887
p00330
C++
#include<iostream> using namespace std; int main(){ int W; cin >> W; cout << W*32 << endl; return 0 }
a.cc: In function 'int main()': a.cc:6:11: error: expected ';' before '}' token 6 | return 0 | ^ | ; 7 | } | ~
s812839917
p00330
C++
#include<iostream> using namespace std; int main(){ int N; cin>>N; cout<<32*N<<end; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 7 | cout<<32*N<<end; | ~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 | operator<<(nullptr_t) | ^~~~~~~~ /usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::nullptr_t' 306 | operator<<(nullptr_t) |
s748389711
p00330
C++
#include <iostream> using namespace std; int main(){ int w; cout<<w*4<<endl: }
a.cc: In function 'int main()': a.cc:5:16: error: expected ';' before ':' token 5 | cout<<w*4<<endl: | ^ | ;
s519618852
p00330
C++
#include <iostream> using namespace std; int main(){ int w; cin>>w cout<<w*4<<endl: }
a.cc: In function 'int main()': a.cc:5:7: error: expected ';' before 'cout' 5 | cin>>w | ^ | ; 6 | cout<<w*4<<endl: | ~~~~
s625085710
p00330
C++
#include <iostream> using namespace std; int main(){ int w; cin>>w: cout<<w*4<<endl: }
a.cc: In function 'int main()': a.cc:5:7: error: found ':' in nested-name-specifier, expected '::' 5 | cin>>w: | ^ | :: a.cc:5:6: error: 'w' is not a class, namespace, or enumeration 5 | cin>>w: | ^
s860147605
p00330
C++
#include<bits/stdc++> using namespace std; int main(){ int w; cin >> w; cout << w*4; return 0; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s343040603
p00330
C++
#include <bits/stdc++.h> using space std; int main(){ int W; cin>>W; int x = W / 32; cout<<x<<endl; return 0; }
a.cc:3:7: error: expected nested-name-specifier before 'space' 3 | using space std; | ^~~~~ a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>W; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout<<x<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout<<x<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s809846578
p00330
C++
#include <bit/stdc++.h> using namespace std; int main(){ int W; cin>>W; int x = W * 32; cout<<x<<endl; return 0; }
a.cc:1:10: fatal error: bit/stdc++.h: No such file or directory 1 | #include <bit/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s560423967
p00330
C++
#include <bit/stdc++.h> using namespace std; int main(){ int W; cin>>W; cout<<x = W * 32<<endl; return 0; }
a.cc:1:10: fatal error: bit/stdc++.h: No such file or directory 1 | #include <bit/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s906554397
p00330
C++
#include <bit/stdc++.h> using namespace std; int main(){ int W; cin>>W; cout<<W * 32<<endl; return 0; }
a.cc:1:10: fatal error: bit/stdc++.h: No such file or directory 1 | #include <bit/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s989067119
p00330
C++
#include <bit/stdc++.h> using namespace std; int main(){ int W; cin>>W; cout<<W * 32<<endl; return 0; }
a.cc:1:10: fatal error: bit/stdc++.h: No such file or directory 1 | #include <bit/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s119070354
p00330
C++
#include <bits/stdc++.h> using nameplae std; int main(){ int W; cin>>W; cout<<W*32<<endl: return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'nameplae' 2 | using nameplae std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>W; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<W*32<<endl: | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | cout<<W*32<<endl: | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s253280777
p00330
C++
#include <bits/stdc++.h> using nameplae std; int main(){ int W; cin>>W*32; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'nameplae' 2 | using nameplae std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>W*32; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s851394972
p00330
C++
#include <bits/stdc++.h> using nameplae std; int main(){ int W; cin>>W*32; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'nameplae' 2 | using nameplae std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>W*32; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s369390651
p00330
C++
#include <bits/stdc++.h> using nameplace std; int main(){ int W; cin>>W; cout<<W*32<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'nameplace' 2 | using nameplace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>W; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<W*32<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | cout<<W*32<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s490833520
p00330
C++
#include <bits/stdc++.h> using namespase std; int main(){ int W; cin>> W; cout<< W*32 <<endl; return 0 }
a.cc:2:7: error: expected nested-name-specifier before 'namespase' 2 | using namespase std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>> W; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | cout<< W*32 <<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | cout<< W*32 <<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:9:11: error: expected ';' before '}' token 9 | return 0 | ^ | ; 10 | } | ~
s701248954
p00330
C++
#include <bits/stdc++.h> using namespase std; int main(){ int W; cin>>W; cout<<W*32<<endl; return 0 }
a.cc:2:7: error: expected nested-name-specifier before 'namespase' 2 | using namespase std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>W; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<W*32<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | cout<<W*32<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:8:11: error: expected ';' before '}' token 8 | return 0 | ^ | ; 9 | } | ~
s391429045
p00330
C++
#include <bits/stdc++.h> using namespace std; int main(){ int W; cin>>W; cout<<W*32<<endl; return 0 }
a.cc: In function 'int main()': a.cc:8:11: error: expected ';' before '}' token 8 | return 0 | ^ | ; 9 | } | ~
s403556123
p00330
C++
#include <bits/stdc++.h> using namespace std; int main(){ int W; cin>>W; cout<<W*32<<endl; return 0 }
a.cc: In function 'int main()': a.cc:8:11: error: expected ';' before '}' token 8 | return 0 | ^ | ; 9 | } | ~
s814162296
p00330
C++
#include <bits/stdc++.h> using namespace std; int main(){ int W; cin>>W; cout<<W*32<<endl; return 0 }
a.cc: In function 'int main()': a.cc:8:11: error: expected ';' before '}' token 8 | return 0 | ^ | ; 9 | } | ~
s408551516
p00330
C++
#include <bits/stdc++.h> using namespace std; int main(){ int H; if(-i000<=H&&H<0){ }else if(H=0){ }else if(0<H&&H<=1000){ }else return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i000' was not declared in this scope 7 | if(-i000<=H&&H<0){ | ^~~~
s288048590
p00330
C++
#include <bits/stdc++.h> using namespace std; int main(){ int H; if(-i000<=H&&H<0){ }else if(H=0){ }else if(0<H&&H<=1000){ }else return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i000' was not declared in this scope 7 | if(-i000<=H&&H<0){ | ^~~~
s127910184
p00330
C++
#include <bits/stdc++.h> using namespace std; int main(){ int H; if(-i000<=H&&H<0){ }else if(H=0){ }else if(0<H&&H<=1000){ }else return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i000' was not declared in this scope 7 | if(-i000<=H&&H<0){ | ^~~~
s289245993
p00330
C++
#incluse <bits/stdc++.h> using namespace std; int main(){ int W; cin>>W; cout<<32*W<<endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #incluse; did you mean #include? 1 | #incluse <bits/stdc++.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin>>W; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #incluse <bits/stdc++.h> a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout<<32*W<<endl; | ^~~~ a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:17: error: 'endl' was not declared in this scope 7 | cout<<32*W<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #incluse <bits/stdc++.h>
s176381392
p00330
C++
#incluse <bits/stdc++.h> using namespace std; int main(){ int W; cin>>W; cout<<32*W<<endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #incluse; did you mean #include? 1 | #incluse <bits/stdc++.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin>>W; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #incluse <bits/stdc++.h> a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout<<32*W<<endl; | ^~~~ a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:17: error: 'endl' was not declared in this scope 7 | cout<<32*W<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #incluse <bits/stdc++.h>
s285236480
p00330
C++
#include <iostream> int main() { int n; std::cin >> n; std::out << n * 32 << std::endl; }
a.cc: In function 'int main()': a.cc:6:8: error: 'out' is not a member of 'std'; did you mean 'oct'? 6 | std::out << n * 32 << std::endl; | ^~~ | oct
s879654823
p00330
C++
print(input()*32)
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(input()*32) | ^
s220595849
p00330
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define pb push_back #define rep(i, a, n) for(int i = (a); i < (n); i++) #define dep(i, a, n) for(int i = (a); i >= (n); i--) #define mod 1e9+7 __attribute__((constructor)) void initial() { cin.tie(0); ios::sync_with_stdio(false); } int gcd(int a, int b ) { if(a == 0) return b; return gcd(b % a, a); } bool isPrime(int a) { if(a == 2) return true; if(a < 2 || !(a % 2)) return false; double sq = sqrt(num); for(int i = 3; i <= sq; i += 2) { if(a % i == 0) return false; } return true; } int main() { int w; cin >> w; cout << w * 32 << endl; }
a.cc: In function 'bool isPrime(int)': a.cc:27:20: error: 'num' was not declared in this scope; did you mean 'enum'? 27 | double sq = sqrt(num); | ^~~ | enum
s602803232
p00330
C++
int main() { int w; cin >> w; cout << w * 32 << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin >> w; | ^~~ a.cc:7:9: error: 'cout' was not declared in this scope 7 | cout << w * 32 << endl; | ^~~~ a.cc:7:27: error: 'endl' was not declared in this scope 7 | cout << w * 32 << endl; | ^~~~
s685942343
p00330
C++
import Control.Monad main = readLn >>= print . (*32)
a.cc:1:1: error: 'import' does not name a type 1 | import Control.Monad | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s119571982
p00330
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,; cin>>a; cout<<a*32<<endl; return 0; }
a.cc: In function 'int main()': a.cc:4:15: error: expected unqualified-id before ';' token 4 | int a,; | ^
s122574018
p00330
C++
#include<bits/stdc++.h> using namespace std; int main(){ int W; cin>>W; cout<<W * 32<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:21: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 9 | cout<<W * 32<endl; | ~~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:9:22: note: couldn't deduce template parameter '_Bi_iter' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:9:22: note: couldn't deduce template parameter '_Bi_iter' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout<<W * 32<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 9 | cout<<W * 32<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout<<W * 32<endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:9:22: note: couldn't deduce template parameter '_CharT' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:9:22: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 9 | cout<<W * 32<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Al
s108468570
p00330
C++
#include<bits/stdc++.h> using namespace std; int main(){ int H, R; cin>>H>>R; if(H - R <= 0) cot<<"0"<endl; if(H < 0) cot<<"-1"<endl; if(H > 0) cot<<"1"<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:24: error: 'cot' was not declared in this scope; did you mean 'cos'? 8 | if(H - R <= 0) cot<<"0"<endl; | ^~~ | cos a.cc:9:19: error: 'cot' was not declared in this scope; did you mean 'cos'? 9 | if(H < 0) cot<<"-1"<endl; | ^~~ | cos a.cc:10:19: error: 'cot' was not declared in this scope; did you mean 'cos'? 10 | if(H > 0) cot<<"1"<endl; | ^~~ | cos
s486818602
p00330
C++
#include<bits/stdc++.h> using namespace std; int main(){ int H, R; cin>>H>>R; if(H - R <= 0) cout<<"0"<endl; if(H < 0) cout<<"-1"<endl; if(H > 0) cout<<"1"<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:33: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | if(H - R <= 0) cout<<"0"<endl; | ~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:8:34: note: couldn't deduce template parameter '_Bi_iter' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:8:34: note: couldn't deduce template parameter '_Bi_iter' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:8:34: note: couldn't deduce template parameter '_CharT' 8 | if(H - R <= 0) cout<<"0"<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:8:34: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::ba
s961861092
p00330
C++
#include <bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; cout<<32*x<<endl; return0; }
a.cc: In function 'int main()': a.cc:8:1: error: 'return0' was not declared in this scope 8 | return0; | ^~~~~~~
s468331066
p00330
C++
#include<bits/stdc++.h> using namespace std; int main(){ int h,r; cin>>h>>r; if(h+r>=0){ cout<<1<<endl; } else if(h+r=0){ cout<<0<<endl; } else(h+r<=0){ cout<<-1<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: lvalue required as left operand of assignment 10 | else if(h+r=0){ | ~^~ a.cc:13:17: error: expected ';' before '{' token 13 | else(h+r<=0){ | ^ | ;
s595864676
p00330
C++
#include<bits/stdc++.h> using namespace std; int main(){ int h,r; cin>>h>>r; if(h+r>0){ cout<<1<<endl; } else if(h+r=0){ cout<<0<<endl; } else(h+r<0){ cout<<-1<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: lvalue required as left operand of assignment 10 | else if(h+r=0){ | ~^~ a.cc:13:16: error: expected ';' before '{' token 13 | else(h+r<0){ | ^ | ;
s555856521
p00330
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s895432997
p00330
C++
#include<bits/stdc++.h> using namespace std; int main(){ int W; cin>>W; cout<<W*32<<endl; return 0 }
a.cc: In function 'int main()': a.cc:11:13: error: expected ';' before '}' token 11 | return 0 | ^ | ; 12 | } | ~
s605137429
p00330
C++
int main(){ int W; cin>>W; cout<<W*32<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope 5 | cin>>W; | ^~~ a.cc:7:1: error: 'cout' was not declared in this scope 7 | cout<<W*32<<endl; | ^~~~ a.cc:7:13: error: 'endl' was not declared in this scope 7 | cout<<W*32<<endl; | ^~~~
s683223551
p00330
C++
#include<bits/stdc++.h> using namespace std; #define all(vec) vec.begin(),vec.end() typedef long long int ll; typedef pair<ll,ll> P; const ll MOD=1000000007; const ll INF=1000000010; const ll LINF=4000000000000000010LL; const int MAX=310; const double EPS=1e-9; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; int main(){  int w;cin>>w;  cout<<w*32<<endl; return 0; }
a.cc:14:1: error: extended character   is not valid in an identifier 14 |  int w;cin>>w; | ^ a.cc:15:1: error: extended character   is not valid in an identifier 15 |  cout<<w*32<<endl; | ^ a.cc: In function 'int main()': a.cc:14:1: error: '\U00003000int' was not declared in this scope 14 |  int w;cin>>w; | ^~~~~ a.cc:14:14: error: 'w' was not declared in this scope 14 |  int w;cin>>w; | ^ a.cc:15:1: error: '\U00003000cout' was not declared in this scope 15 |  cout<<w*32<<endl; | ^~~~~~
s514068359
p00330
C++
#include<bits/stdc++.h> using namespace std; #define all(vec) vec.begin(),vec.end() typedef long long int ll; typedef pair<ll,ll> P; const ll MOD=1000000007; const ll INF=1000000010; const ll LINF=4000000000000000010LL; const int MAX=310; const double EPS=1e-9; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; int main(){  int w;cin>>w; cout<<w*32<<endl; return 0; }
a.cc:14:1: error: extended character   is not valid in an identifier 14 |  int w;cin>>w; | ^ a.cc: In function 'int main()': a.cc:14:1: error: '\U00003000int' was not declared in this scope 14 |  int w;cin>>w; | ^~~~~ a.cc:14:14: error: 'w' was not declared in this scope 14 |  int w;cin>>w; | ^
s192803737
p00330
C++
#include<bits/stdc++.h> using name std; int main(){ int a; cin>>a; cout<<a*32<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'name' 2 | using name std; | ^~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<a*32<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout<<a*32<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s396666222
p00331
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int r = sc.nextInt(); if (h + r > 0) System.out.println(1); if (h + r = 0) System.out.println(0); if (h + r < 0) System.out.println(-1); } }
Main.java:10: error: unexpected type if (h + r = 0) ^ required: variable found: value 1 error
s629130698
p00331
C
#include <stdio.h> int main() { int h, r; scanf("%d %d", &h, &r); if ( h+r > 0 ) printf(“1\n"); else if ( h+r < 0 ) printf(“-1\n"); else printf(“0\n"); return 0; }
main.c: In function 'main': main.c:7:30: error: stray '\342' in program 7 | if ( h+r > 0 ) printf(<U+201C>1\n"); | ^~~~~~~~ main.c:7:32: error: stray '\' in program 7 | if ( h+r > 0 ) printf(“1\n"); | ^ main.c:7:32: error: expected ')' before 'n' 7 | if ( h+r > 0 ) printf(“1\n"); | ~ ^~ | ) main.c:7:34: warning: missing terminating " character 7 | if ( h+r > 0 ) printf(“1\n"); | ^ main.c:7:34: error: missing terminating " character 7 | if ( h+r > 0 ) printf(“1\n"); | ^~~ main.c:8:30: error: stray '\342' in program 8 | else if ( h+r < 0 ) printf(<U+201C>-1\n"); | ^~~~~~~~ main.c:8:33: error: stray '\' in program 8 | else if ( h+r < 0 ) printf(“-1\n"); | ^ main.c:8:35: warning: missing terminating " character 8 | else if ( h+r < 0 ) printf(“-1\n"); | ^ main.c:8:35: error: missing terminating " character 8 | else if ( h+r < 0 ) printf(“-1\n"); | ^~~ main.c:9:30: error: stray '\342' in program 9 | else printf(<U+201C>0\n"); | ^~~~~~~~ main.c:9:32: error: stray '\' in program 9 | else printf(“0\n"); | ^ main.c:9:34: warning: missing terminating " character 9 | else printf(“0\n"); | ^ main.c:9:34: error: missing terminating " character 9 | else printf(“0\n"); | ^~~ main.c:7:31: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion] 7 | if ( h+r > 0 ) printf(“1\n"); | ^ | | | int In file included from main.c:1: /usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int' 363 | extern int printf (const char *__restrict __format, ...); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:12:1: error: expected declaration or statement at end of input 12 | } | ^
s411431270
p00331
C
#include <stdio.h> int main() { int h, r; scanf("%d %d", &h, &r); if ( h+r > 0 ){ printf(“1\n"); } else if ( h+r < 0 ){ printf(“-1\n"); } else { printf(“0\n"); } return 0; }
main.c: In function 'main': main.c:8:9: error: stray '\342' in program 8 | printf(<U+201C>1\n"); | ^~~~~~~~ main.c:8:11: error: stray '\' in program 8 | printf(“1\n"); | ^ main.c:8:11: error: expected ')' before 'n' 8 | printf(“1\n"); | ~ ^~ | ) main.c:8:13: warning: missing terminating " character 8 | printf(“1\n"); | ^ main.c:8:13: error: missing terminating " character 8 | printf(“1\n"); | ^~~ main.c:8:10: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion] 8 | printf(“1\n"); | ^ | | | int In file included from main.c:1: /usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int' 363 | extern int printf (const char *__restrict __format, ...); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:8:13: error: expected ';' before '}' token 8 | printf(“1\n"); | ^ | ; 9 | } else if ( h+r < 0 ){ | ~ main.c:10:9: error: stray '\342' in program 10 | printf(<U+201C>-1\n"); | ^~~~~~~~ main.c:10:12: error: stray '\' in program 10 | printf(“-1\n"); | ^ main.c:10:12: error: expected ')' before 'n' 10 | printf(“-1\n"); | ~ ^~ | ) main.c:10:14: warning: missing terminating " character 10 | printf(“-1\n"); | ^ main.c:10:14: error: missing terminating " character 10 | printf(“-1\n"); | ^~~ main.c:10:10: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion] 10 | printf(“-1\n"); | ^~ | | | int /usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int' 363 | extern int printf (const char *__restrict __format, ...); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:10:14: error: expected ';' before '}' token 10 | printf(“-1\n"); | ^ | ; 11 | } else { | ~ main.c:12:8: error: stray '\342' in program 12 | printf(<U+201C>0\n"); | ^~~~~~~~ main.c:12:10: error: stray '\' in program 12 | printf(“0\n"); | ^ main.c:12:10: error: expected ')' before 'n' 12 | printf(“0\n"); | ~ ^~ | ) main.c:12:12: warning: missing terminating " character 12 | printf(“0\n"); | ^ main.c:12:12: error: missing terminating " character 12 | printf(“0\n"); | ^~~ main.c:12:12: error: expected ';' before '}' token 12 | printf(“0\n"); | ^ | ; 13 | } | ~
s546321883
p00331
C
#include<stdio.h> int main(void) { ??int H,R,a,b; ??scanf("%d %d",&H,&R); ??a=H+R; ??if(a>0){ ????b=1; ??} ??else if(a==0){ ????b=0; ??} ??else{ ????b=-1; ??} ??printf("%d",b); ??return(0); }
main.c: In function 'main': main.c:4:1: error: expected expression before '?' token 4 | ??int H,R,a,b; | ^ main.c:5:1: error: expected expression before '?' token 5 | ??scanf("%d %d",&H,&R); | ^ main.c:5:18: error: 'H' undeclared (first use in this function) 5 | ??scanf("%d %d",&H,&R); | ^ main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in main.c:5:21: error: 'R' undeclared (first use in this function) 5 | ??scanf("%d %d",&H,&R); | ^ main.c:6:1: error: expected expression before '?' token 6 | ??a=H+R; | ^ main.c:6:3: error: 'a' undeclared (first use in this function) 6 | ??a=H+R; | ^ main.c:7:1: error: expected expression before '?' token 7 | ??if(a>0){ | ^ main.c:17:1: error: expected expression before '?' token 17 | ??return(0); | ^
s757968058
p00331
C
#include<stdio.h> int main(void) { ??int H,R,a,b; ??scanf("%d %d",&H,&R); ??a=H+R; ??if(a>0){ ????b=1; ??} ??else if(a==0){ ????b=0; ??} ??else{ ????b=-1; ??} ??printf("%d\n",b); ??return(0); }
main.c: In function 'main': main.c:4:1: error: expected expression before '?' token 4 | ??int H,R,a,b; | ^ main.c:5:1: error: expected expression before '?' token 5 | ??scanf("%d %d",&H,&R); | ^ main.c:5:18: error: 'H' undeclared (first use in this function) 5 | ??scanf("%d %d",&H,&R); | ^ main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in main.c:5:21: error: 'R' undeclared (first use in this function) 5 | ??scanf("%d %d",&H,&R); | ^ main.c:6:1: error: expected expression before '?' token 6 | ??a=H+R; | ^ main.c:6:3: error: 'a' undeclared (first use in this function) 6 | ??a=H+R; | ^ main.c:7:1: error: expected expression before '?' token 7 | ??if(a>0){ | ^ main.c:17:1: error: expected expression before '?' token 17 | ??return(0); | ^
s750434933
p00331
C
#include<stdio.h> int main(void) { ??int H,R,a,b; ??scanf("%d %d\n",&H,&R); ??a=H+R; ??if(a>0){ ????b=1; ??} ??else if(a==0){ ????b=0; ??} ??else{ ????b=-1; ??} ??printf("%d",b); ??return(0); }
main.c: In function 'main': main.c:4:1: error: expected expression before '?' token 4 | ??int H,R,a,b; | ^ main.c:5:1: error: expected expression before '?' token 5 | ??scanf("%d %d\n",&H,&R); | ^ main.c:5:20: error: 'H' undeclared (first use in this function) 5 | ??scanf("%d %d\n",&H,&R); | ^ main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in main.c:5:23: error: 'R' undeclared (first use in this function) 5 | ??scanf("%d %d\n",&H,&R); | ^ main.c:6:1: error: expected expression before '?' token 6 | ??a=H+R; | ^ main.c:6:3: error: 'a' undeclared (first use in this function) 6 | ??a=H+R; | ^ main.c:7:1: error: expected expression before '?' token 7 | ??if(a>0){ | ^ main.c:17:1: error: expected expression before '?' token 17 | ??return(0); | ^
s266746580
p00331
C
#include<stdio.h> int main(void) { int H,R,n; scanf("%d %d",&H,&R); if(H+R<0){ n=-1 } else if(H+R=0){ n=0; } else{ n=1; } printf"%d",n); return(0); }
main.c: In function 'main': main.c:7:7: error: expected ';' before '}' token 7 | n=-1 | ^ | ; 8 | } | ~ main.c:9:13: error: lvalue required as left operand of assignment 9 | else if(H+R=0){ | ^ main.c:15:8: error: expected ';' before string constant 15 | printf"%d",n); | ^~~~ | ; main.c:15:14: error: expected statement before ')' token 15 | printf"%d",n); | ^
s284135718
p00331
C
#include<stdio.h> main(void) { ??int H,R,n; ??scanf("%d %d",&H,&R); ??if(H+R<0){ ????n=-1; ??} ??else if(H+R=0){ ????n=0; ??} ??else{ ????n=1; ??} ??printf("%d",n); ??return(0); }
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(void) | ^~~~ main.c: In function 'main': main.c:5:1: error: expected expression before '?' token 5 | ??int H,R,n; | ^ main.c:6:1: error: expected expression before '?' token 6 | ??scanf("%d %d",&H,&R); | ^ main.c:6:18: error: 'H' undeclared (first use in this function) 6 | ??scanf("%d %d",&H,&R); | ^ main.c:6:18: note: each undeclared identifier is reported only once for each function it appears in main.c:6:21: error: 'R' undeclared (first use in this function) 6 | ??scanf("%d %d",&H,&R); | ^ main.c:7:1: error: expected expression before '?' token 7 | ??if(H+R<0){ | ^ main.c:17:1: error: expected expression before '?' token 17 | ??return(0); | ^
s597615738
p00331
C
#include<iostream> using namespace std; int main() { int h,r; cin>>h>>r; if(h==r) cout<<'0'<<endl; else if(h<=r) cout<<'1'<<endl; else(h>=r) cout<<"-1"<<endl; return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s217926973
p00331
C
#include<iostream> using namespace std; int main() { int h,r; cin>>h>>r; if(h==r) cout<<'0'<<endl; else if(h<=r) cout<<'1'<<endl; else(h>=r) cout<<"-1"<<endl; return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s650155329
p00331
C++
#include<bits/stdc++.h> using namespace std; int main(){ int H,R; cin >> H >> R; if(H<0){ if(R+H>0) cout >> 1 >> endl; if(R+H==0) cout >> 0 >> endl; if(R+H<0)cout >> -1 >> endl; }else{ (R-H == 0)cout >> 0 >> endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 7 | if(R+H>0) cout >> 1 >> endl; | ~~~~ ^~ ~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:7:20: note: candidate: 'operator>>(int, int)' (built-in) 7 | if(R+H>0) cout >> 1 >> endl; | ~~~~~^~~~ a.cc:7:20: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41, from a.cc:1: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:7:15: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 7 | if(R+H>0) cout >> 1 >> endl; | ^~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]': a.cc:7:23: required from here 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:7:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | if(R+H>0) cout >> 1 >> endl; | ^ /usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, cla
s739746841
p00331
C++
#include<bits/stdc++.h> using namespace std; int main(){ int H,R; cin >> H >> R; if(H<0){ if(R+H>0) cout << 1 << endl; if(R+H==0) cout << 0 << endl; if(R+H<0)cout << -1 << endl; }else{ (R-H == 0)cout << 0 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:15: error: expected ';' before 'cout' 11 | (R-H == 0)cout << 0 << endl; | ^~~~ | ;
s868562368
p00331
C++
#include<bits/stdc++.h> using namespace std; int main(){ int H,R; cin >> H >> R; if(H<0){ if(R+H>0) cout << 1 << endl; if(R+H==0) cout << 0 << endl; if(R+H<0)cout << -1 << endl; }else{ (R-H == 0)cout << 0 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:15: error: expected ';' before 'cout' 11 | (R-H == 0)cout << 0 << endl; | ^~~~ | ;
s395221014
p00331
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s299319064
p00331
C++
#include <bits/stdc++.h> using namespacs std; int main (){ int x,y,z; cin >> x >> y; if ( ( x + y ) > 0){z=1} else if ( ( x + y )==0){z=0} else {z=-1} cout<< z << endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namespacs' 2 | using namespacs std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> x >> y; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:26: error: expected ';' before '}' token 7 | if ( ( x + y ) > 0){z=1} | ^ | ; a.cc:8:30: error: expected ';' before '}' token 8 | else if ( ( x + y )==0){z=0} | ^ | ; a.cc:9:13: error: expected ';' before '}' token 9 | else {z=-1} | ^ | ; a.cc:10:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout<< z << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:10:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout<< z << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s793670586
p00331
C++
#include <bits/stdc++.h> using nameplae std; int main(){ int W; cin>>W*32; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'nameplae' 2 | using nameplae std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>W*32; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s970572590
p00331
C++
#include <bits/stdc++.h> using namespace std; intmain(){ int H,R; cin>>H>>R; if(H+R>0){ cout<<1; }else if(H+R=0){ cout<<0; }else{ cout<<-1<<endl; } return 0; }
a.cc:4:1: error: ISO C++ forbids declaration of 'intmain' with no type [-fpermissive] 4 | intmain(){ | ^~~~~~~ a.cc: In function 'int intmain()': a.cc:9:13: error: lvalue required as left operand of assignment 9 | }else if(H+R=0){ | ~^~
s220982629
p00331
C++
#include <bits/stdc++.h> using namespace std; intmain(){ int H,R; cin>>H>>R; if(H+R>0){ cout<<1;endl; }else if(H+R=0){ cout<<0;endl; }else{ cout<<-1<<endl; } return 0; }
a.cc:4:1: error: ISO C++ forbids declaration of 'intmain' with no type [-fpermissive] 4 | intmain(){ | ^~~~~~~ a.cc: In function 'int intmain()': a.cc:8:17: error: statement cannot resolve address of overloaded function 8 | cout<<1;endl; | ^ a.cc:9:13: error: lvalue required as left operand of assignment 9 | }else if(H+R=0){ | ~^~ a.cc:10:17: error: statement cannot resolve address of overloaded function 10 | cout<<0;endl; | ^
s565289144
p00331
C++
#include <bits/stdc++.h> using namespace std; intmain(){ int H,R; cin>>H>>R; if(H+R>0){ cout<<1<<endl; }else if(H+R=0){ cout<<0<<endl; }else{ cout<<-1<<endl; } return 0; }
a.cc:4:1: error: ISO C++ forbids declaration of 'intmain' with no type [-fpermissive] 4 | intmain(){ | ^~~~~~~ a.cc: In function 'int intmain()': a.cc:9:13: error: lvalue required as left operand of assignment 9 | }else if(H+R=0){ | ~^~
s368112908
p00331
C++
#include <bits/stdc++.h> using namespace std; intmain(){ int H,R; cin>>H>>R; if(H+R>0){ cout<<1<<endl; }else if(H+R=0){ cout<<0<<endl; }else{ cout<<-1<<endl; } return 0; }
a.cc:4:1: error: ISO C++ forbids declaration of 'intmain' with no type [-fpermissive] 4 | intmain(){ | ^~~~~~~ a.cc: In function 'int intmain()': a.cc:9:13: error: lvalue required as left operand of assignment 9 | }else if(H+R=0){ | ~^~
s555120407
p00331
C++
#include <bits/stdc++.h> using namespace std; intmain(){ int H,R; cin>>H>>R; if(H+R>0){ cout<<1<<endl; }else if(H+R==0){ cout<<0<<endl; }else{ cout<<-1<<endl; } return 0; }
a.cc:4:1: error: ISO C++ forbids declaration of 'intmain' with no type [-fpermissive] 4 | intmain(){ | ^~~~~~~
s687414163
p00331
C++
#include <bits/stdc++.h> using namespace std; int main(){ int H; if(-i000<=H&&H<0){ }else if(H=0){ }else if(0<H&&H<=1000){ }else return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i000' was not declared in this scope 7 | if(-i000<=H&&H<0){ | ^~~~
s076209110
p00331
C++
#include <bits/stdc++.h> using namespace std; int main(){ int H; if(-i000<=H&&H<0){ }else if(H=0){ }else if(0<H&&H<=1000){ }else return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i000' was not declared in this scope 7 | if(-i000<=H&&H<0){ | ^~~~
s804693374
p00331
C++
#include <bits/stdc++.h> using namespace std; int main(){ int H; if(-i000<=H&&H<0){ }else if(H=0){ }else if(0<H&&H<=1000){ }else return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i000' was not declared in this scope 7 | if(-i000<=H&&H<0){ | ^~~~
s041696773
p00331
C++
#include <bits/stdc++.h> using namespace std; int main(){ int H; if(-i000<=H&&H<0){ }else if(H=0){ }else if(0<H&&H<=1000){ }else return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i000' was not declared in this scope 7 | if(-i000<=H&&H<0){ | ^~~~
s063936491
p00331
C++
#include <bits/stdc++.h> using namespace std; int main(){ int H; if(-i000<=H&&H<0){ }else if(H=0){ }else if(0<H&&H<=1000){ }else return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i000' was not declared in this scope 7 | if(-i000<=H&&H<0){ | ^~~~
s693586734
p00331
C++
#include <bits/stdc++.h> using namespace std; int main(){ int H; if(-i000<=H&&H<0){ }else if(H=0){ }else if(0<H&&H<=1000){ }else return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i000' was not declared in this scope 7 | if(-i000<=H&&H<0){ | ^~~~
s477906012
p00331
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s611815492
p00331
C++
#include<cstdio> #include<iosetream> using namespace std; int main(void){ int h,r; if(h+r==0) cout<<0<<endl; else if(h+r>0) cout<<1<<endl; else cout<<-1<<endl; return 0; }
a.cc:2:9: fatal error: iosetream: No such file or directory 2 | #include<iosetream> | ^~~~~~~~~~~ compilation terminated.
s811339377
p00331
C++
#include <stdio.h> int main(void) { int a,b,c; scanf("%d %d",&a,&b); if (a<=b) { printf("-1\n"); } if else (a==b) { printf("0\n"); } if else (a>=b) { printf("1\n"); } return 0; }
a.cc: In function 'int main()': a.cc:10:12: error: expected '(' before 'else' 10 | if else (a==b) | ^~~~ | ( a.cc:14:12: error: expected '(' before 'else' 14 | if else (a>=b) | ^~~~ | (
s068462734
p00331
C++
#include<stdio.h> int main() { int h,r; scanf("%d%d",&h,&r); if(h<0) { if(r-h=0) { printf("0\n"); } } else if(h>0) { printf("1\n"); } else { printf("-1\n"); } return 0; }
a.cc: In function 'int main()': a.cc:8:21: error: lvalue required as left operand of assignment 8 | if(r-h=0) | ~^~