submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s042134916 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M ;
for (int j=0 ; j < 2*M ; j++){
int s[j] ;
cin >> s[j] ;
}
for (int i=0 ; i<N ; i++){
int count = 0;
if ( s[i]==i+1){
count++;
}
}
cout << count << endl;
}
}
| a.cc: In function 'int main()':
a.cc:13:10: error: 's' was not declared in this scope
13 | if ( s[i]==i+1){
| ^
a.cc:17:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
17 | cout << count << 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,
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; _T |
s737913725 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
//都市の数N,道の数Mを宣言 都市一時保存用A
int N, M, A=0;
cin >> N >> M;
vector<int> road ( N,0 );
for( int i = 0; i < 2*M ; i++){
cin >> A;
++road.at(A);
}
for( int i = 0; i < N ; i++){
cout << road(i) << endl;
}
}
| a.cc: In function 'int main()':
a.cc:18:21: error: no match for call to '(std::vector<int>) (int&)'
18 | cout << road(i) << endl;
| ~~~~^~~
|
s187137882 | p03720 | C++ | s | a.cc:1:1: error: 's' does not name a type
1 | s
| ^
|
s561251468 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)
int main(){
int n,m;
cin>>n>>m;
vector<int> a(m);
vector<int> b(m);
vector<int> c(n,0);
rep(i,m){
cin>>a.at(i)>>b.at(i);
cout<<endl;
}
rep(i,n){
c.at(a.at(i)-1)++;
c.at(b.at(i)-1)++;
}
rep(i,n){
cout>>c.at(i);
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:19:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
19 | cout>>c.at(i);
| ~~~~^~~~~~~~~
| | |
| | __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}
| std::ostream {aka std::basic_ostream<char>}
a.cc:19:13: note: candidate: 'operator>>(int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int})' (built-in)
19 | cout>>c.at(i);
| ~~~~^~~~~~~~~
a.cc:19:13: 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:19:9: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
19 | cout>>c.at(i);
| ^~~~
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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>c.at(i);
| ^
/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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>c.at(i);
| ^
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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>c.at(i);
| ^
/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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout>>c.at(i);
| ^
/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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout>>c.at(i);
| ^
/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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>c.at(i);
| ^
/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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout>>c.at(i);
| ^
/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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
19 | cout>>c.at(i);
| ^
/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:19:21: required from here
19 | cout>>c.at(i);
| ^
/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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>c.at(i);
| ^
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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>c.at(i);
| ^
/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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>c.at(i);
| ^
/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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>c.at(i);
| ^
/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:19:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
19 | cout>>c.at(i);
| ^
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _Ch |
s446392511 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)
int main(){
int n,m;
cin>>n>>m;
vector<int> a(m);
vector<int> b(m);
vector<int> c(n,0);
rep(i,m){
cin>>a.at(i)>>cin>>b.at(i);
cout<<endl;
}
rep(i,n){
c.at(a.at(i)-1)++;
c.at(b.at(i)-1)++;
}
rep(i,n){
cout>>c.at(i);
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:11:21: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'std::istream' {aka 'std::basic_istream<char>'})
11 | cin>>a.at(i)>>cin>>b.at(i);
| ~~~~~~~~~~~~^~~~~
| | |
| | basic_istream<[...]>
| basic_istream<[...]>
a.cc:11:21: note: candidate: 'operator>>(int, int)' (built-in)
11 | cin>>a.at(i)>>cin>>b.at(i);
| ~~~~~~~~~~~~^~~~~
a.cc:11:21: note: no known conversion for argument 2 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included 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/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'std::ios_base& (*)(std::ios_base&)'
|
s690647702 | p03720 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int N, M;
cin >> h >> w;
int ans[51] = {};
for(int i = 0;i < M; i ++){
int a, b;
cin >> a >> b;
ans[a]++;
ans[b]++;
}
for(int i = 1; i <= N; i ++){
cout << ans[i] << endl;
} | a.cc: In function 'int main()':
a.cc:7:12: error: 'h' was not declared in this scope
7 | cin >> h >> w;
| ^
a.cc:7:17: error: 'w' was not declared in this scope
7 | cin >> h >> w;
| ^
a.cc:19:6: error: expected '}' at end of input
19 | }
| ^
a.cc:3:15: note: to match this '{'
3 | int main(void){
| ^
|
s858263036 | p03720 | C++ | int main(void) {
int N, M;
cin >> N >> M;
const int NMMAX = 50;
int A[NMMAX], B[NMMAX];
for (int i = 0; i < M; ++i) {
cin >> A[i] >> B[i];
}
int road[NMMAX];
for (int i = 0; i < N; ++i) {
road[i] = 0;
}
for (int i = 0; i < M; ++i) {
road[A[i] - 1] += 1;
road[B[i] - 1] += 1;
}
for (int i = 0; i < N; ++i) {
cout << road[i] << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:2: error: 'cin' was not declared in this scope
3 | cin >> N >> M;
| ^~~
a.cc:23:2: error: 'cout' was not declared in this scope
23 | cout << road[i] << endl;
| ^~~~
a.cc:23:21: error: 'endl' was not declared in this scope
23 | cout << road[i] << endl;
| ^~~~
|
s027450990 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int N, M;
cin >> N >> M;
int A, B;
for (int i = 0; i < M; i++)
{
cin >> A[i] >> B[i];
}
int road[];
for (int i = 0; i < N; ++i)
{
road[i] = 0;
}
for (int i = 0; i < M; ++i)
{
road[A[i] - 1] += 1;
road[B[i] - 1] += 1;
}
for (int i = 0; i < N; ++i)
{
cout << road[i] << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:13: error: invalid types 'int[int]' for array subscript
13 | cin >> A[i] >> B[i];
| ^
a.cc:13:21: error: invalid types 'int[int]' for array subscript
13 | cin >> A[i] >> B[i];
| ^
a.cc:16:7: error: storage size of 'road' isn't known
16 | int road[];
| ^~~~
a.cc:24:11: error: invalid types 'int[int]' for array subscript
24 | road[A[i] - 1] += 1;
| ^
a.cc:25:11: error: invalid types 'int[int]' for array subscript
25 | road[B[i] - 1] += 1;
| ^
|
s248560465 | p03720 | C | # include<stdio.h>
int main(){
int n,m;
scanf ( "%d %d",&n,&m );
int r[m][2];
for ( int i = 0;i < m;i++ )
scanf ( "%d %d",&r[i][0],&r[i][1] );
for ( int i = 0;i < m;i++ ){
c[r[i][0]]++;
c[r[i][1]]++;
}
for ( int i = 1;i < n+1;i++ )
printf ( "%d\n",c[i] );
}
| main.c: In function 'main':
main.c:11:9: error: 'c' undeclared (first use in this function)
11 | c[r[i][0]]++;
| ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
|
s152502055 | p03720 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main()
{
int N,M; //N個の都市、M本の道路
cin>>N>>M;
vector<int> a(M),b(M),total(N);
for(int ni =0;ni<M;ni++)
{
cin>>a.at(ni)>>b.at(ni);
total(a.at(ni)-1)++;
total(b.at(ni)-1)++;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:10: error: no match for call to '(std::vector<int>) (__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
13 | total(a.at(ni)-1)++;
| ~~~~~^~~~~~~~~~~~
a.cc:14:10: error: no match for call to '(std::vector<int>) (__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
14 | total(b.at(ni)-1)++;
| ~~~~~^~~~~~~~~~~~
|
s387354540 | p03720 | C++ | #include<iostream>
using namespace std;
int main()
{
int N,M; //N個の都市、M本の道路
cin>>N>>M;
vector<int> a(M),b(M),total(N);
for(int ni =0;ni<M;ni++)
{
cin>>a.at(ni)>>b.at(ni);
total(a.at(ni)-1)++;
total(b.at(ni)-1)++;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
8 | vector<int> a(M),b(M),total(N);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#include <vector>
2 | using namespace std;
a.cc:8:10: error: expected primary-expression before 'int'
8 | vector<int> a(M),b(M),total(N);
| ^~~
a.cc:11:10: error: 'a' was not declared in this scope
11 | cin>>a.at(ni)>>b.at(ni);
| ^
a.cc:11:20: error: 'b' was not declared in this scope
11 | cin>>a.at(ni)>>b.at(ni);
| ^
a.cc:12:5: error: 'total' was not declared in this scope
12 | total(a.at(ni)-1)++;
| ^~~~~
|
s310063043 | p03720 | C | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int a, b;
cin >> N >> M;
vector<int> city(N);
for (int i = 0; i < M; i++) {
cin >> a >> b;
city.at(a - 1)++;
city.at(b - 1)++;
}
for (int i = 0; i < N; i++) {
cout << city.at(i) <<endl;
}
} | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s460627067 | p03720 | C | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int a, b;
cin >> N >> M;
vector<int> city(N);
for (int i = 0; i < M; i++) {
cin >> a >> b;
city.at(a - 1)++;
city.at(b - 1)++;
}
for (int i = 0; i < N; i++) {
cout << city.at(i) <<endl;
}
} | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s510154382 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,m,tmp1,tmp2;
cin >> n >> m;
vector<int> town(n);
for(int i=0;i<M;i++){
cin >> tmp1 >> tmp2;
town.at(tmp1-1)++;
town.at(tmp2-1)++;
} | a.cc: In function 'int main()':
a.cc:8:17: error: 'M' was not declared in this scope
8 | for(int i=0;i<M;i++){
| ^
a.cc:12:4: error: expected '}' at end of input
12 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s282529000 | p03720 | C++ | #include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;
int main(){
int N,M;
cin>>N>>M;
vector<int>c(N)={0};
int a,b;
for(int i=0;i<N;i++){
cin>>a>>b;
c[a]++;
c[b]++;
}
for(int i=0;i<N;i++){
cout<<c[i]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:9:3: error: 'vector' was not declared in this scope
9 | vector<int>c(N)={0};
| ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
3 | #include <math.h>
+++ |+#include <vector>
4 | using namespace std;
a.cc:9:10: error: expected primary-expression before 'int'
9 | vector<int>c(N)={0};
| ^~~
a.cc:14:5: error: 'c' was not declared in this scope
14 | c[a]++;
| ^
a.cc:19:11: error: 'c' was not declared in this scope
19 | cout<<c[i]<<endl;
| ^
|
s995694572 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
const int NMMAX = 50;
int A[NMMAX], B[NMMAX];
for (int i=0;i<M;++i){ cin >> A[i] >> B[i];
}
int road[NMMAX];
for (inti=0;i<N;++i){
road[i] = 0; }
for (int i=0;i<M;++i){ road[A[i] - 1] += 1; road[B[i] - 1] += 1;
}
for (int i=0;i<N;++i){ cout << road[i] << endl;
}
return 0; }
| a.cc: In function 'int main()':
a.cc:12:6: error: 'inti' was not declared in this scope; did you mean 'int'?
12 | for (inti=0;i<N;++i){
| ^~~~
| int
a.cc:12:13: error: 'i' was not declared in this scope
12 | for (inti=0;i<N;++i){
| ^
|
s176895717 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
const int NMMAX = 50;
int A[NMMAX], B[NMMAX];
for (inti=0;i<M;++i){ cin >> A[i] >> B[i];
}
int road[NMMAX];
for (inti=0;i<N;++i){
road[i] = 0; }
for (inti=0;i<M;++i){ road[A[i] - 1] += 1; road[B[i] - 1] += 1;
}
for (inti=0;i<N;++i){ cout << road[i] << endl;
}
return 0; }
| a.cc: In function 'int main()':
a.cc:9:6: error: 'inti' was not declared in this scope; did you mean 'int'?
9 | for (inti=0;i<M;++i){ cin >> A[i] >> B[i];
| ^~~~
| int
a.cc:9:13: error: 'i' was not declared in this scope
9 | for (inti=0;i<M;++i){ cin >> A[i] >> B[i];
| ^
a.cc:12:6: error: 'inti' was not declared in this scope; did you mean 'int'?
12 | for (inti=0;i<N;++i){
| ^~~~
| int
a.cc:12:13: error: 'i' was not declared in this scope
12 | for (inti=0;i<N;++i){
| ^
a.cc:14:6: error: 'inti' was not declared in this scope; did you mean 'int'?
14 | for (inti=0;i<M;++i){ road[A[i] - 1] += 1; road[B[i] - 1] += 1;
| ^~~~
| int
a.cc:14:13: error: 'i' was not declared in this scope
14 | for (inti=0;i<M;++i){ road[A[i] - 1] += 1; road[B[i] - 1] += 1;
| ^
a.cc:16:6: error: 'inti' was not declared in this scope; did you mean 'int'?
16 | for (inti=0;i<N;++i){ cout << road[i] << endl;
| ^~~~
| int
a.cc:16:13: error: 'i' was not declared in this scope
16 | for (inti=0;i<N;++i){ cout << road[i] << endl;
| ^
|
s460614811 | p03720 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int M = sc.nextInt();
int Count[] = new int[N];
int i = 0;
for(i = 0;i < M;i++){
Count[sc.nextInt()];
}
for(i = 0;i < N; i++){
System.out.println(Count[i]);
}
}
} | Main.java:11: error: not a statement
Count[sc.nextInt()];
^
1 error
|
s139728199 | p03720 | C++ | 2 5
1 2
2 1
1 2
2 1
1 2 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 2 5
| ^
|
s380062450 | p03720 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
int n, m, a;
vector<int> num(53);
cin >> n >> m;
rep(i, m * 2){
cin >> a;
num.at(a)++;
}
rep(i, n){
cout >> num.at(i + 1) >> endl;
}
}
| a.cc: In function 'int main()':
a.cc:17:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
17 | cout >> num.at(i + 1) >> endl;
| ~~~~ ^~ ~~~~~~~~~~~~~
| | |
| | __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}
| std::ostream {aka std::basic_ostream<char>}
a.cc:17:10: note: candidate: 'operator>>(int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int})' (built-in)
17 | cout >> num.at(i + 1) >> endl;
| ~~~~~^~~~~~~~~~~~~~~~
a.cc:17:10: 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:17:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> num.at(i + 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:17:25: required from here
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> num.at(i + 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:17:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> num.at(i + 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:17:25: no |
s208922368 | p03720 | C++ | ソースコード
Copy
Copy
#include<bits/stdc++.h>
using namespace std;
int main (void){
int a,b,N,M;
int road[55] = {};
cin >> N >> M;
for(int i = 0; i < M; i++){
cin >> a >> b;
a--;
b--;
road[a]++;
road[b]++;
}
for(int i = 0; i < N; i++){
cout << road[i] << '\n';
}
return 0;
} | a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type
1 | ソースコード
| ^~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:5:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/cstddef:50,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_tempbuf.h:59,
from /usr/include/c++/14/bits/stl_algo.h:69,
from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__exter |
s492181370 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main (void){
int a,b,N,M;
int road[55] = {};
cin >> N >> M;
for(int i = 0; i < M; i++){
cin a >> b;
a--;
b--;
road[a]++;
road[b]++;
}
for(int i = 0; i < N; i++){
cout << road[i] << '\n';
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:8: error: expected ';' before 'a'
9 | cin a >> b;
| ^~
| ;
|
s249614393 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
} | a.cc:17:2: error: stray '#' in program
17 | }#include <bits/stdc++.h>
| ^
a.cc:33:2: error: stray '#' in program
33 | }#include <bits/stdc++.h>
| ^
a.cc:49:2: error: stray '#' in program
49 | }#include <bits/stdc++.h>
| ^
a.cc:65:2: error: stray '#' in program
65 | }#include <bits/stdc++.h>
| ^
a.cc:81:2: error: stray '#' in program
81 | }#include <bits/stdc++.h>
| ^
a.cc:97:2: error: stray '#' in program
97 | }#include <bits/stdc++.h>
| ^
a.cc:113:2: error: stray '#' in program
113 | }#include <bits/stdc++.h>
| ^
a.cc:129:2: error: stray '#' in program
129 | }#include <bits/stdc++.h>
| ^
a.cc:145:2: error: stray '#' in program
145 | }#include <bits/stdc++.h>
| ^
a.cc:161:2: error: stray '#' in program
161 | }#include <bits/stdc++.h>
| ^
a.cc:177:2: error: stray '#' in program
177 | }#include <bits/stdc++.h>
| ^
a.cc:193:2: error: stray '#' in program
193 | }#include <bits/stdc++.h>
| ^
a.cc:209:2: error: stray '#' in program
209 | }#include <bits/stdc++.h>
| ^
a.cc:225:2: error: stray '#' in program
225 | }#include <bits/stdc++.h>
| ^
a.cc:241:2: error: stray '#' in program
241 | }#include <bits/stdc++.h>
| ^
a.cc:257:2: error: stray '#' in program
257 | }#include <bits/stdc++.h>
| ^
a.cc:273:2: error: stray '#' in program
273 | }#include <bits/stdc++.h>
| ^
a.cc:289:2: error: stray '#' in program
289 | }#include <bits/stdc++.h>
| ^
a.cc:305:2: error: stray '#' in program
305 | }#include <bits/stdc++.h>
| ^
a.cc:321:2: error: stray '#' in program
321 | }#include <bits/stdc++.h>
| ^
a.cc:337:2: error: stray '#' in program
337 | }#include <bits/stdc++.h>
| ^
a.cc:353:2: error: stray '#' in program
353 | }#include <bits/stdc++.h>
| ^
a.cc:369:2: error: stray '#' in program
369 | }#include <bits/stdc++.h>
| ^
a.cc:385:2: error: stray '#' in program
385 | }#include <bits/stdc++.h>
| ^
a.cc:401:2: error: stray '#' in program
401 | }#include <bits/stdc++.h>
| ^
a.cc:417:2: error: stray '#' in program
417 | }#include <bits/stdc++.h>
| ^
a.cc:433:2: error: stray '#' in program
433 | }#include <bits/stdc++.h>
| ^
a.cc:449:2: error: stray '#' in program
449 | }#include <bits/stdc++.h>
| ^
a.cc:465:2: error: stray '#' in program
465 | }#include <bits/stdc++.h>
| ^
a.cc:481:2: error: stray '#' in program
481 | }#include <bits/stdc++.h>
| ^
a.cc:497:2: error: stray '#' in program
497 | }#include <bits/stdc++.h>
| ^
a.cc:513:2: error: stray '#' in program
513 | }#include <bits/stdc++.h>
| ^
a.cc:529:2: error: stray '#' in program
529 | }#include <bits/stdc++.h>
| ^
a.cc:545:2: error: stray '#' in program
545 | }#include <bits/stdc++.h>
| ^
a.cc:561:2: error: stray '#' in program
561 | }#include <bits/stdc++.h>
| ^
a.cc:577:2: error: stray '#' in program
577 | }#include <bits/stdc++.h>
| ^
a.cc:593:2: error: stray '#' in program
593 | }#include <bits/stdc++.h>
| ^
a.cc:609:2: error: stray '#' in program
609 | }#include <bits/stdc++.h>
| ^
a.cc:625:2: error: stray '#' in program
625 | }#include <bits/stdc++.h>
| ^
a.cc:641:2: error: stray '#' in program
641 | }#include <bits/stdc++.h>
| ^
a.cc:657:2: error: stray '#' in program
657 | }#include <bits/stdc++.h>
| ^
a.cc:673:2: error: stray '#' in program
673 | }#include <bits/stdc++.h>
| ^
a.cc:689:2: error: stray '#' in program
689 | }#include <bits/stdc++.h>
| ^
a.cc:705:2: error: stray '#' in program
705 | }#include <bits/stdc++.h>
| ^
a.cc:721:2: error: stray '#' in program
721 | }#include <bits/stdc++.h>
| ^
a.cc:737:2: error: stray '#' in program
737 | }#include <bits/stdc++.h>
| ^
a.cc:753:2: error: stray '#' in program
753 | }#include <bits/stdc++.h>
| ^
a.cc:769:2: error: stray '#' in program
769 | }#include <bits/stdc++.h>
| ^
a.cc:785:2: error: stray '#' in program
785 | }#include <bits/stdc++.h>
| ^
a.cc:801:2: error: stray '#' in program
801 | }#include <bits/stdc++.h>
| ^
a.cc:817:2: error: stray '#' in program
817 | }#include <bits/stdc++.h>
| ^
a.cc:833:2: error: stray '#' in program
833 | }#include <bits/stdc++.h>
| ^
a.cc:849:2: error: stray '#' in program
849 | }#include <bits/stdc++.h>
| ^
a.cc:865:2: error: stray '#' in program
865 | }#include <bits/stdc++.h>
| ^
a.cc:881:2: error: stray '#' in program
881 | }#include <bits/stdc++.h>
| ^
a.cc:897:2: error: stray '#' in program
897 | }#include <bits/stdc++.h>
| ^
a.cc:913:2: error: stray '#' in program
913 | }#include <bits/stdc++.h>
| ^
a.cc:929:2: error: stray '#' in program
929 | }#include <bits/stdc++.h>
| ^
a.cc:945:2: error: stray '#' in program
945 | }#include <bits/stdc++.h>
| ^
a.cc:961:2: error: stray '#' in program
961 | }#include <bits/stdc++.h>
| ^
a.cc:977:2: error: stray '#' in program
977 | }#include <bits/stdc++.h>
| ^
a.cc:993:2: error: stray '#' in program
993 | }#include <bits/stdc++.h>
| ^
a.cc:1009:2: error: stray '#' in program
1009 | }#include <bits/stdc++.h>
| ^
a.cc:1025:2: error: stray '#' in program
1025 | }#include <bits/stdc++.h>
| ^
a.cc:1041:2: error: stray '#' in program
1041 | }#include <bits/stdc++.h>
| ^
a.cc:1057:2: error: stray '#' in program
1057 | }#include <bits/stdc++.h>
| ^
a.cc:1073:2: error: stray '#' in program
1073 | }#include <bits/stdc++.h>
| ^
a.cc:1089:2: error: stray '#' in program
1089 | }#include <bits/stdc++.h>
| ^
a.cc:1105:2: error: stray '#' in program
1105 | }#include <bits/stdc++.h>
| ^
a.cc:1121:2: error: stray '#' in program
1121 | }#include <bits/stdc++.h>
| ^
a.cc:1137:2: error: stray '#' in program
1137 | }#include <bits/stdc++.h>
| ^
a.cc:1153:2: error: stray '#' in program
1153 | }#include <bits/stdc++.h>
| ^
a.cc:1169:2: error: stray '#' in program
1169 | }#include <bits/stdc++.h>
| ^
a.cc:1185:2: error: stray '#' in program
1185 | }#include <bits/stdc++.h>
| ^
a.cc:1201:2: error: stray '#' in program
1201 | }#include <bits/stdc++.h>
| ^
a.cc:1217:2: error: stray '#' in program
1217 | }#include <bits/stdc++.h>
| ^
a.cc:1233:2: error: stray '#' in program
1233 | }#include <bits/stdc++.h>
| ^
a.cc:1249:2: error: stray '#' in program
1249 | }#include <bits/stdc++.h>
| ^
a.cc:1265:2: error: stray '#' in program
1265 | }#include <bits/stdc++.h>
| ^
a.cc:1281:2: error: stray '#' in program
1281 | }#include <bits/stdc++.h>
| ^
a.cc:1297:2: error: stray '#' in program
1297 | }#include <bits/stdc++.h>
| ^
a.cc:1313:2: error: stray '#' in program
1313 | }#include <bits/stdc++.h>
| ^
a.cc:1329:2: error: stray '#' in program
1329 | }#include <bits/stdc++.h>
| ^
a.cc:17:3: error: 'include' does not name a type
17 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:20:5: error: redefinition of 'int main()'
20 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:33:3: error: 'include' does not name a type
33 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:36:5: error: redefinition of 'int main()'
36 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:49:3: error: 'include' does not name a type
49 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:52:5: error: redefinition of 'int main()'
52 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:65:3: error: 'include' does not name a type
65 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:68:5: error: redefinition of 'int main()'
68 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:81:3: error: 'include' does not name a type
81 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:84:5: error: redefinition of 'int main()'
84 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:97:3: error: 'include' does not name a type
97 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:100:5: error: redefinition of 'int main()'
100 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:113:3: error: 'include' does not name a type
113 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:116:5: error: redefinition of 'int main()'
116 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:129:3: error: 'include' does not name a type
129 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:132:5: error: redefinition of 'int main()'
132 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:145:3: error: 'include' does not name a type
145 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:148:5: error: redefinition of 'int main()'
148 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:161:3: error: 'include' does not name a type
161 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:164:5: error: redefinition of 'int main()'
164 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:177:3: error: 'include' does not name a type
177 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:180:5: error: redefinition of 'int main()'
180 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:193:3: error: 'include' does not name a type
193 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:196:5: |
s946390818 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
c.at(a - 1)++;
c.at(b - 1)++;
}
for (int j = 0; j < n; j++) {
cout << c.at(j) << endl;
}
} | a.cc:17:2: error: stray '#' in program
17 | }#include <bits/stdc++.h>
| ^
a.cc:33:2: error: stray '#' in program
33 | }#include <bits/stdc++.h>
| ^
a.cc:49:2: error: stray '#' in program
49 | }#include <bits/stdc++.h>
| ^
a.cc:65:2: error: stray '#' in program
65 | }#include <bits/stdc++.h>
| ^
a.cc:81:2: error: stray '#' in program
81 | }#include <bits/stdc++.h>
| ^
a.cc:97:2: error: stray '#' in program
97 | }#include <bits/stdc++.h>
| ^
a.cc:113:2: error: stray '#' in program
113 | }#include <bits/stdc++.h>
| ^
a.cc:129:2: error: stray '#' in program
129 | }#include <bits/stdc++.h>
| ^
a.cc:145:2: error: stray '#' in program
145 | }#include <bits/stdc++.h>
| ^
a.cc:161:2: error: stray '#' in program
161 | }#include <bits/stdc++.h>
| ^
a.cc:177:2: error: stray '#' in program
177 | }#include <bits/stdc++.h>
| ^
a.cc:17:3: error: 'include' does not name a type
17 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:20:5: error: redefinition of 'int main()'
20 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:33:3: error: 'include' does not name a type
33 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:36:5: error: redefinition of 'int main()'
36 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:49:3: error: 'include' does not name a type
49 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:52:5: error: redefinition of 'int main()'
52 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:65:3: error: 'include' does not name a type
65 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:68:5: error: redefinition of 'int main()'
68 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:81:3: error: 'include' does not name a type
81 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:84:5: error: redefinition of 'int main()'
84 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:97:3: error: 'include' does not name a type
97 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:100:5: error: redefinition of 'int main()'
100 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:113:3: error: 'include' does not name a type
113 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:116:5: error: redefinition of 'int main()'
116 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:129:3: error: 'include' does not name a type
129 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:132:5: error: redefinition of 'int main()'
132 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:145:3: error: 'include' does not name a type
145 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:148:5: error: redefinition of 'int main()'
148 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:161:3: error: 'include' does not name a type
161 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:164:5: error: redefinition of 'int main()'
164 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
a.cc:177:3: error: 'include' does not name a type
177 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:180:5: error: redefinition of 'int main()'
180 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
|
s710833124 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;// n 個の都市 m 本の道路
cin >> n >> m;
int a, b;
vector<int> c (n);
for (int i = 0; i < m; i++) {
cin >> a >> b ;
vec.at(a - 1)++;
vec.at(b - 1)++;
}
for (int j = 0; i < n; i++) {
cout << vec.at(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:11:9: error: 'vec' was not declared in this scope
11 | vec.at(a - 1)++;
| ^~~
a.cc:14:21: error: 'i' was not declared in this scope
14 | for (int j = 0; i < n; i++) {
| ^
a.cc:15:17: error: 'vec' was not declared in this scope
15 | cout << vec.at(i) << endl;
| ^~~
|
s178506682 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
int Answer;
vector<int> road(2*M);
for (int i=0; i<2*M; i++){
cin >> road.at(i);
}
for (int i=0; i<N; i++){
Answer = 0
for (int j=0; j<2*M; j++){
if(road.at(j) == i+1) Answer ++;
}
cout << Answer << endl;
}
}
| a.cc: In function 'int main()':
a.cc:17:15: error: expected ';' before 'for'
17 | Answer = 0
| ^
| ;
18 | for (int j=0; j<2*M; j++){
| ~~~
a.cc:18:19: error: 'j' was not declared in this scope
18 | for (int j=0; j<2*M; j++){
| ^
|
s819057921 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
vecter<int> a(M);
vecter<int> b(M);
vector<int> c(N);
for(int i=0;i<M;i++){
cin >> a.at(i) >> b.at(i);
c.at(a.at(i)-1)++;
c.at(b.at(i)-1)++;
}
for(int j=0;j<N;j++){
cout << c.at(j) << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:3: error: 'vecter' was not declared in this scope
7 | vecter<int> a(M);
| ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
7 | vecter<int> a(M);
| ^~~
a.cc:8:10: error: expected primary-expression before 'int'
8 | vecter<int> b(M);
| ^~~
a.cc:11:12: error: 'a' was not declared in this scope
11 | cin >> a.at(i) >> b.at(i);
| ^
a.cc:11:23: error: 'b' was not declared in this scope
11 | cin >> a.at(i) >> b.at(i);
| ^
|
s419981696 | p03720 | C++ | n, m = map(int, input().split())
t=[0]*n
for i in range(m):
a, b = map(int, input().split())
t[a-1]+=1
t[b-1]+=1
for x in t: print(x) | a.cc:1:1: error: 'n' does not name a type
1 | n, m = map(int, input().split())
| ^
|
s706883134 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> ans(N,0);
for (int i =0;i<N;i++){
int P, Q;
cin >> P >> Q;
for(int j =0;j<100;j++){
if(j == P){
ans.at(j-1) +=1;
}
for(int j =0;j<100;j++){
if(j == Q){
ans.at(j-1) +=1;
}
}
}
for (int i =0;i < ans.size();i++){
cout << ans.at(i) << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
27 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s002146452 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> vec(0);
int a, b;
for (int i = 0; i < M; i++) {
cin >> a >> b;
vec.push_back(a);
vec.push_back(b);
}
for (int k = 0; k < N; k++) {
for (int j = 0; j < 2 * M; j++) {
int counter = 0;
if (vec.at(j) == k)
counter++;
}
cout << counter << endl;
}
}
| a.cc: In function 'int main()':
a.cc:22:13: error: 'counter' was not declared in this scope
22 | cout << counter << endl;
| ^~~~~~~
|
s115455434 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >>M ;
vector<int> road(M*2);
for(int i; i<M*2; i++){
cin >> road.at(i) ;
}
vector<int> num(N);
for(int k=1; k<=N; k++){
for(int i=0; i<M*2; i++){
if(road.at(i) == k){
num.at(k-1)++;
}
}
for(int i=0; i<N; i++){
cout << num.at(i) <<endl;
}
} | a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s911892606 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
vector<int>result(N);
for(int i=0;i<2*M;i++){
int a;
cin >> a;
result.at(a)++;
}
for(int i=0,i<N;i++){
cout << result.at(i) << endl;
}
}
| a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before '<' token
13 | for(int i=0,i<N;i++){
| ^
| ;
a.cc:13:16: error: expected primary-expression before '<' token
|
s246385192 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,a,b,c;
cin >> N >> a;
vector<int> d(N);
for(int i = 0; i < a; i++) {
cin >> b >> c;
d.at(b-1)++;
d.at(c-1)++;
}
for(int i = 0; i < a; i++) {
cout << d.at(i); << endl;
}
}
| a.cc: In function 'int main()':
a.cc:14:22: error: expected primary-expression before '<<' token
14 | cout << d.at(i); << endl;
| ^~
|
s936810788 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,a,b,c;
cin >> N >> a;
vec<int> d(N);
for(int i = 0; i < a; i++) {
cin >> b >> c;
d.at(b-1)++;
d.at(c-1)++;
}
for(int i = 0; i < a; i++) {
cout << d.at(i); << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:3: error: 'vec' was not declared in this scope
7 | vec<int> d(N);
| ^~~
a.cc:7:7: error: expected primary-expression before 'int'
7 | vec<int> d(N);
| ^~~
a.cc:10:5: error: 'd' was not declared in this scope
10 | d.at(b-1)++;
| ^
a.cc:14:13: error: 'd' was not declared in this scope
14 | cout << d.at(i); << endl;
| ^
a.cc:14:22: error: expected primary-expression before '<<' token
14 | cout << d.at(i); << endl;
| ^~
|
s129775039 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M,x;
cin>>N>>M;
vector<int> c(N);
for(int i=0;i<M;i++){
cin>>x;
c.at(x-1)++;
cin>>x;
c.at(x-1)++;
}
for(int i=0;i<N;i++){
cout>>c.at(i)>>endl;
}
}
| a.cc: In function 'int main()':
a.cc:15:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
15 | cout>>c.at(i)>>endl;
| ~~~~^~~~~~~~~
| | |
| | __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}
| std::ostream {aka std::basic_ostream<char>}
a.cc:15:9: note: candidate: 'operator>>(int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int})' (built-in)
15 | cout>>c.at(i)>>endl;
| ~~~~^~~~~~~~~
a.cc:15:9: 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:15:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
15 | cout>>c.at(i)>>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:15:17: required from here
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout>>c.at(i)>>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:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout>>c.at(i)>>endl;
| ^
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _T |
s359995026 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M,x;
cin>>N>>M;
vector<int> c(N);
for(int i=0;i<M;i++){
cin>>x;
c(x-1)++;
cin>>x;
c(x-1)++;
}
for(int i=0;i<N;i++){
cout>>c(i)>>endl;
}
} | a.cc: In function 'int main()':
a.cc:10:4: error: no match for call to '(std::vector<int>) (int)'
10 | c(x-1)++;
| ~^~~~~
a.cc:12:4: error: no match for call to '(std::vector<int>) (int)'
12 | c(x-1)++;
| ~^~~~~
a.cc:15:12: error: no match for call to '(std::vector<int>) (int&)'
15 | cout>>c(i)>>endl;
| ~^~~
|
s916944142 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M,x;
cin>>N>>M;
vector<int> c(N);
for(int i=0;i<M;i++){
cin>>x;
c(x-1)++;
cin>>x;
c(x-1)++
}
for(int i=0;i<N;i++){
cout>>c(i)>>endl;
}
} | a.cc: In function 'int main()':
a.cc:10:4: error: no match for call to '(std::vector<int>) (int)'
10 | c(x-1)++;
| ~^~~~~
a.cc:12:4: error: no match for call to '(std::vector<int>) (int)'
12 | c(x-1)++
| ~^~~~~
a.cc:15:12: error: no match for call to '(std::vector<int>) (int&)'
15 | cout>>c(i)>>endl;
| ~^~~
|
s889421912 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int City, Road;
cin >> City >> Road;
vector<int> ans(City,0);
for(int r = 0; r < Road * 2; r++){
int city;
cin >> city;
ans.at(city-1) += 1;
}
for(int c = 0; c < city.size(); c++){
cout << city.at(c) << endl;
}
} | a.cc: In function 'int main()':
a.cc:14:22: error: 'city' was not declared in this scope; did you mean 'City'?
14 | for(int c = 0; c < city.size(); c++){
| ^~~~
| City
|
s722954801 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N, M;
cin >> N >> M;
vector<int> a(M);
vector<int> b(M);
for (int i = 0; i < M; i++){
cin >> a.at(i) >> b.at(i);
}
vector<int> road(N);
for (int i = 0; i < N; i++){
for (int j = 0; j < M; j++){
if (a.at(j) == i + 1 || b.at(j) == i + 1) road(i) += 1;
}
}
for (int i = 0; i < N; i++){
cout << road.at(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:15:53: error: no match for call to '(std::vector<int>) (int&)'
15 | if (a.at(j) == i + 1 || b.at(j) == i + 1) road(i) += 1;
| ~~~~^~~
|
s040042958 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N, M;
cin >> N >> M;
vector<int> a(M);
vector<int> b(M);
for (int i = 0; i < M; i++){
cin >> a.at(i) >> b.at(i);
}
vector<int> road(N);
for (int i = 0; i < N; i++){
for (int j = 0; j < M; j++){
if (a.at(j) == i + 1 || b.at(j) == i + 1) road =+ 1;
}
}
for (int i = 0; i < N; i++){
cout << road.at(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:15:57: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
15 | if (a.at(j) == i + 1 || b.at(j) == i + 1) road =+ 1;
| ^
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 = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<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 = int; _Alloc = std::allocator<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 'int' to 'std::vector<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 = int; _Alloc = std::allocator<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 'int' to 'std::initializer_list<int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
|
s089465557 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N, M;
cin >> N >> M;
vector<int> a(M);
vector<int> b(M);
for (int i = 0; i < M; i++){
cin >> a.at(i) >> b.at(i);
}
vector<int> road(N);
for (int i = 0; i < N; i++){
for (int j = 0; j < M; j++){
if (a.at(j) == i + 1 || b.at(j) == i + 1) road += 1;
}
}
for (int i = 0; i < N; i++){
cout << road.at(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:15:54: error: no match for 'operator+=' (operand types are 'std::vector<int>' and 'int')
15 | if (a.at(j) == i + 1 || b.at(j) == i + 1) road += 1;
| ~~~~~^~~~
|
s510176700 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N, M;
cin >> N >> M;
vector<int> a (50);
vector<int> b (50);
vector<int> c (50);
for (int i = 0; i < M; i++){
cin >> a.at(i);
cin >> b.at(i);
}
for (int i = 0; i < N; i++){
if (a.at(i) == i + 1 || b.at(i) == i) c.at(i) += 1
}
for (int i = 0; i < N; i++){
cout << c.at(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:18:55: error: expected ';' before '}' token
18 | if (a.at(i) == i + 1 || b.at(i) == i) c.at(i) += 1
| ^
| ;
19 | }
| ~
|
s840899665 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
cin >> N >> M;
vector<int> date(M);
for(int i=0;i<M;i++){
int a , b;
vector<int> road(2);
cin >> a >> b;
road.at(0) = a;
road.at(1) = b;
date.at(i) = road;
}
for(int i=0;i<N;i++){
int count = 0;
for(int j=0;J<M;J++){
vector<int> road(2);
road = date.at(j);
if(road.at(0) == i+1 || road.at(1) == i+1){
count++;
}
}
cout << count << endl;
}
} | a.cc: In function 'int main()':
a.cc:16:22: error: cannot convert 'std::vector<int>' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} in assignment
16 | date.at(i) = road;
| ^~~~
| |
| std::vector<int>
a.cc:22:21: error: 'J' was not declared in this scope
22 | for(int j=0;J<M;J++){
| ^
a.cc:24:29: error: no match for 'operator=' (operand types are 'std::vector<int>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
24 | road = date.at(j);
| ^
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 = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'const std::vector<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 = int; _Alloc = std::allocator<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 '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'std::vector<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 = int; _Alloc = std::allocator<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 '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'std::initializer_list<int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
|
s162089296 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N; //都市の数
int M; //道路の数
cin >> N >> M;
int Route; // 都市iから出ている道路の数
vector <int> RoadA(M); // 道路i 都市Aiの番号
vector <int> RoadB(M); // 道路i 都市Biの番号
for (int i=0; i<M; i++){
cin >> RoadA.at(i) >> RoadB.at(i);
}
for (int i=0; i<N; i++){
Route=0;
for (int j=0; j<M; j++){
if (RoadA.at(i) == i){
Toshi.at(i) +=1;
}
if (RoadB.at(i) == i){
Toshi.at(i) +=1;
}
}
cout << Route << endl;
}
}
| a.cc: In function 'int main()':
a.cc:22:9: error: 'Toshi' was not declared in this scope
22 | Toshi.at(i) +=1;
| ^~~~~
a.cc:25:9: error: 'Toshi' was not declared in this scope
25 | Toshi.at(i) +=1;
| ^~~~~
|
s960748631 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N; //都市の数
int M; //道路の数
cin >> N >> M;
int Route; // 都市iから出ている道路の数
vector <int> RoadA(M); // 道路i 都市Aiの番号
vector <int> RoadB(M); // 道路i 都市Biの番号
for (int i=0; i<M; i++){
cin >> RoadA.at(i) >> RoadB.at(i);
}
for (int i=0; i<N; i++){
Route=0;
for (int j=0; j<M; j++){
if (RoadA,at(i) == i){
Toshi.at(i) +=1;
}
if (RoadB.at(i) == i){
Toshi.at(i) +=1;
}
}
cout << Route << endl;
}
} | a.cc: In function 'int main()':
a.cc:21:17: error: 'at' was not declared in this scope
21 | if (RoadA,at(i) == i){
| ^~
a.cc:22:9: error: 'Toshi' was not declared in this scope
22 | Toshi.at(i) +=1;
| ^~~~~
a.cc:25:9: error: 'Toshi' was not declared in this scope
25 | Toshi.at(i) +=1;
| ^~~~~
|
s745692786 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N; //都市の数
int M; //道路の数
cin >> N >> M;
int Route; // 都市iから出ている道路の数
vector <int> RoadA(M); // 道路i 都市Aiの番号
vector <int> RoadB(M); // 道路i 都市Biの番号
for (int i=0; i<M; i++){
cin >> RoadA.at(i) >> RoadB.at(i);
}
for (int i=0; i<N; i++){
Route=0;
for (j=0; j<M; j++){
if (RoadA,at(i) == i){
Toshi.at(i) +=1;
}
if (RoadB.at(i) == i){
Toshi.at(i) +=1;
}
}
cout << Route << endl;
}
} | a.cc: In function 'int main()':
a.cc:20:10: error: 'j' was not declared in this scope
20 | for (j=0; j<M; j++){
| ^
a.cc:21:17: error: 'at' was not declared in this scope
21 | if (RoadA,at(i) == i){
| ^~
a.cc:22:9: error: 'Toshi' was not declared in this scope
22 | Toshi.at(i) +=1;
| ^~~~~
a.cc:25:9: error: 'Toshi' was not declared in this scope
25 | Toshi.at(i) +=1;
| ^~~~~
|
s333197897 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N; //都市の数
int M; //道路の数
cin >> N >> M;
vector <int> Route; // 都市iから出ている道路の数
vector <int> RoadA(M); // 道路i 都市Aiの番号
vector <int> RoadB(M); // 道路i 都市Biの番号
for (int i=0; i<M; i++){
cin >> RoadA.at(i) >> RoadB.at(i);
}
for (int i=0; i<N; i++){
Route=0;
for (j=0; j<M; j++){
if (RoadA,at(i) == i){
Toshi.at(i) +=1;
}
if (RoadB.at(i) == i){
Toshi.at(i) +=1;
}
}
cout << Route << endl;
}
}
| a.cc: In function 'int main()':
a.cc:19:11: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
19 | Route=0;
| ^
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 = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<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 = int; _Alloc = std::allocator<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 'int' to 'std::vector<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 = int; _Alloc = std::allocator<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 'int' to 'std::initializer_list<int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:20:10: error: 'j' was not declared in this scope
20 | for (j=0; j<M; j++){
| ^
a.cc:21:17: error: 'at' was not declared in this scope
21 | if (RoadA,at(i) == i){
| ^~
a.cc:22:9: error: 'Toshi' was not declared in this scope
22 | Toshi.at(i) +=1;
| ^~~~~
a.cc:25:9: error: 'Toshi' was not declared in this scope
25 | Toshi.at(i) +=1;
| ^~~~~
a.cc:28:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<int>')
28 | cout << Route << endl;
| ~~~~ ^~ ~~~~~
| | |
| | std::vector<int>
| std::ostream {aka std::basic_ostream<char>}
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: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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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> |
s315691174 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N; //都市の数
int M; //道路の数
cin >> N >> M;
vector <int> Route; // 都市iから出ている道路の数
vector <int> RoadA(M); // 道路i 都市Aiの番号
vector <int> RoadB(M); // 道路i 都市Biの番号
for (int i=0; i<M; i++){
cin >> RoadA.at(i) >> RoadB.at(i);
}
for (int i=0; j<N; i++){
Route=0;
for (j=0; j<M; j++){
if (RoadA,at(i) == i){
Toshi.at(i) +=1;
}
if (RoadB.at(i) == i){
Toshi.at(i) +=1;
}
}
cout << Route << endl;
}
} | a.cc: In function 'int main()':
a.cc:18:17: error: 'j' was not declared in this scope
18 | for (int i=0; j<N; i++){
| ^
a.cc:19:11: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
19 | Route=0;
| ^
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 = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<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 = int; _Alloc = std::allocator<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 'int' to 'std::vector<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 = int; _Alloc = std::allocator<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 'int' to 'std::initializer_list<int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:21:17: error: 'at' was not declared in this scope
21 | if (RoadA,at(i) == i){
| ^~
a.cc:22:9: error: 'Toshi' was not declared in this scope
22 | Toshi.at(i) +=1;
| ^~~~~
a.cc:25:9: error: 'Toshi' was not declared in this scope
25 | Toshi.at(i) +=1;
| ^~~~~
a.cc:28:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<int>')
28 | cout << Route << endl;
| ~~~~ ^~ ~~~~~
| | |
| | std::vector<int>
| std::ostream {aka std::basic_ostream<char>}
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: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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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 'std::vector<int>' 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_tra |
s700748295 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N; //都市の数
int M; //道路の数
cin >> N >> M;
vector <int> Route; // 都市iから出ている道路の数
vector <int> RoadA(M); // 道路i 都市Aiの番号
vector <int> RoadB(M); // 道路i 都市Biの番号
for (int i=0; i<M; i++){
cin >> RoadA.at(i) >> RoadB,at(i);
}
for (int i=0; j<N; i++){
Route=0;
for (j=0; j<M; j++){
if (RoadA,at(i) == i){
Toshi.at(i) +=1;
}
if (RoadB.at(i) == i){
Toshi.at(i) +=1;
}
}
cout << Route << endl;
}
}
| a.cc: In function 'int main()':
a.cc:15:24: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
15 | cin >> RoadA.at(i) >> RoadB,at(i);
| ~~~~~~~~~~~~~~~~~~ ^~ ~~~~~
| | |
| | std::vector<int>
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
In file included 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/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
| |
s012928533 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N; //都市の数
int M; //道路の数
cin >> N >> M;
vector <int> Route; // 都市iから出ている道路の数
vector <int> RoadA(M); // 道路i 都市Aiの番号
vector <int> RoadB(m); // 道路i 都市Biの番号
for (int i=0; i<M; i++){
cin >> RoadA.at(i) >> RoadB,at(i);
}
for (int i=0; j<N; i++){
Route=0;
for (j=0; j<M; j++){
if (RoadA,at(i) == i){
Toshi.at(i) +=1;
}
if (RoadB.at(i) == i){
Toshi.at(i) +=1;
}
}
cout << Route << endl;
}
} | a.cc: In function 'int main()':
a.cc:12:22: error: 'm' was not declared in this scope
12 | vector <int> RoadB(m); // 道路i 都市Biの番号
| ^
a.cc:15:24: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
15 | cin >> RoadA.at(i) >> RoadB,at(i);
| ~~~~~~~~~~~~~~~~~~ ^~ ~~~~~
| | |
| | std::vector<int>
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
In file included 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/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int |
s782950002 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int N,M,x;
cin>>N>>M;
vector<int> a(N+1)
for(int i=0;i<2*M;i++)
{
cin>>x;
a.at(x)++;
}
for(int j=1;j<=N;j++)
{
cout<<a.at(j)<<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for(int i=0;i<2*M;i++)
| ^~~
a.cc:8:15: error: 'i' was not declared in this scope
8 | for(int i=0;i<2*M;i++)
| ^
|
s070752964 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
cin >> int N, M;
for(int t = 0; t < N; t++){
int a = 0;
for(int i = 0; i < 2*M; i++) {
cin >> int r;
if(t+1 == r){
int a++;
}
}
cout << int a << endl;
}
}
| a.cc: In function 'int main()':
a.cc:5:10: error: expected primary-expression before 'int'
5 | cin >> int N, M;
| ^~~
a.cc:6:22: error: 'N' was not declared in this scope
6 | for(int t = 0; t < N; t++){
| ^
a.cc:8:26: error: 'M' was not declared in this scope
8 | for(int i = 0; i < 2*M; i++) {
| ^
a.cc:9:14: error: expected primary-expression before 'int'
9 | cin >> int r;
| ^~~
a.cc:10:17: error: 'r' was not declared in this scope
10 | if(t+1 == r){
| ^
a.cc:11:12: error: expected initializer before '++' token
11 | int a++;
| ^~
a.cc:14:13: error: expected primary-expression before 'int'
14 | cout << int a << endl;
| ^~~
|
s595117136 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int,int> pi;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define SQ(a) (a)*(a)
template <class T, class U> ostream& operator<< (ostream &out, pair<T,U> c) { out << "(" << c.first << " "; out << c.second << ")"; return out; }
template <class T> ostream& operator<< (ostream &out, vector<T> c) { for (auto it = c.begin(); it != c.end(); ++it) { if (it != c.begin()) out << " "; out << *it; } return out; }
template <class T> ostream& operator<< (ostream &out, set<T> c) { for (auto it = c.begin(); it != c.end(); ++it) { if (it != c.begin()) out << " "; out << *it; } return out; }
const double PI = 3.141592653589793238463;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, m, a, b;
cin >> n >> m;
vi c(n);
FOR(i,0,m){
cin >> a >> b;
vi[a-1]++;
vi[b-1]++;
}
FOR(i,0,n){
cout << c[i] << endl;
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:31:13: error: expected ']' before '-' token
31 | vi[a-1]++;
| ^
| ]
a.cc:31:11: error: structured binding declaration cannot have type 'vi' {aka 'std::vector<int>'}
31 | vi[a-1]++;
| ^
a.cc:31:11: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:31:16: error: expected initializer before '++' token
31 | vi[a-1]++;
| ^~
a.cc:31:16: error: expected ';' before '++' token
a.cc:32:13: error: expected ']' before '-' token
32 | vi[b-1]++;
| ^
| ]
a.cc:32:11: error: structured binding declaration cannot have type 'vi' {aka 'std::vector<int>'}
32 | vi[b-1]++;
| ^
a.cc:32:11: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:32:16: error: expected initializer before '++' token
32 | vi[b-1]++;
| ^~
a.cc:32:16: error: expected ';' before '++' token
|
s071078698 | p03720 | C | #include <stdio.h>
main(){
int N, M;
scanf("%d %d",&N,&M);
int A[50], B[50];
for(int i = 0; i < M; i++){
scanf("%d",&A[i]);
scanf("%d",&B[i]);
}
int road[N];
for(int i = 0; i < M; i++){
road[A[i] - 1]++;
road[B[i] - 1]++;
}
for(int i = 0; i < N; i++){
pritnf("%d\n",road[i]);
}
} | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:17:3: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
17 | pritnf("%d\n",road[i]);
| ^~~~~~
| printf
|
s140158142 | p03720 | C | #include <stdio.h>
main(){
int N, M;
scanf("%d %d",&N,&M);
int A[50], B[50];
for(int i = 0; i < M; i++){
scanf("%d",&A[i]);
scanf("%d",&B[i]);
}
int road[N];
for(int i = 0; i < M; i++){
roaa[A[i] - 1]++;
road[B[i] - 1]++;
}
for(int i = 0; i < N; i++){
pritnf("%d\n",road[i]);
}
} | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:13:5: error: 'roaa' undeclared (first use in this function); did you mean 'road'?
13 | roaa[A[i] - 1]++;
| ^~~~
| road
main.c:13:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:3: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
17 | pritnf("%d\n",road[i]);
| ^~~~~~
| printf
|
s634029467 | p03720 | C | #include <stdio.h>
main(){
int N, M;
scanf("%d %d",&N,&M);
int A[50], B[50];
for(int i = 0; i < M; i++){
scanf("%d",&A[i]);
scanf("%d",&B[i]);
}
int road[N];
for(int i = 0; i < M; i++){
roaa[A[i] - 1]++;
road[B[i] - 1]++;
}
for(int i = 0; i < N; i++){
pritnf("%d",road[i]);
}
} | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:13:5: error: 'roaa' undeclared (first use in this function); did you mean 'road'?
13 | roaa[A[i] - 1]++;
| ^~~~
| road
main.c:13:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:3: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
17 | pritnf("%d",road[i]);
| ^~~~~~
| printf
|
s306773383 | p03720 | Java | List<String> firstRow = Arrays.asList(br.readLine().split(" "));
| Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
List<String> firstRow = Arrays.asList(br.readLine().split(" "));
^
(use --enable-preview to enable unnamed classes)
1 error
|
s440586242 | p03720 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
int N , M;
cin >> N >> M;
vector <int> a(N) , b(N);
for(int i = 0; i < N; i++){
cin >> a.at(i) >> b.at(i);
}
vector <int> t(N);
for (int i = 0; i < N; i++) {
t[i] = 0;
}
for (int i = 0; i < M; ++i) {
t[a[i] - 1] += 1;
[b[i] - 1] += 1;
}
for (int i = 0; i < N; ++i) {
cout << t[i] << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:19:11: error: expected ',' before '[' token
19 | [b[i] - 1] += 1;
| ^
| ,
a.cc:19:11: error: expected identifier before '[' token
a.cc: In lambda function:
a.cc:19:20: error: expected '{' before '+=' token
19 | [b[i] - 1] += 1;
| ^~
a.cc: In function 'int main()':
a.cc:19:20: error: no match for 'operator+=' (operand types are 'main()::<lambda()>' and 'int')
19 | [b[i] - 1] += 1;
| ~~~~~~~~~~~^~~~
|
s799212245 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
vector<int> a(M), b(M);
cin >> N >> M;
for (imt j=0;j<N;j++) {
int x=0;
for (int i=0;i<M;i++) {
cin >> a.at(i) >> b.at(i);
if(a.at(i)==j+1||b.at(i)==j+1) {
x++;
}
cout << x << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:9:8: error: 'imt' was not declared in this scope; did you mean 'int'?
9 | for (imt j=0;j<N;j++) {
| ^~~
| int
a.cc:9:16: error: 'j' was not declared in this scope
9 | for (imt j=0;j<N;j++) {
| ^
|
s195145624 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
vector<int> a(M), b(M);
cin >> N >> M;
for (imt j=0;j<N;j++) {
for (int i=0;i<M;i++) {
cin >> a.at(i) >> b.at(i);
if(a.at(i)==j+1||b.at(i)==j+1) {
int x=0;
x++;
}
cout << x << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:9:8: error: 'imt' was not declared in this scope; did you mean 'int'?
9 | for (imt j=0;j<N;j++) {
| ^~~
| int
a.cc:9:16: error: 'j' was not declared in this scope
9 | for (imt j=0;j<N;j++) {
| ^
a.cc:19:15: error: 'x' was not declared in this scope
19 | cout << x << endl;
| ^
|
s267158954 | p03720 | C | #include <stdio.h>
int main()
{
int i, N, M, a[51], b[51];
scanf("%d %d", &N, &M&);
for (i = 1; i <= M; i++) scanf("%d %d", &(a[i]), &(b[i]));
int deg[51] = {};
for (i = 1; i <= M; i++) {
deg[a[i]]++;
deg[b[i]]++;
}
for (i = 1; i <= N; i++) printf("%d\n", deg[i]);
fflush(stdout);
return 0;
} | main.c: In function 'main':
main.c:6:31: error: expected expression before ')' token
6 | scanf("%d %d", &N, &M&);
| ^
|
s759466507 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
cin >> N >> M;
vector<int> city(3,0);
for ( int i=0; i < M; i++){
cin >> a >> b;
city[a-1]+=1;
city[b-1]+=1;
i++;
}
for ( int i=0; i<N; i++){
cout << city[i] << endl;
}
}
| a.cc: In function 'int main()':
a.cc:5:10: error: 'N' was not declared in this scope
5 | cin >> N >> M;
| ^
a.cc:5:15: error: 'M' was not declared in this scope
5 | cin >> N >> M;
| ^
a.cc:8:12: error: 'a' was not declared in this scope
8 | cin >> a >> b;
| ^
a.cc:8:17: error: 'b' was not declared in this scope
8 | cin >> a >> b;
| ^
|
s859882474 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> vec(n)
for (int i=0; i<m; i++){
int a,b;
cin >> a >> b;
vec.at(a-1)++;
vec.at(b-1)++;
}
for (int i=0; i<n; i++){
cout << vec.at(i) << endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'for'
10 | for (int i=0; i<m; i++){
| ^~~
a.cc:10:17: error: 'i' was not declared in this scope
10 | for (int i=0; i<m; i++){
| ^
|
s982023452 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
cin >> N >> M;
vector<int> vec1(M);
vecotr<int> vec2(M);
for (int i=0;i<M;i++){
cin >> vec1.at(i) >> vec2.at(i);
}
for(int i=1;i<=N;i++){
int x=0;
for(int j=0;j<M;j++){
if(i==vec1.at(j)||i==vec2.at(j)){
x++;
}
}
cout << x <<endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:3: error: 'vecotr' was not declared in this scope
7 | vecotr<int> vec2(M);
| ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
7 | vecotr<int> vec2(M);
| ^~~
a.cc:9:26: error: 'vec2' was not declared in this scope; did you mean 'vec1'?
9 | cin >> vec1.at(i) >> vec2.at(i);
| ^~~~
| vec1
a.cc:14:28: error: 'vec2' was not declared in this scope; did you mean 'vec1'?
14 | if(i==vec1.at(j)||i==vec2.at(j)){
| ^~~~
| vec1
|
s113387934 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
cin >> N >> M;
vector<int> vec1(M);
vecotr<int> vec2(M);
for (int i=0;i<M;i++){
cin >> vec1.at(i) >> vec2.at(i);
}
for(int i=1;i<=N;i++){
int x=0;
for(int j=0;j<M;j++){
if(i==vec1.at(j)||i==vec2.at(j)){
x++;
}
}
cout << x <<endl;
}
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'vecotr' was not declared in this scope
7 | vecotr<int> vec2(M);
| ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
7 | vecotr<int> vec2(M);
| ^~~
a.cc:9:26: error: 'vec2' was not declared in this scope; did you mean 'vec1'?
9 | cin >> vec1.at(i) >> vec2.at(i);
| ^~~~
| vec1
a.cc:14:28: error: 'vec2' was not declared in this scope; did you mean 'vec1'?
14 | if(i==vec1.at(j)||i==vec2.at(j)){
| ^~~~
| vec1
|
s326316728 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M; cin >> N >> M;
vector<int> c(M * 2);
for(int i = 0; i < M * 2; i++){
cin >> c.at(i);
}
for(int j = 0; j < M; j++){
int n = 0;
for(int i = 0; i < M * 2; i++){
if(c.at(i) == j + 1) n++;
else continue;
}
if(n != 0) cout << n << endl;
else continue
}
}
| a.cc: In function 'int main()':
a.cc:19:18: error: expected ';' before '}' token
19 | else continue
| ^
| ;
20 | }
| ~
|
s284756009 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M; cin >> N >> M;
vector<int> c(M * 2);
for(int i = 0; i < M * 2; i++){
cin >> c;
}
for(int j = 0; j < M; j++){
int n = 0;
for(int i = 0; i < M * 2; i++){
if(c.at(i) == j + 1) n++;
else continue;
}
cout << n << endl;
}
}
| a.cc: In function 'int main()':
a.cc:9:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
9 | cin >> c;
| ~~~ ^~ ~
| | |
| | std::vector<int>
| std::istream {aka std::basic_istream<char>}
In file included 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/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
| ~~~~~~~~~~~~~~~~~~^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cst |
s453393244 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M; cin >> N >> M;
vector(int) c(M * 2);
for(int i = 0; i < M * 2; i++){
cin >> c;
}
for(int j = 0; j < M; j++){
int n = 0;
for(int i = 0; i < M * 2; i++){
if(c.at(i) == j + 1) n++;
else continue;
}
cout << n << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:9: error: missing template arguments before '(' token
7 | vector(int) c(M * 2);
| ^
a.cc:7:10: error: expected primary-expression before 'int'
7 | vector(int) c(M * 2);
| ^~~
a.cc:9:12: error: 'c' was not declared in this scope
9 | cin >> c;
| ^
a.cc:15:14: error: 'c' was not declared in this scope
15 | if(c.at(i) == j + 1) n++;
| ^
|
s844636226 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M; cin >> N >> M;
vector(int) c(M * 2);
for(int i = 0; i < M * 2; i++){
cin >> c;
}
for(int j = 0; j < M; j++){
int n = 0;
for(int i = 0; i < M * 2; i++){
if(c.at(i) == j + 1) n++;
else continue;
}
cout << n << endl;
}
}
| a.cc:8:22: error: extended character is not valid in an identifier
8 | for(int i = 0; i < M * 2; i++){
| ^
a.cc: In function 'int main()':
a.cc:7:9: error: missing template arguments before '(' token
7 | vector(int) c(M * 2);
| ^
a.cc:7:10: error: expected primary-expression before 'int'
7 | vector(int) c(M * 2);
| ^~~
a.cc:8:22: error: 'M\U00003000' was not declared in this scope
8 | for(int i = 0; i < M * 2; i++){
| ^~~
a.cc:9:12: error: 'c' was not declared in this scope
9 | cin >> c;
| ^
a.cc:15:14: error: 'c' was not declared in this scope
15 | if(c.at(i) == j + 1) n++;
| ^
|
s280067525 | p03720 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s490941536 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N,M;
int tmp1,tmp2;
cin >>N>>M;
vector <int> hasi(N);
for(int i=0;i<M;i++){
cin >> tmp1>>tmp2;
hasi.at(tmp1-1)++;
hasi.at(tmp2-1)++;
}
for(int i=0;i<N;i++)
cout << hasi.at | a.cc: In function 'int main()':
a.cc:17:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
17 | cout << hasi.at
| ~~~~ ^~ ~~~~~~~
| | |
| | <unresolved overloaded function type>
| std::ostream {aka std::basic_ostream<char>}
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,
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<<( |
s652994371 | p03720 | C++ | //どの道が幾つの街を繋げれるか
#include <bits/stdc++.h>
using namespace std;
int main() {
int N ,M; //,a ,b;
cin >> N >> M;
vector<int> a(M);
vector<int> b(M);
vector<int> c(N); //= 0;
// vector<int> c(M) = 0; (M)だとだいいから外れる
// vector<string> だと3+3=33になる
for (int i=0;i<M;i++){
cin >> a.at(i) >> b.at(i);
}
cout << endl;
for (int i=0;i<M;i++){
for (int j=0;j<N;j++){
if ( a.at(i) == j ){
c.at(j) = c.at(j) + 1
}
else if ( b.at(i) == j ){
c.at(j) = c.at(j) + 1
}
cout << c.at(i) << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:24:26: error: expected ';' before '}' token
24 | c.at(j) = c.at(j) + 1
| ^
| ;
25 | }
| ~
a.cc:27:26: error: expected ';' before '}' token
27 | c.at(j) = c.at(j) + 1
| ^
| ;
28 | }
| ~
|
s346412089 | p03720 | C++ | //どの道が幾つの街を繋げれるか
#include <bits/stdc++.h>
using namespace std;
int main() {
int N ,M ,a ,b;
cin >> N >> M;
vector<int> a(M);
vector<int> b(M);
vector<int> c(N) = 0;
// vector<int> c(M) = 0; (M)だとだいいから外れる
// vector<string> だと3+3=33になる
for (int i=0;i<M;i++){
cin >> a.at(i) >> b.at(i);
}
cout << endl;
for (int i=0;i<M;i++){
for (int j=0;j<N;j++){
if ( a.at(i) == j ){
c.at(j) = c.at(j) + 1
}
else if ( b.at(i) == j ){
c.at(j) = c.at(j) + 1
}
cout << c.at(i) << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:10:15: error: conflicting declaration 'std::vector<int> a'
10 | vector<int> a(M);
| ^
a.cc:8:13: note: previous declaration as 'int a'
8 | int N ,M ,a ,b;
| ^
a.cc:11:15: error: conflicting declaration 'std::vector<int> b'
11 | vector<int> b(M);
| ^
a.cc:8:16: note: previous declaration as 'int b'
8 | int N ,M ,a ,b;
| ^
a.cc:12:20: error: expected ',' or ';' before '=' token
12 | vector<int> c(N) = 0;
| ^
a.cc:17:14: error: request for member 'at' in 'a', which is of non-class type 'int'
17 | cin >> a.at(i) >> b.at(i);
| ^~
a.cc:17:25: error: request for member 'at' in 'b', which is of non-class type 'int'
17 | cin >> a.at(i) >> b.at(i);
| ^~
a.cc:23:13: error: request for member 'at' in 'a', which is of non-class type 'int'
23 | if ( a.at(i) == j ){
| ^~
a.cc:24:26: error: expected ';' before '}' token
24 | c.at(j) = c.at(j) + 1
| ^
| ;
25 | }
| ~
a.cc:26:17: error: request for member 'at' in 'b', which is of non-class type 'int'
26 | else if ( b.at(i) == j ){
| ^~
a.cc:27:26: error: expected ';' before '}' token
27 | c.at(j) = c.at(j) + 1
| ^
| ;
28 | }
| ~
|
s815342771 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<string> town(M*2);
for (int i=0; i<M*2; i++){
cin >> town.at(i);
}
vector<int> count(N);
for(int i=0; i<N; i++) {
for(int j=0; j<M*2; j++) {
if (town.at(j) = i+1) {
count.at(i) += 1;
}
}
cout << count.at(i) << endl;
}
}
| a.cc: In function 'int main()':
a.cc:18:22: error: could not convert '(& town.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)j)))->std::__cxx11::basic_string<char>::operator=(((int)((char)(i + 1))))' from 'std::__cxx11::basic_string<char>' to 'bool'
18 | if (town.at(j) = i+1) {
| ~~~~~~~~~~~^~~~~
| |
| std::__cxx11::basic_string<char>
|
s616014036 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<string> town(M*2);
for (int i=0; i<M*2; i++){
cin >> town.at(i);
}
vector<int> count(N);
for(int i=0; i<N; i++) {
for(int j=0; j<M*2; j++) {
if (road.at(j) = i+1) {
count.at(i) += 1;
}
}
cout << count.at(i) << endl;
}
}
| a.cc: In function 'int main()':
a.cc:18:11: error: 'road' was not declared in this scope; did you mean 'read'?
18 | if (road.at(j) = i+1) {
| ^~~~
| read
|
s276245151 | p03720 | C++ | #include <bits/stdc++.h.
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> city(N, 0);
for (int i = 0; i < M; i++) {
int a, b;
cin >> a >> b;
city.at(a - 1)++;
city.at(b - 1)++;
}
for (int i = 0; i < M; i++) {
cout << city.at(i) << endl;
}
} | a.cc:1:25: error: missing terminating > character
1 | #include <bits/stdc++.h.
| ^
a.cc:1:10: fatal error: bits/stdc++.h.: No such file or directory
1 | #include <bits/stdc++.h.
| ^
compilation terminated.
|
s487612392 | p03720 | C++ | #include<bits/stdc.h>
using namespace std;
int main(){
int city,street;
cin >> city>>street;
vector<int> num(2*street);
for(int i=0;i<2*street;i++){
cin >> num[i];
}
for(int i=0;i<city;i++){
int ans=0;
for(int j=0;j<2*street;j++){
if(num[j]==i){ans++;}
}
cout << ans <<endl;
}
}
| a.cc:1:9: fatal error: bits/stdc.h: No such file or directory
1 | #include<bits/stdc.h>
| ^~~~~~~~~~~~~
compilation terminated.
|
s687978286 | p03720 | C++ | #include<bits/studio.h>
using namespace std;
int main(){
int city,street;
cin >> city>>street;
vector<int> num(2*street);
for(int i=0;i<2*street;i++){
cin >> num[i];
}
for(int i=0;i<city;i++){
int ans=0;
for(int j=0;j<2*street;j++){
if(num[j]==i){ans++;}
}
cout << ans <<endl;
}
} | a.cc:1:9: fatal error: bits/studio.h: No such file or directory
1 | #include<bits/studio.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s243071651 | p03720 | C | #include<stdio.h>
int main(){
int N,M;
scanf("%d %d",&N,&M);
int a[M]
int b[M];
int i;
int count[50]={0};
for(i=0;i<M;i++){
scanf("%d %d",&a[i],&b[i]);
count[a[i]]++;
}
for(i=0;i<M;i++){
count[b[i]]++;
}
for(i=1;i<=N;i++){
printf("%d\n",count[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:5:11: error: expected ';' before 'int'
5 | int a[M]
| ^
| ;
6 | int b[M];
| ~~~
main.c:10:20: error: 'a' undeclared (first use in this function)
10 | scanf("%d %d",&a[i],&b[i]);
| ^
main.c:10:20: note: each undeclared identifier is reported only once for each function it appears in
|
s388033744 | p03720 | C | #include<stdio.h>
int main(){
int N,M;
scanf("%d %d",&N,&M);
int a[M]
int b[M];
int i;
int count[50]={0};
for(i=0;i<M;i++){
scanf("%d %d",&a[i],&b[i]);
count[a[i]]++;
}
for(i=0;i<M;i++){
count[b[i]]++;
}
for(i=1;i<=N;i++){
printf("%d\n",count[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:5:11: error: expected ';' before 'int'
5 | int a[M]
| ^
| ;
6 | int b[M];
| ~~~
main.c:10:20: error: 'a' undeclared (first use in this function)
10 | scanf("%d %d",&a[i],&b[i]);
| ^
main.c:10:20: note: each undeclared identifier is reported only once for each function it appears in
|
s306120879 | p03720 | C++ | #include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
cin >> N >> M;
vector<int> vec(2*M):
vector<int> ans(N,0);
for(int i=0;i<2*M;i++){
cin >>vec.at(i);
}
for(int i=1;i<N+1;i++){
for(int k=0;k<2*M;k++){
if(vec[k]==i) ++ans[i];
}
cout << ans[i] << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:29: error: expected ',' or ';' before ':' token
7 | vector<int> vec(2*M):
| ^
a.cc:14:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
14 | if(vec[k]==i) ++ans[i];
| ^~~
| abs
a.cc:16:21: error: 'ans' was not declared in this scope; did you mean 'abs'?
16 | cout << ans[i] << endl;
| ^~~
| abs
|
s632004241 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,m,h;
cin>>n>>m;
int a[n];
for(int i=0;i<n;i++)
{
a[i]=0;
}
for(int i=0;i<m;i++)
int t;
int r;
cin>>t>>r;
a[t-1]++;
a[r-1]++;
}
for(h=0;h<n;h++)
{
cout<<a[h]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:20:10: error: 't' was not declared in this scope
20 | cin>>t>>r;
| ^
a.cc: At global scope:
a.cc:26:3: error: expected unqualified-id before 'for'
26 | for(h=0;h<n;h++)
| ^~~
a.cc:26:11: error: 'h' does not name a type
26 | for(h=0;h<n;h++)
| ^
a.cc:26:15: error: 'h' does not name a type
26 | for(h=0;h<n;h++)
| ^
a.cc:33:1: error: expected declaration before '}' token
33 | }
| ^
|
s709212670 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,m;
cin>>n>>m;
int a[n];
for(int i=0;i<n;i++)
a[i]=0;
for(int i=0;i<m;i++)
int t=0;
int r=0;
cin>>t>>r;
a[t-1]++;
a[r-1]++;
}
for(int h=0;h<n;h++)
{
cout<<a[h]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:18:10: error: 't' was not declared in this scope
18 | cin>>t>>r;
| ^
a.cc: At global scope:
a.cc:24:3: error: expected unqualified-id before 'for'
24 | for(int h=0;h<n;h++)
| ^~~
a.cc:24:15: error: 'h' does not name a type
24 | for(int h=0;h<n;h++)
| ^
a.cc:24:19: error: 'h' does not name a type
24 | for(int h=0;h<n;h++)
| ^
a.cc:31:1: error: expected declaration before '}' token
31 | }
| ^
|
s190426859 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,m;
cin>>n>>m;
int a[n];
for(int i=0;i<n;i++)
{
a[i]=0;
}
for(int i=0;i<m;i++)
int ai;
int bi;
cin>>ai>>bi;
a[ai-1]++;
a[bi-1]++;
}
for(int i=0;i<n;i++)
{
cout<<a[i]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:20:10: error: 'ai' was not declared in this scope; did you mean 'bi'?
20 | cin>>ai>>bi;
| ^~
| bi
a.cc: At global scope:
a.cc:26:3: error: expected unqualified-id before 'for'
26 | for(int i=0;i<n;i++)
| ^~~
a.cc:26:15: error: 'i' does not name a type
26 | for(int i=0;i<n;i++)
| ^
a.cc:26:19: error: 'i' does not name a type
26 | for(int i=0;i<n;i++)
| ^
a.cc:33:1: error: expected declaration before '}' token
33 | }
| ^
|
s488951923 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,m;
cin>>n>>m;
int a[n];
for(int i=0;i<n;i++)
a[i]=0;
for(int i=0;i<m;i++)
int ai=0;
int bi=0;
cin>>ai>>bi;
a[ai-1]++;
a[bi-1]++;
}
for(int i=0;i<n;i++)
{
cout<<a[i]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:18:10: error: 'ai' was not declared in this scope; did you mean 'bi'?
18 | cin>>ai>>bi;
| ^~
| bi
a.cc: At global scope:
a.cc:24:3: error: expected unqualified-id before 'for'
24 | for(int i=0;i<n;i++)
| ^~~
a.cc:24:15: error: 'i' does not name a type
24 | for(int i=0;i<n;i++)
| ^
a.cc:24:19: error: 'i' does not name a type
24 | for(int i=0;i<n;i++)
| ^
a.cc:31:1: error: expected declaration before '}' token
31 | }
| ^
|
s691593611 | p03720 | C++ | 4 3
1 2
2 3
1 4 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4 3
| ^
|
s724022194 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
vector<int> out;
//入力部
for (int j=0;j<M;j++) {
int x,y;
cin >> x >> y;
out.at(x)++;
out.at(y)++;
}
//出力部
for (int i=0;i<N;i++) {
cout << out.at(i) << endl;
} | a.cc: In function 'int main()':
a.cc:18:2: error: expected '}' at end of input
18 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s126304789 | p03720 | C | #include<stdio.h>
int main(void){
int n,m;
scanf("%d %d",&n,&m);
int a[50],b[50];
for(int i=0;i<m;++i){
scanf("%d %d",&a[i],&b[i]);
}
int road[50];
for (int i = 0; i < N; ++i){
road[i] = 0;
}
for(int i=0;i<m;++i){
road[a[i]-1]+=1;
road[b[i]-1]+=1;
}
for(int i=0;i<n;++i){
printf("%d",road[i]);
}
return 0;
} | main.c: In function 'main':
main.c:10:23: error: 'N' undeclared (first use in this function)
10 | for (int i = 0; i < N; ++i){
| ^
main.c:10:23: note: each undeclared identifier is reported only once for each function it appears in
|
s996829944 | p03720 | C++ | import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *
import math
from functools import reduce
def gcd(*numbers):
return reduce(math.gcd, numbers)
def gcd_list(numbers):
return reduce(math.gcd, numbers)
if __name__ == '__main__':
a,b = map(int,input().split())
list = [0]*a
for i in range(b):
n,m=map(int, input().split())
list[n-1]+=1
list[m-1]+=1
for i in list:
print(i) | a.cc:21:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
21 | if __name__ == '__main__':
| ^~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s476836212 | p03720 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s713764550 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N,M;
vector<string> a(N+1);
int i;
for(i=0;i<M;i++){
int s;
cin >> s;
a.at(s)++;
}
for(i=1;i<N+1;i++){
cout<<a.at(i)<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:12:12: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
12 | a.at(s)++;
| ~~~~~~~^~
|
s842200978 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
vector<int> a(2*M);
int x=0;
for(int i=0;i<2*M;i++) {
cin >> a.at(i);
}
for(int i=0;i<N;i++) {
for(int l=0;l<2*M;l++) {
if(a.at(l)==i+1) {
x++;
}
}
cout << x << endl;
x=0:
}
}
| a.cc: In function 'int main()':
a.cc:21:8: error: expected ';' before ':' token
21 | x=0:
| ^
| ;
|
s147977372 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector(int) buf(N);
for (int i = 1; i < M + 1; i++) {
int a, b;
cin >> a >> b;
if (a == i) {
buf.at(i) += 1;
}
if (b == i) {
buf.at(i) += 1;
}
}
} | a.cc: In function 'int main()':
a.cc:7:9: error: missing template arguments before '(' token
7 | vector(int) buf(N);
| ^
a.cc:7:10: error: expected primary-expression before 'int'
7 | vector(int) buf(N);
| ^~~
a.cc:12:7: error: 'buf' was not declared in this scope
12 | buf.at(i) += 1;
| ^~~
a.cc:15:7: error: 'buf' was not declared in this scope
15 | buf.at(i) += 1;
| ^~~
|
s139733136 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int i = 0; i < N; i++) {
int ans = 0;
for (int j = 0; j < M; j++) {
vector<int> vec(2);
cin >> vec;
if (vec.at(0) == i) {
ans++;
}
if (vec.at(1) == i) {
ans++;
}
}
cout << ans << endl;
}
}
| a.cc: In function 'int main()':
a.cc:12:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
12 | cin >> vec;
| ~~~ ^~ ~~~
| | |
| | std::vector<int>
| std::istream {aka std::basic_istream<char>}
In file included 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/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
| ~~~~~~~~~~~~~~~~~~^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/in |
s938492650 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N, M;
cin >> N >> M;
vector<int> cities(N), roads(2M);
for(int i = 0;i<2M;i++){
cin >> roads(i);
}
for(int j = 0;j<2M;j++){
int c;
c = roads(j);
c = c-1;
cities.at(c)++;
}
for(int k = 0;k<N;k++){
cout << cities(k) << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:38: error: unable to find numeric literal operator 'operator""M'
7 | vector<int> cities(N), roads(2M);
| ^~
a.cc:9:25: error: unable to find numeric literal operator 'operator""M'
9 | for(int i = 0;i<2M;i++){
| ^~
a.cc:10:29: error: no match for call to '(std::vector<int>) (int&)'
10 | cin >> roads(i);
| ~~~~~^~~
a.cc:13:25: error: unable to find numeric literal operator 'operator""M'
13 | for(int j = 0;j<2M;j++){
| ^~
a.cc:15:26: error: no match for call to '(std::vector<int>) (int&)'
15 | c = roads(j);
| ~~~~~^~~
a.cc:21:31: error: no match for call to '(std::vector<int>) (int&)'
21 | cout << cities(k) << endl;
| ~~~~~~^~~
|
s475194597 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M,i;
vector<int> vecA(M)
cin>>N>>M;
for(i=0;i<M;i++){
vector<int> vec(2);
cin>>vec.at(0)>>vec.at(1);
if(vec.at(0)==i+1)vecA.at(i)++;
if(vec.at(1)==i+1)vecA.at(i)++;
}
for(i=0;i<N;i++)cout<<vecA.at(i)<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'cin'
7 | cin>>N>>M;
| ^~~
|
s310741642 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,m,ans[100]={};
cin>>n>>m;
for(int i=0;i<n;i++){
for(int j=0;j<2;j++){
cin>>t;
ans[t]++;
}
}
for(int i=1;i<=n;i++){
cout<<ans[i]<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:9:12: error: 't' was not declared in this scope
9 | cin>>t;
| ^
|
s112330170 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,m;
cin >> n>>m;
vector<int>count(m);
for(int i = 0;i <m;i++){
cin >> a >> b;
count[a-1]++;
count[b-1]++;
}
for(int i = 0;i < n;i++){
cout << count[i] <<endl;
}
} | a.cc: In function 'int main()':
a.cc:9:10: error: 'a' was not declared in this scope
9 | cin >> a >> b;
| ^
a.cc:9:15: error: 'b' was not declared in this scope
9 | cin >> a >> b;
| ^
|
s653741168 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
vector<int> Load;
cin>>N>>M>>Load;
} | a.cc: In function 'int main()':
a.cc:7:14: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
7 | cin>>N>>M>>Load;
| ~~~~~~~~~^~~~~~
| | |
| | std::vector<int>
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
In file included 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/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
| ~~~~~~~~~~~~~~~~~~^~~~
In file include |
s148459804 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
vector <int>a(M),b(M);
for(int i=0;i<M;i++) {
cin >> a.at(M);
}
for(int i=0;i<M;i++) {
cin >> b.at(M);
}
int sum=0;
for(int i=0;i<N;i++) {
for(int j=0;j<N;j++) {
if(a.at(i)==b.at(j)>0) {
cout << sum +=1 << endl;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:19:25: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
19 | cout << sum +=1 << endl;
| ~~^~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.