submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s993137631 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;
const double eps = 1e-10;
template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}
template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}
template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value!=0>::type
fill_v(U &u,const V... v){u=U(v...);}
template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value==0>::type
fill_v(U &u,const V... v){
for(auto &e:u) fill_v<T>(e,v...);
}
int main(void) {
string s[3];
REP(i, 3) cin >> s[i];
cout << "A"+s[1][0]+"C" << endl;
}
| a.cc: In function 'int main()':
a.cc:46:24: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
46 | cout << "A"+s[1][0]+"C" << endl;
| ^~~~
| |
| const char [2]
|
s785321309 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s="";
getline(cin,s);
int x=s.length();
cout<<s[0]<<s[8]<<s[x-7];
| a.cc: In function 'int main()':
a.cc:9:34: error: expected '}' at end of input
9 | cout<<s[0]<<s[8]<<s[x-7];
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s842594751 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s="";
getline(cin,s);
int x=s.length();
cout<<s[0]<<s[8]<<s[x-7];
| a.cc: In function 'int main()':
a.cc:9:34: error: expected '}' at end of input
9 | cout<<s[0]<<s[8]<<s[x-7];
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s433908318 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S,B,D;
cin>>S>>B>>D;
cout<<"A"+B.at(0)+"C"<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:18: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
6 | cout<<"A"+B.at(0)+"C"<<endl;
| ~~~~~~~~~~~^~~~
| | |
| | const char [2]
| const char*
|
s176534159 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S,B,D;
cin>>S>>B>>D;
cout<<"A"+'B.at(0)'+"C"<<endl;
}
| a.cc:6:11: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
6 | cout<<"A"+'B.at(0)'+"C"<<endl;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:20: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
6 | cout<<"A"+'B.at(0)'+"C"<<endl;
| ~~~~~~~~~~~~~^~~~
| | |
| | const char [2]
| const char*
|
s781258141 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S,B,D;
cin>>S>>B>>D;
cout<<"A"+B.at(0)+"C"<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:18: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
6 | cout<<"A"+B.at(0)+"C"<<endl;
| ~~~~~~~~~~~^~~~
| | |
| | const char [2]
| const char*
|
s319733057 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S,B,D;
cin>>S>>B>>D;
cout<<A+B.at(0)+C<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:7: error: 'A' was not declared in this scope
6 | cout<<A+B.at(0)+C<<endl;
| ^
a.cc:6:17: error: 'C' was not declared in this scope
6 | cout<<A+B.at(0)+C<<endl;
| ^
|
s115483325 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string = S;
cin >> S;
cout << 'A' + S.at(0) + 'C' << endl;
} | a.cc: In function 'int main()':
a.cc:4:8: error: expected unqualified-id before '=' token
4 | string = S;
| ^
a.cc:5:8: error: 'S' was not declared in this scope
5 | cin >> S;
| ^
|
s921696312 | p03860 | C++ | #include<iostream>
using namespace std;
#include<string>
int main() {
string s;
getline(cin,s);
for(int i=0;i<s.length();i++){
if(i==0){
cout<<s[0];
}
if(s[i}] ==' ') {
cout<<s[i+1];
}
}
} | a.cc: In function 'int main()':
a.cc:11:26: error: expected ']' before '}' token
11 | if(s[i}] ==' ') {
| ^
| ]
a.cc:11:26: error: expected ')' before '}' token
11 | if(s[i}] ==' ') {
| ~ ^
| )
a.cc:11:26: error: expected primary-expression before '}' token
a.cc:11:27: error: expected primary-expression before ']' token
11 | if(s[i}] ==' ') {
| ^
a.cc: At global scope:
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s285107121 | p03860 | C++ | #include<iostream>
using namespace std;
#include<string>
int main() {
string s;
getline(cin,s);
for(int i=0;i<s.length();i++){
if(i==0){
cout<<s[0];
}
if(s[i}] =='') {
cout<<s[i+1];
}
}
} | a.cc:11:12: error: empty character constant
11 | if(s[i}] =='') {
| ^~
a.cc: In function 'int main()':
a.cc:11:7: error: expected ']' before '}' token
11 | if(s[i}] =='') {
| ^
| ]
a.cc:11:7: error: expected ')' before '}' token
11 | if(s[i}] =='') {
| ~ ^
| )
a.cc:11:7: error: expected primary-expression before '}' token
a.cc:11:8: error: expected primary-expression before ']' token
11 | if(s[i}] =='') {
| ^
a.cc: At global scope:
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s842495671 | p03860 | C++ | #include<iostream>
using namespace std;
#include<string>
int main() {
string m;
getline(cin, s);
for(int i=0;i<s.length();i++){
if(i==0){
cout<<s[0];
}
if(s[i}] =='') {
cout<<s[i+1];
}
}
} | a.cc:11:12: error: empty character constant
11 | if(s[i}] =='') {
| ^~
a.cc: In function 'int main()':
a.cc:6:14: error: 's' was not declared in this scope
6 | getline(cin, s);
| ^
a.cc:11:7: error: expected ']' before '}' token
11 | if(s[i}] =='') {
| ^
| ]
a.cc:11:7: error: expected ')' before '}' token
11 | if(s[i}] =='') {
| ~ ^
| )
a.cc:11:7: error: expected primary-expression before '}' token
a.cc:11:8: error: expected primary-expression before ']' token
11 | if(s[i}] =='') {
| ^
a.cc: At global scope:
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s974303478 | p03860 | C++ | #include<iostream>
using namespace std;
#include<string>
int main() {
string m;
getline(cin, s);
for(int i=0;i<s.length();i++){
if(i==0){
cout<<s[0];
}
if(s[i}] ==' ') {
cout<<s[i+1];
}
}
} | a.cc: In function 'int main()':
a.cc:6:14: error: 's' was not declared in this scope
6 | getline(cin, s);
| ^
a.cc:11:7: error: expected ']' before '}' token
11 | if(s[i}] ==' ') {
| ^
| ]
a.cc:11:7: error: expected ')' before '}' token
11 | if(s[i}] ==' ') {
| ~ ^
| )
a.cc:11:7: error: expected primary-expression before '}' token
a.cc:11:8: error: expected primary-expression before ']' token
11 | if(s[i}] ==' ') {
| ^
a.cc: At global scope:
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s712395724 | p03860 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
getline(cin,s);
for(int i=0;i<s.length();i++){
if(i==0){
cout<<s[0];
}
if(s[i]==''){
cout<<[i+1];
}
}
} | a.cc:11:26: error: empty character constant
11 | if(s[i]==''){
| ^~
a.cc: In function 'int main()':
a.cc:12:33: error: expected ',' before '+' token
12 | cout<<[i+1];
| ^
| ,
a.cc:12:33: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:12:36: error: expected '{' before ';' token
12 | cout<<[i+1];
| ^
a.cc: In function 'int main()':
a.cc:12:29: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'main()::<lambda()>')
12 | cout<<[i+1];
| ~~~~^~~~~~~
| | |
| | main()::<lambda()>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& st |
s585777228 | p03860 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
getline(cin,s);
for(int i=0;i<s.length();i++){
if(i==0){
cout<<s[0];
}
if(s[i]==' '){
cout<<[i+1];
}
}
} | a.cc: In function 'int main()':
a.cc:12:33: error: expected ',' before '+' token
12 | cout<<[i+1];
| ^
| ,
a.cc:12:33: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:12:36: error: expected '{' before ';' token
12 | cout<<[i+1];
| ^
a.cc: In function 'int main()':
a.cc:12:29: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'main()::<lambda()>')
12 | cout<<[i+1];
| ~~~~^~~~~~~
| | |
| | main()::<lambda()>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; _ |
s803111530 | p03860 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
getline(cin,s);
for(int i=0;i<s.length();i++){
if(i==0){
cout<<s[0];
}
if(s[i]==' '){
cout<<[s+1];
}
}
} | a.cc: In function 'int main()':
a.cc:12:33: error: expected ',' before '+' token
12 | cout<<[s+1];
| ^
| ,
a.cc:12:33: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:12:36: error: expected '{' before ';' token
12 | cout<<[s+1];
| ^
a.cc: In function 'int main()':
a.cc:12:29: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'main()::<lambda()>')
12 | cout<<[s+1];
| ~~~~^~~~~~~
| | |
| | main()::<lambda()>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; _ |
s350465906 | p03860 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string m;
getline(cin,m);
for(int i=0;i<m.length();i++){
if(i==0){
cout<<m[0];
}
if(m[i]==' '){
cout<<[m+1];
}
}
} | a.cc: In function 'int main()':
a.cc:12:33: error: expected ',' before '+' token
12 | cout<<[m+1];
| ^
| ,
a.cc:12:33: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:12:36: error: expected '{' before ';' token
12 | cout<<[m+1];
| ^
a.cc: In function 'int main()':
a.cc:12:29: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'main()::<lambda()>')
12 | cout<<[m+1];
| ~~~~^~~~~~~
| | |
| | main()::<lambda()>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; _ |
s340595926 | p03860 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string m;
getline(cin,m);
for(int i=0;i<m.length();i++){
if(i==0){
cout<<m[0];
}
if(s[m]==' '){
cout<<[m+1];
}
}
} | a.cc: In function 'int main()':
a.cc:11:20: error: 's' was not declared in this scope
11 | if(s[m]==' '){
| ^
a.cc:12:33: error: expected ',' before '+' token
12 | cout<<[m+1];
| ^
| ,
a.cc:12:33: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:12:36: error: expected '{' before ';' token
12 | cout<<[m+1];
| ^
a.cc: In function 'int main()':
a.cc:12:29: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'main()::<lambda()>')
12 | cout<<[m+1];
| ~~~~^~~~~~~
| | |
| | main()::<lambda()>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type |
s959040803 | p03860 | C++ | #include<iostream>
using namespace std;
#include<string>
int main(){
string m;
getline(cin,m);
for(int i=0;i<m.length();i++){
if(i==0){
cout<<s[0];
}
if(s[m]==' '){
cout<<[m+1];
}
}
} | a.cc: In function 'int main()':
a.cc:9:31: error: 's' was not declared in this scope
9 | cout<<s[0];
| ^
a.cc:11:20: error: 's' was not declared in this scope
11 | if(s[m]==' '){
| ^
a.cc:12:33: error: expected ',' before '+' token
12 | cout<<[m+1];
| ^
| ,
a.cc:12:33: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:12:36: error: expected '{' before ';' token
12 | cout<<[m+1];
| ^
a.cc: In function 'int main()':
a.cc:12:29: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'main()::<lambda()>')
12 | cout<<[m+1];
| ~~~~^~~~~~~
| | |
| | main()::<lambda()>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' 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 'main()::<lambda()>' to 'const void*'
301 | operator<<(const void* __p)
| |
s399816340 | p03860 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main(){
string s;
getline(cin,s);
for(int j=0;j<s.length();j++){
for(char i='A';i<='Z';i++){
if(i==s[j])
cout<<i;
}
}
| a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s749799898 | p03860 | C++ | #include<iostream>
using namespace std;
int main(){
string x,y,z;
cin>>x,y,z;
cout<<x[0]<<y[0]<<z[0]; | a.cc: In function 'int main()':
a.cc:6:24: error: expected '}' at end of input
6 | cout<<x[0]<<y[0]<<z[0];
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s333647110 | p03860 | C++ | #include<iostream>
#include<stdio.h>
#include<String.h>
using namespace std;
int main(){
string x,y,z;
scanf("%s %s %s",&x,&y,&z);
printf("%s %s %s",x[0],y[0],z[0]);
} | a.cc:3:9: fatal error: String.h: No such file or directory
3 | #include<String.h>
| ^~~~~~~~~~
compilation terminated.
|
s111079217 | p03860 | C | #inculde <stdio.h>
int main(){
char str[1024];
scanf("%s",str);
printf("A%cC\n",str[0]);
return (0);
} | main.c:1:2: error: invalid preprocessing directive #inculde; did you mean #include?
1 | #inculde <stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | scanf("%s",str);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #inculde <stdio.h>
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | scanf("%s",str);
| ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
5 | printf("A%cC\n",str[0]);
| ^~~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s949243303 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
string A,B,C;
cin >> A >> B >> C;
cout << A[0] << B[0] << C[0] endl;
}
| a.cc: In function 'int main()':
a.cc:7:31: error: expected ';' before 'endl'
7 | cout << A[0] << B[0] << C[0] endl;
| ^~~~~
| ;
|
s469851688 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A,B,C;
cin >> A >> B >> C;
cout << A[0] << B[0] << C[0] endl;
}
| a.cc: In function 'int main()':
a.cc:7:31: error: expected ';' before 'endl'
7 | cout << A[0] << B[0] << C[0] endl;
| ^~~~~
| ;
|
s929717275 | p03860 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main(){
string a={'A','t','c','o','d','e','r'};
string s;
string b={'C','o','n','t','e','s','t'};
getline(cin,s);
cout<<a[0]<<b[0]<<c[0];
}
| a.cc: In function 'int main()':
a.cc:9:19: error: 'c' was not declared in this scope
9 | cout<<a[0]<<b[0]<<c[0];
| ^
|
s368892009 | p03860 | C++ | #include<iostream>
#include<sting.h>
using namespace std;
int main(){
string a={'A','t','c','o','d','e','r'};
string s;
string b={'C','o','n','t','e','s','t'};
getline(cin,s);
cout<<a[0]<<b[0]<<c[0];
} | a.cc:2:9: fatal error: sting.h: No such file or directory
2 | #include<sting.h>
| ^~~~~~~~~
compilation terminated.
|
s653969904 | p03860 | C++ | #include<iostream>
#include<sting.h>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
cout<<a[0]<<b[0]<<c[0];
} | a.cc:2:9: fatal error: sting.h: No such file or directory
2 | #include<sting.h>
| ^~~~~~~~~
compilation terminated.
|
s709329065 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
bool upper(char n)
{
return(n>=65&&n<97)
}
int main()
{
string a;
getlin (cin,a);
int len=a.length();
if(upper(a[0]))
cout<<a[0];
for(int i=1;i<len;i++)
{
if (upper(a[i])&&a[i-1]==' ')
cout<<a[i];
}
}
| a.cc: In function 'bool upper(char)':
a.cc:5:20: error: expected ';' before '}' token
5 | return(n>=65&&n<97)
| ^
| ;
6 | }
| ~
a.cc: In function 'int main()':
a.cc:10:1: error: 'getlin' was not declared in this scope; did you mean 'getline'?
10 | getlin (cin,a);
| ^~~~~~
| getline
|
s292397570 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string name;
cin >> name;
cout << A << name.at(8) << C << endl;
} | a.cc: In function 'int main()':
a.cc:8:13: error: 'A' was not declared in this scope
8 | cout << A << name.at(8) << C << endl;
| ^
a.cc:8:32: error: 'C' was not declared in this scope
8 | cout << A << name.at(8) << C << endl;
| ^
|
s915682821 | p03860 | C++ | #include <iostream>
using namespace std;
int main() {
string S;
cin >>a>>S>>b;
char s;
s = S[0];
cout << "A"<<s <<"C"<< endl;
}
| a.cc: In function 'int main()':
a.cc:6:15: error: 'a' was not declared in this scope
6 | cin >>a>>S>>b;
| ^
a.cc:6:21: error: 'b' was not declared in this scope
6 | cin >>a>>S>>b;
| ^
|
s793786556 | p03860 | C++ | #include<iostream>
using namespace std;
int main()
{
char s[100]={'\0'};
cin.getline(s);
for( int i=0;i<100;i++)
if(s[i]>=65&&s[i]<=90)
{cout <<s[i];}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: error: no matching function for call to 'std::basic_istream<char>::getline(char [100])'
7 | cin.getline(s);
| ~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:740:5: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize, char_type) [with _CharT = char; _Traits = std::char_traits<char>; char_type = char; std::streamsize = long int]'
740 | basic_istream<char>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:740:5: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/istream:520:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; char_type = char; std::streamsize = long int]'
520 | getline(char_type* __s, streamsize __n)
| ^~~~~~~
/usr/include/c++/14/istream:520:7: note: candidate expects 2 arguments, 1 provided
|
s606707294 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char s[100]={'\0'};
cin.getline(s);
for( int i=0;i<100;i++)
if(s[i]>=65&&s[i]<=90)
{cout <<s[i];}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: error: no matching function for call to 'std::basic_istream<char>::getline(char [100])'
7 | cin.getline(s);
| ~~~~~~~~~~~^~~
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:740:5: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize, char_type) [with _CharT = char; _Traits = std::char_traits<char>; char_type = char; std::streamsize = long int]'
740 | basic_istream<char>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:740:5: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/istream:520:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::getline(char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; char_type = char; std::streamsize = long int]'
520 | getline(char_type* __s, streamsize __n)
| ^~~~~~~
/usr/include/c++/14/istream:520:7: note: candidate expects 2 arguments, 1 provided
|
s484752543 | p03860 | C++ | #include<iostream>
using namespace std;
int main()
{
char s[99]={'/0'};
cin.getline(s,99);
for( int i=0;i<100;i++)
if(s[i]>=65&&s[i]<=90)
{cout <<s[i];}
return 0;
}
| a.cc:5:16: warning: multi-character character constant [-Wmultichar]
5 | char s[99]={'/0'};
| ^~~~
a.cc: In function 'int main()':
a.cc:5:16: error: narrowing conversion of '12080' from 'int' to 'char' [-Wnarrowing]
|
s804680091 | p03860 | C++ | #include<iostream>
using namespace std;
int main()
{
char s[99]={'/0'};
cin.getline(s,99);
for( int i=0;i<100;i++)
if(s[i]>=65&&s[i]<=90)
{cout <<s[i];}
return 0;
}
| a.cc:5:16: warning: multi-character character constant [-Wmultichar]
5 | char s[99]={'/0'};
| ^~~~
a.cc: In function 'int main()':
a.cc:5:16: error: narrowing conversion of '12080' from 'int' to 'char' [-Wnarrowing]
|
s794413179 | p03860 | C | #include<iostream>
#include<string>
#include<bits/stdc++.h>
using namespace std;
char s[100];
int main(){
int a=3;
char s2[a];
int i=0;
scanf("%[^\n]",&s);
a=0;
s2[a]=s[0];
a++;
for ( i=0;i<100;i++){
if ( a<3&&s[i]==' ')
{
++i;
s2[a]=s[i];
a++;
}
}
for(a=0;a<3;a++)
cout<<s2[a];
}
| main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s096309765 | p03860 | C | #include<iostream>
#include<string>
using namespace std;
char s[100];
int main(){
int a=3;
char s2[a];
int i=0;
scanf("%[^\n]",&s);
a=0;
s2[a]=s[0];
a++;
for ( i=0;i<100;i++){
if ( a<3&&s[i]==' ')
{
++i;
s2[a]=s[i];
a++;
}
}
for(a=0;a<3;a++)
cout<<s2[a];
}
| main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s735974899 | p03860 | C | #include<iostream>
#include<string>
using namespace std;
char s[100];
int main(){
int a=3;
char s2[a];
int i=0;
scanf("%[^\n]",&s);
a=0;
s2[a]=s[0];
a++;
for ( i=0;i<100;i++){
if ( a<3&&s[i]==' ')
{
++i;
s2[a]=s[i];
a++;
}
}
for(a=0;a<3;a++)
cout<<s2[a];
}
| main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s602110141 | p03860 | C | #include<bits/stdc++.h>
using namespace std;
char s[100];
int main(){
scanf("%[^\n]",s);
for (int i=0;i<100;i++){
if (int (s[i])>=65&&int(s[i])<=90)
cout<<s[i];
}
}
| main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s820468043 | p03860 | C++ | #include<iostream>
using namespace std;
int main()
{
char s[100]={'/0'};
cin.getline(s,100);
for( int i=0;i<100;i++)
if(s[i]>=65&&s[i]<=90)
cout <<s[i];
return 0;
} | a.cc:5:17: warning: multi-character character constant [-Wmultichar]
5 | char s[100]={'/0'};
| ^~~~
a.cc: In function 'int main()':
a.cc:5:17: error: narrowing conversion of '12080' from 'int' to 'char' [-Wnarrowing]
|
s372063307 | p03860 | C++ | #include<iostream>
using namespace std;
int main()
{
char S[90]={'A','t','c','o','d','e','r','/0'};
cin.getline(S,90);
for( int i=0;i<90;i++)
if(S[i]>=65&&S[i]<=90)
cout <<S[i];
return 0;
} | a.cc:5:44: warning: multi-character character constant [-Wmultichar]
5 | char S[90]={'A','t','c','o','d','e','r','/0'};
| ^~~~
a.cc: In function 'int main()':
a.cc:5:44: error: narrowing conversion of '12080' from 'int' to 'char' [-Wnarrowing]
|
s421008427 | p03860 | C++ | #include<iostream>
using namespace std;
int main()
{
char S[90]={'/0'};
cin.getline(S,90);
for( int i=0;i<90;i++)
if(S[i]>=65&&S[i]<=90)
cout <<S[i];
return 0;
}
| a.cc:5:16: warning: multi-character character constant [-Wmultichar]
5 | char S[90]={'/0'};
| ^~~~
a.cc: In function 'int main()':
a.cc:5:16: error: narrowing conversion of '12080' from 'int' to 'char' [-Wnarrowing]
|
s242960689 | p03860 | C++ | #include<iostream>
using namespace std;
int main()
{
char S[100]={'/0'};
cin.getline(S,100);
for( int i=0;i<100;i++)
if(S[i]>=65&&S[i]<=90)
cout <<S[i];
return 0;
}
| a.cc:5:17: warning: multi-character character constant [-Wmultichar]
5 | char S[100]={'/0'};
| ^~~~
a.cc: In function 'int main()':
a.cc:5:17: error: narrowing conversion of '12080' from 'int' to 'char' [-Wnarrowing]
|
s930545736 | p03860 | C++ | #include<iostream>
using namespace std;
int main()
{
char s[100]={'/0'};
cin.getline(s,100);
for( int i=0;i<100;i++)
if(s[i]>=65&&s[i]<=90)
cout <<s[i];
return 0;
}
| a.cc:5:17: warning: multi-character character constant [-Wmultichar]
5 | char s[100]={'/0'};
| ^~~~
a.cc: In function 'int main()':
a.cc:5:17: error: narrowing conversion of '12080' from 'int' to 'char' [-Wnarrowing]
|
s911954889 | p03860 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main()
{
char s[100]={'/0'};
cin.getline(s,100);
for( int i=0;i<100;i++)
if(s[i]>=65&&s[i]<=90)
cout <<s[i];
return 0;
}
| a.cc:6:17: warning: multi-character character constant [-Wmultichar]
6 | char s[100]={'/0'};
| ^~~~
a.cc: In function 'int main()':
a.cc:6:17: error: narrowing conversion of '12080' from 'int' to 'char' [-Wnarrowing]
|
s269767165 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
int x=s.length();
whlie(1){
scanf("%[^\n]",s);
int x=s.length();
if (int (s[i])>=65&&int(s[i])<=90)
cout<<s[i];
x--
}
} | a.cc: In function 'int main()':
a.cc:6:1: error: 'whlie' was not declared in this scope
6 | whlie(1){
| ^~~~~
|
s767581651 | p03860 | C++ | #include<iostream>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
cout<<a[0<<b[0]<<c[0];
return 0;
} | a.cc: In function 'int main()':
a.cc:6:30: error: expected ']' before ';' token
6 | cout<<a[0<<b[0]<<c[0];
| ^
| ]
|
s816942372 | p03860 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(){
string a;
string b;
string c;
cin>>a>>b>>c;
cout<<a[0]<<b[0]<<c[0];
return 0;
} | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s640180459 | p03860 | C | #include<bits/stdc++.h>
using namespace std;
char s[100];
int main(){
scanf("%[^\n]",s);
for (int i=0;i<100;i++){
if (int (s[i])>=65&&int(s[i])<=90)
cout<<s[i];
}
}
| main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s233007052 | p03860 | C++ | #include <iostream>
int main(){
string x,y,z;
cin>>x>>y>>z;
cout<<x[0]<<y[0]<<z[0];
return 0;
} | a.cc: In function 'int main()':
a.cc:3:1: error: 'string' was not declared in this scope
3 | string x,y,z;
| ^~~~~~
a.cc:3:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin>>x>>y>>z;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:4:6: error: 'x' was not declared in this scope
4 | cin>>x>>y>>z;
| ^
a.cc:4:9: error: 'y' was not declared in this scope
4 | cin>>x>>y>>z;
| ^
a.cc:4:12: error: 'z' was not declared in this scope
4 | cin>>x>>y>>z;
| ^
a.cc:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | cout<<x[0]<<y[0]<<z[0];
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s969537542 | p03860 | C++ | #include <iostream>
using namespace std;
int main(){
string x,y,z;
cin>>x>>y>>z;
cout<<x[0]<<y[0]<<z[0]
return 0;
} | a.cc: In function 'int main()':
a.cc:6:23: error: expected ';' before 'return'
6 | cout<<x[0]<<y[0]<<z[0]
| ^
| ;
7 | return 0;
| ~~~~~~
|
s447982109 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char s;
scanf("%[^\n]",s);
for (int i=0;;i++)
if (int (s[i])>=65&&int(s[i])<=90)
printf("%[^\n]",s[i]); | a.cc: In function 'int main()':
a.cc:8:11: error: invalid types 'char[int]' for array subscript
8 | if (int (s[i])>=65&&int(s[i])<=90)
| ^
a.cc:8:26: error: invalid types 'char[int]' for array subscript
8 | if (int (s[i])>=65&&int(s[i])<=90)
| ^
a.cc:9:18: error: invalid types 'char[int]' for array subscript
9 | printf("%[^\n]",s[i]);
| ^
a.cc:9:23: error: expected '}' at end of input
9 | printf("%[^\n]",s[i]);
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s161618437 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char s[20];
scanf("%[^\n]",s);
for (int i=0i<20;i++)
if (int (s[i])>=65&&int(s[i])<=90)
printf("%[^\n]",s[i]);
}
| a.cc: In function 'int main()':
a.cc:6:14: error: no match for 'operator<' (operand types are 'std::complex<double>' and 'int')
6 | for (int i=0i<20;i++)
| ~~^~~
| | |
| | int
| std::complex<double>
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | for (int i=0i<20;i++)
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'const std::pair<_T1, _T2>'
6 | for (int i=0i<20;i++)
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'const std::reverse_iterator<_Iterator>'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'const std::reverse_iterator<_Iterator>'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'const std::move_iterator<_IteratorL>'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'const std::move_iterator<_IteratorL>'
6 | for (int i=0i<20;i++)
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::complex<double>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
6 | for (int i=0i<20;i++)
| ^~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::compl |
s183794504 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char s;
scanf("%[^\n]",s);
int x=s;
while(1){
/*scanf("%[^\n]",s);
int x=s.length();*/
if (int (s[i])>=65&&int(s[i])<=90)
cout<<s[i];
x--
}
} | a.cc: In function 'int main()':
a.cc:11:12: error: 'i' was not declared in this scope
11 | if (int (s[i])>=65&&int(s[i])<=90)
| ^
a.cc:13:4: error: expected ';' before '}' token
13 | x--
| ^
| ;
14 | }
| ~
|
s543366116 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
scanf("%[^\n]",s);
int x=s.length();
whlie(1){
/*scanf("%[^\n]",s);
int x=s.length();*/
if (int (s[i])>=65&&int(s[i])<=90)
cout<<s[i];
x--
}
} | a.cc: In function 'int main()':
a.cc:7:1: error: 'whlie' was not declared in this scope
7 | whlie(1){
| ^~~~~
|
s312778878 | p03860 | C++ | include<bits/stdc++.h>
using namespace std;
int main(){
int n,d,x,r=0;
scanf("%d",&x);
n=x;
while(x!=0){
d=x%10;
r=r*10+d;
x=x/10;
}
if(r==n)
printf("Yes");
else
printf("No");
} | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
5 | scanf("%d",&x);
| ^~~~~
a.cc:13:9: error: 'printf' was not declared in this scope
13 | printf("Yes");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | include<bits/stdc++.h>
a.cc:15:9: error: 'printf' was not declared in this scope
15 | printf("No");
| ^~~~~~
a.cc:15:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s459373972 | p03860 | C++ | #include<iosteam>
using namespace std;
int main(){
string a ,b ,c;
cin>>a>>b>>c;
for(int i=0;i<100;i++)
if(65<=(int)b[i]<=90){
cout<<"A"<<b[0]<<"c";
break;
}
} | a.cc:1:9: fatal error: iosteam: No such file or directory
1 | #include<iosteam>
| ^~~~~~~~~
compilation terminated.
|
s672583188 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char s[100];
printf("AtCoder ");
scanf("%c ",&s);
int q=strlen(s);
int m=q-1;
if(s[0]>='A'&&s[0]<='Z'){
for(int i=1;i<=m;i++)
// if(s[i]>96&&s[i]<123){ //
printf("Contest\n");
printf("A%cC", s[0]);
}
else{
printf("Error\n");
}
}
else{
printf("Error\n");
}
return 0;
} | a.cc:20:9: error: expected unqualified-id before 'else'
20 | else{
| ^~~~
a.cc:26:9: error: expected unqualified-id before 'return'
26 | return 0;
| ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
27 | }
| ^
|
s707643157 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char m[]={'AtCoder '}, s[100], n[]={' Contest'};
scanf("%c ",&s);
if(s[0]>='A'&&s[0]<='Z'){
printf("%c%c%c", m[0], s[0], n[0]);
}
else{
printf("Error\n");
}
return 0;
} | a.cc:5:19: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
5 | char m[]={'AtCoder '}, s[100], n[]={' Contest'};
| ^~~~~~~~~~
a.cc:5:45: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
5 | char m[]={'AtCoder '}, s[100], n[]={' Contest'};
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:19: error: narrowing conversion of '1684369952' from 'int' to 'char' [-Wnarrowing]
5 | char m[]={'AtCoder '}, s[100], n[]={' Contest'};
| ^~~~~~~~~~
a.cc:5:45: error: narrowing conversion of '1952805748' from 'int' to 'char' [-Wnarrowing]
5 | char m[]={'AtCoder '}, s[100], n[]={' Contest'};
| ^~~~~~~~~~
|
s432983960 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin s;
char x;
x=s.at(8)
cout << "A" << 'x' << "B" << endl;
} | a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 's'
6 | cin s;
| ^~
| ;
a.cc:8:12: error: expected ';' before 'cout'
8 | x=s.at(8)
| ^
| ;
9 | cout << "A" << 'x' << "B" << endl;
| ~~~~
|
s472248071 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
getline(cin,s);
if(isupper(s[0])
{
cout<<s[0];
}
for( int i=1 ; i<s.length() ; i++)
{
if(isupper(s[i]) && s[i-1]==' ' ){
cout<<s[i];
}}
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:17: error: expected ')' before '{' token
7 | if(isupper(s[0])
| ~ ^
| )
8 | {
| ~
a.cc:11:16: error: 'i' was not declared in this scope
11 | for( int i=1 ; i<s.length() ; i++)
| ^
|
s962539310 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
getline(cin,s);
if(isupper(s[0])
{
cout<<s[0];
}
for(int i=1;i<s.length();i++)
{
if(isupper(s[i])&&s[i-1]==' '){
cout<<s[i];
}}
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:17: error: expected ')' before '{' token
7 | if(isupper(s[0])
| ~ ^
| )
8 | {
| ~
a.cc:11:13: error: 'i' was not declared in this scope
11 | for(int i=1;i<s.length();i++)
| ^
|
s542278546 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
get line(cin,s);
if(isupper(s[0])
{
cout<<s[0];
}
for(int i=1;i<s.length();I++)
{
if(isupper(s[I])&&s[i-1]==' '){
cout<<s[i];
}}
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:4: error: expected ';' before 'line'
5 | get line(cin,s);
| ^~~~~
| ;
a.cc:5:16: error: statement cannot resolve address of overloaded function
5 | get line(cin,s);
| ^
a.cc:7:17: error: expected ')' before '{' token
7 | if(isupper(s[0])
| ~ ^
| )
8 | {
| ~
a.cc:11:13: error: 'i' was not declared in this scope
11 | for(int i=1;i<s.length();I++)
| ^
a.cc:11:26: error: 'I' was not declared in this scope
11 | for(int i=1;i<s.length();I++)
| ^
|
s061791318 | p03860 | Java | import java.util.Scanner;
public class ah{
public static void main(string[] args){
Scanner in=new Scanner(System in);
int t=in.nextInt();
int sum=0;
int arr=new int [t];
while(t-->0){
int a=in.nextInt();
int b=in.nextInt();
sum-=a;
sum+=b;
arr[t]=sum;
}
Arrays.sort(arr)
System.out.println(ar[ar.length-1]);}} | Main.java:5: error: ')' or ',' expected
Scanner in=new Scanner(System in);
^
Main.java:5: error: not a statement
Scanner in=new Scanner(System in);
^
Main.java:5: error: ';' expected
Scanner in=new Scanner(System in);
^
Main.java:16: error: ';' expected
Arrays.sort(arr)
^
4 errors
|
s749768380 | p03860 | C++ | #include<bits/c++.h>
using namespace std;
int main()
{string s1,s2,s3;
cin>>s1>>s2>>s3;
Cout<<s1[0]<<s2[0]<<s3[0];
return 0;
} | a.cc:1:9: fatal error: bits/c++.h: No such file or directory
1 | #include<bits/c++.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s440094623 | p03860 | Java | import java.util.Scanner;
public class ah{
public static void main(string[] args){
Scanner in=new Scanner(System in);
int t=in.nextInt();
int sum=0;
int arr=new int [t];
while(t-->0){
int a=in.nextInt();
int b=in.nextInt();
sum-=a;
sum+=b;
arr[t]=sum;
}
Arrays.sort(arr)
System.out.println(ar[ar.length-1]);}} | Main.java:5: error: ')' or ',' expected
Scanner in=new Scanner(System in);
^
Main.java:5: error: not a statement
Scanner in=new Scanner(System in);
^
Main.java:5: error: ';' expected
Scanner in=new Scanner(System in);
^
Main.java:16: error: ';' expected
Arrays.sort(arr)
^
4 errors
|
s630268996 | p03860 | C++ |
/*@author hussein zayed ;
___ ___
|\ \|\ \
\ \ \_\ \
\ \ ___ \USSEIN
\ \ \\ \ \
\ \__\\ \_\
\|__| \|__|
****************************************
*/
#include <bits/stdc++.h>
using namespace std;
#define fr for(int i=0;i<n;++i)
#define fr1 for(int i=1;i<=n;++i)
#define cinA for(int i=0;i<n;++i){cin>>arr[i];}
#define cinA1 for(int i=1;i<=n;++i){cin>>arr[i];}
#define coutA for(int i=0;i<n;++i){cout<<arr[i]<<" ";}
#define ll long long
#define lnarray sizeof(arr)/sizeof(*arr)
#define vi vector<int>
#define vs vector<string>
void Fast()
{
ios_base :: sync_with_stdio( 0 ) ;
cin.tie( 0 ) ;
cout.tie( 0 ) ;
}
inline int RD()
{
int i ;
cin>>i;
return i;
}
inline float RF()
{
float i ;
cin>>i;
return i;
}
inline double RDO()
{
double i ;
cin>>i;
return i;
}
inline string RS()
{
string i ;
cin>>i;
return i;
}
inline ll RLL()
{
ll i ;
cin>>i;
return i;
}
int cm[200000];
ll sumSet(ll n)
{
return (1ll*n*(n+1))/2;
}
string s;
bool isPrime(int n)
{
if(n==1)
return false;
for(int i=2; i*i<=n; ++i)
{
if(n%i==0)
return false;
}
return true;
}
int sumDigit(int n){
int sum =0;
while (n != 0)
{
sum+= + n % 10;
n = n / 10;
}
return sum;
}
ll power2(int n){
ll ans=(1<<n);
return ans;
}
ll sumpow2(ll n){
ll sum=(n*(n+1)*(2*n-1))/6;
return sum;
}
map<int ,int> mp;
vi vr;
int main(){
Fast();
//freopen("output.txt" , "w" , stdout);
//freopen("wall.in" , "r" , stdin);
| a.cc: In function 'int main()':
a.cc:108:12: error: expected '}' at end of input
108 | Fast();
| ^
a.cc:107:11: note: to match this '{'
107 | int main(){
| ^
|
s314833555 | p03860 | C++ | #include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
int main(){
string s;
getline(cin,s);
cout<<s;
printf("%c", s[0]);
for(int i=0;i<s.length(); ++i)
{
(if s[i]=='')
printf("%c", s[i+1]);
}
return0;
} | a.cc:11:11: error: empty character constant
11 | (if s[i]=='')
| ^~
a.cc: In function 'int main()':
a.cc:11:2: error: expected primary-expression before 'if'
11 | (if s[i]=='')
| ^~
a.cc:11:2: error: expected ')' before 'if'
11 | (if s[i]=='')
| ~^~
| )
a.cc:14:1: error: 'return0' was not declared in this scope
14 | return0;
| ^~~~~~~
|
s747798031 | p03860 | C++ | #include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
int main(){
char s[101];
gets(s);
if(s[8]<'a'){
printf("A%cC",s[8]);
}
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s341494418 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char s[101];
gets(s);
if(s[8]<'a'){
printf("A%cC",s[8]);
}
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
5 | gets(s);
| ^~~~
| getw
|
s893221005 | p03860 | C++ | #include<bits/stdc++.h>
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
char m[20], n[20], l[20];
printf("please enter the first name of contest\n");
gets(m);
printf("please enter the second name of contest\n");
gets(n);
printf("please enter the third name of contest\n");
gets(l);
printf("%c%c%c\n", m[0], n[0], l[0]);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(m);
| ^~~~
| getw
|
s552372666 | p03860 | C++ | #include<iostream>
#include<stdio.h>
using namespace std;
int main() {
char a[8];
char b[100];
char c[8];
cin >> a >> b >> c;
cout << a[0] << b[0] << c[0] << endl ;
| a.cc: In function 'int main()':
a.cc:9:47: error: expected '}' at end of input
9 | cout << a[0] << b[0] << c[0] << endl ;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s884574494 | p03860 | C++ | #include<bits/stdc++.h>
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
char m[20], n[20], l[20];
printf("please enter the name of contest\n");
gets(m );
gets(n);
gets(l);
printf("%c%c%c\n", m[0], n[0], l[0]);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(m );
| ^~~~
| getw
|
s795498163 | p03860 | C++ | #include<iostream>
#include<stdio.h>
using namespace std;
int main() {
char a[8];
char b[100];
char c[8];
cin >> a >> b >> c;
cout << a[0] << b[0] << c[0] << endl ;
| a.cc: In function 'int main()':
a.cc:9:47: error: expected '}' at end of input
9 | cout << a[0] << b[0] << c[0] << endl ;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s463405057 | p03860 | C++ |
using namespace std;
int main (){
string a,b,c;
cin>>a>>b>>c;
cout<<a[0]<<b[0]<<c[0]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:6: error: 'string' was not declared in this scope
4 | string a,b,c;
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
+++ |+#include <string>
1 |
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin>>a>>b>>c;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 |
a.cc:5:10: error: 'a' was not declared in this scope
5 | cin>>a>>b>>c;
| ^
a.cc:5:13: error: 'b' was not declared in this scope
5 | cin>>a>>b>>c;
| ^
a.cc:5:16: error: 'c' was not declared in this scope
5 | cin>>a>>b>>c;
| ^
a.cc:6:5: error: 'cout' was not declared in this scope
6 | cout<<a[0]<<b[0]<<c[0]<<endl;
| ^~~~
a.cc:6:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:29: error: 'endl' was not declared in this scope
6 | cout<<a[0]<<b[0]<<c[0]<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 |
|
s636913626 | p03860 | C++ |
int main (){
string a,b,c;
cin>>a>>b>>c;
cout<<a[0]<<b[0]<<c[0]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:3:6: error: 'string' was not declared in this scope
3 | string a,b,c;
| ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
4 | cin>>a>>b>>c;
| ^~~
a.cc:4:10: error: 'a' was not declared in this scope
4 | cin>>a>>b>>c;
| ^
a.cc:4:13: error: 'b' was not declared in this scope
4 | cin>>a>>b>>c;
| ^
a.cc:4:16: error: 'c' was not declared in this scope
4 | cin>>a>>b>>c;
| ^
a.cc:5:5: error: 'cout' was not declared in this scope
5 | cout<<a[0]<<b[0]<<c[0]<<endl;
| ^~~~
a.cc:5:29: error: 'endl' was not declared in this scope
5 | cout<<a[0]<<b[0]<<c[0]<<endl;
| ^~~~
|
s410447729 | p03860 | C++ |
string a,b,c;
cin>>a>>b>>c;
cout<<a[0]<<b[0]<<c[0]<<endl;
| a.cc:3:6: error: 'string' does not name a type
3 | string a,b,c;
| ^~~~~~
a.cc:4:5: error: 'cin' does not name a type
4 | cin>>a>>b>>c;
| ^~~
a.cc:5:5: error: 'cout' does not name a type
5 | cout<<a[0]<<b[0]<<c[0]<<endl;
| ^~~~
|
s755804783 | p03860 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<tuple>
#define int long
using namespace std;
signed main() {
string S;
cin >> "AtCoder" >> S >> "Contest";
cout << "A" << S.at(0) << "C" << endl;
} | a.cc: In function 'int main()':
a.cc:13:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'const char [8]')
13 | cin >> "AtCoder" >> S >> "Contest";
| ~~~ ^~ ~~~~~~~~~
| | |
| | const char [8]
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
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>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:16: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'const char*'
13 | cin >> "AtCoder" >> S >> "Contest";
| ^~~~~~~~~
/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>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:16: error: invalid conversion from 'const char*' to 'short int' [-fpermissive]
13 | cin >> "AtCoder" >> S >> "Contest";
| ^~~~~~~~~
| |
| const char*
a.cc:13:16: error: cannot bind rvalue '(short int)((const char*)"AtCoder")' to 'short int&'
/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>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:16: error: invalid conversion from 'const char*' to 'short unsigned int' [-fpermissive]
13 | cin >> "AtCoder" >> S >> "Contest";
| ^~~~~~~~~
| |
| const char*
a.cc:13:16: error: cannot bind rvalue '(short unsigned int)((const char*)"AtCoder")' to 'short unsigned int&'
/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>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:16: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
13 | cin >> "AtCoder" >> S >> "Contest";
| ^~~~~~~~~
| |
| const char*
a.cc:13:16: error: cannot bind rvalue '(int)((const char*)"AtCoder")' to 'int&'
/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>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:16: error: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]
13 | cin >> "AtCoder" >> S >> "Contest";
| ^~~~~~~~~
| |
| const char*
a.cc:13:16: error: cannot bind rvalue '(unsigned int)((const char*)"AtCoder")' to 'unsigned int&'
/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>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:16: error: invalid conversion from 'const char*' to 'long int' [-fpermissive]
13 | cin >> "AtCoder" >> S >> "Contest";
| ^~~~~~~~~
| |
| const char*
a.cc:13:16: error: cannot bind rvalue '(long int)((const char*)"AtCoder")' to 'long int&'
/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>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:16: error: invalid conversion from 'const char*' to 'long unsigned int' [-fpermissive]
13 | cin >> "AtCoder" >> S >> "Contest";
| ^~~~~~~~~
| |
| const char*
a.cc:13:16: error: cannot bind rvalue '(long unsigned int)((const char*)"AtCoder")' to 'long unsigned int&'
/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>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:16: error: invalid conversion from 'const char*' to 'long long int' [-fpermissive]
13 | cin >> "AtCoder" >> S >> "Contest";
| ^~~~~~~~~
| |
| const char*
a.cc:13:16: error: cannot bind rvalue '(long long int)((const char*)"AtCoder")' to 'long long int&'
/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>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:16: error: invalid conversion from 'const char*' to 'long long unsigned int' [-fpermissive]
13 | cin >> "AtCoder" >> S >> "Contest";
| ^~~~~~~~~
| |
| const char*
a.cc:13:16: error: cannot bind rvalue '(long long unsigned int)((const char*)"AtCoder")' to 'long long unsigned int&'
/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>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:16: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
13 | cin >> "AtCoder" >> S >> "Contest";
| ^~~~~~~~~
| |
| const void*
a.cc:13:16: error: cannot bind rvalue '(void*)((const void*)((const char*)"AtCoder"))' to 'void*&'
/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 'const char [8]' 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 'const char [8]' 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 'const char [8]' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/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 'const char [8]' 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 |
s471032474 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string b;
cin>>a>>b>>c;
char topb;
topb=b.at(0);
cout<<'A'<<topb<<'C'<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:8: error: 'a' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
a.cc:6:14: error: 'c' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
|
s762724900 | p03860 | C++ |
#include <bits/stdc++.h>
using namespace std;
int main () {
string S,B,H;
cin>>S>>B>>H;
char j=B.at(1);
cout<<"A"+j+"C"<<endl;
}
| a.cc: In function 'int main()':
a.cc:8:12: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
8 | cout<<"A"+j+"C"<<endl;
| ~~~~~^~~~
| | |
| | const char [2]
| const char*
|
s931835379 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
string S,B,H;
cin>>S>>B>>H;
cout<<"A"+'B.at(1)'+"C"<<endl;
}
| a.cc:6:11: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
6 | cout<<"A"+'B.at(1)'+"C"<<endl;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:20: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
6 | cout<<"A"+'B.at(1)'+"C"<<endl;
| ~~~~~~~~~~~~~^~~~
| | |
| | const char [2]
| const char*
|
s209076553 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
string S;B;H;
cin>>S>>B>>H;
cout<<"A"+'B.at(1)'+"C"<<endl;
}
| a.cc:6:11: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
6 | cout<<"A"+'B.at(1)'+"C"<<endl;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:4:10: error: 'B' was not declared in this scope
4 | string S;B;H;
| ^
a.cc:4:12: error: 'H' was not declared in this scope
4 | string S;B;H;
| ^
a.cc:6:20: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
6 | cout<<"A"+'B.at(1)'+"C"<<endl;
| ~~~~~~~~~~~~~^~~~
| | |
| | const char [2]
| const char*
|
s090743341 | p03860 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //3つのキャンディーパックを2人に分ける
String a = sc.next(); //キャンディーa
String b = sc.next(); //キャンディーb
String c = sc.nextInt(); //キャンディーc
System.out.println("A" + b.substring(0, 1) + "B");
}
} | Main.java:8: error: incompatible types: int cannot be converted to String
String c = sc.nextInt(); //??????c
^
1 error
|
s320799357 | p03860 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //3つのキャンディーパックを2人に分ける
String a = sc.next(); //キャンディーa
String b = sc.next(); //キャンディーb
String c = sc.nextInt(); //キャンディーc
System.out.println("A" + b.substring(0, 1) + "B");
}
| Main.java:11: error: reached end of file while parsing
}
^
1 error
|
s002369316 | p03860 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //3つのキャンディーパックを2人に分ける
String a = sc.next(); //キャンディーa
String b = sc.next(); //キャンディーb
String c = sc.nextInt(); //キャンディーc
System.out.println("A" + b.substring(0, 1) + "B")
}
}
| Main.java:10: error: ';' expected
System.out.println("A" + b.substring(0, 1) + "B")
^
1 error
|
s996320971 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A,B,C;
cin >>A>>B>>C;
cout<<"A";
cout <<B[0];
cotu <<"C";
}
| a.cc: In function 'int main()':
a.cc:9:3: error: 'cotu' was not declared in this scope
9 | cotu <<"C";
| ^~~~
|
s470851086 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
String s;
cin >> s;
cout << 'A' + s.at(0) + 'C';
}
| a.cc: In function 'int main()':
a.cc:5:2: error: 'String' was not declared in this scope
5 | String s;
| ^~~~~~
a.cc:6:9: error: 's' was not declared in this scope
6 | cin >> s;
| ^
|
s010251110 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
String s;
cin >> s;
cout << 'A' + s.at(0) + 'C';
} | a.cc: In function 'int main()':
a.cc:5:2: error: 'String' was not declared in this scope
5 | String s;
| ^~~~~~
a.cc:6:9: error: 's' was not declared in this scope
6 | cin >> s;
| ^
|
s314516127 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
cout << 'A' + s.at(0) + 'C';
} | a.cc: In function 'int main()':
a.cc:7:18: error: request for member 'at' in 's', which is of non-class type 'int'
7 | cout << 'A' + s.at(0) + 'C';
| ^~
|
s994790431 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
cout << "A" + s.at(0) + "C";
} | a.cc: In function 'int main()':
a.cc:7:18: error: request for member 'at' in 's', which is of non-class type 'int'
7 | cout << "A" + s.at(0) + "C";
| ^~
|
s317853701 | p03860 | C | #include<stdio.h>
int main(){
char s[100];
for(int i = 0; i<=100; i++){
scanf("%s", &s[i]);
}
printf("A")
printf("%s\n", s[0]);
printf("C\n");
return 0;
} | main.c: In function 'main':
main.c:8:14: error: expected ';' before 'printf'
8 | printf("A")
| ^
| ;
9 | printf("%s\n", s[0]);
| ~~~~~~
|
s595031402 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
#define YES cout << "YES" << endl;
#define NO cout << "NO" << endl;
#define Yes cout << "Yes" << endl;
#define No cout << "No" << endl;
#define INF INT_MAX
#define MOD 1000000007
#define PI acos(-1)
using ll = long long;
using ull = unsigned long long;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define rrep(i, n) for (ll i = (n)-1; i >= 0; i--)
int main(int argc, char *argv[])
{
cin.tie(0);
ios::sync_with_stdio(false);
string s;
cin >> s;
cout << "A"+s[8]+"C" << endl;
return 0;
} | a.cc: In function 'int main(int, char**)':
a.cc:30:21: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
30 | cout << "A"+s[8]+"C" << endl;
| ^~~~
| |
| const char [2]
|
s327929727 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string r s t;
cin >> r >> s >> t;
cout << "A"<< s.at(1) << "C";
}
| a.cc: In function 'int main()':
a.cc:5:10: error: expected initializer before 's'
5 | string r s t;
| ^
a.cc:6:8: error: 'r' was not declared in this scope
6 | cin >> r >> s >> t;
| ^
a.cc:6:13: error: 's' was not declared in this scope
6 | cin >> r >> s >> t;
| ^
a.cc:6:18: error: 't' was not declared in this scope; did you mean 'tm'?
6 | cin >> r >> s >> t;
| ^
| tm
|
s489761030 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
char S;
s.at(1) == S;
cout << A << S << C;
}
| a.cc: In function 'int main()':
a.cc:9:10: error: 'A' was not declared in this scope
9 | cout << A << S << C;
| ^
a.cc:9:20: error: 'C' was not declared in this scope
9 | cout << A << S << C;
| ^
|
s000175133 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
s.at(1) == S;
cout << A << S << C;
}
| a.cc: In function 'int main()':
a.cc:7:12: error: 'S' was not declared in this scope
7 | s.at(1) == S;
| ^
a.cc:8:10: error: 'A' was not declared in this scope
8 | cout << A << S << C;
| ^
a.cc:8:20: error: 'C' was not declared in this scope
8 | cout << A << S << C;
| ^
|
s567544277 | p03860 | C++ | #include<iostream>
using namespace std;
int main(){
string win;
cin >> win;
char a;
a = win.at(8)
cout << "A" << a << "C" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'cout'
8 | a = win.at(8)
| ^
| ;
9 |
10 | cout << "A" << a << "C" << endl;
| ~~~~
|
s803236620 | p03860 | C++ | #include<iostream>
using namespace std;
int main(){
string win;
cin >> win;
cout << "A" << string.at(8) << "C" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:24: error: expected primary-expression before '.' token
8 | cout << "A" << string.at(8) << "C" << endl;
| ^
|
s268539666 | p03860 | C++ | #include <iostream>
using namespace std;
int main(void) {
string ac = "A"
string ct = "C"
string rand;
cin >> rand;
cout << ac + rand[0] + ct << endl;
} | a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'string'
7 | string ct = "C"
| ^~~~~~
a.cc:9:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int() noexcept')
9 | cin >> rand;
| ~~~ ^~ ~~~~
| | |
| | int() noexcept
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
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>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int (*)() noexcept'
9 | cin >> rand;
| ^~~~
/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>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'short int' [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
a.cc:9:10: error: cannot bind rvalue '(short int)rand' to 'short int&'
/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>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'short unsigned int' [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
a.cc:9:10: error: cannot bind rvalue '(short unsigned int)rand' to 'short unsigned int&'
/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>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'int' [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
a.cc:9:10: error: cannot bind rvalue '(int)rand' to 'int&'
/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>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'unsigned int' [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
a.cc:9:10: error: cannot bind rvalue '(unsigned int)rand' to 'unsigned int&'
/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>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'long int' [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
a.cc:9:10: error: cannot bind rvalue '(long int)rand' to 'long int&'
/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>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'long unsigned int' [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
a.cc:9:10: error: cannot bind rvalue '(long unsigned int)rand' to 'long unsigned int&'
/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>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'long long int' [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
a.cc:9:10: error: cannot bind rvalue '(long long int)rand' to 'long long int&'
/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>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'long long unsigned int' [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
a.cc:9:10: error: cannot bind rvalue '(long long unsigned int)rand' to 'long long unsigned int&'
/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>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'void*' [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
a.cc:9:10: error: cannot bind rvalue '(void*)rand' to 'void*&'
/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>]' (near match)
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
/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>]' (near match)
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
/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>]' (near match)
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'int (*)() noexcept' to 'std::ios_base& (*)(std::ios_base&)' [-fpermissive]
9 | cin >> rand;
| ^~~~
| |
| int (*)() noexcept
/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 'int() noexcept' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Trai |
s859808892 | p03860 | C++ | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main(){
vector<string> win;
cin >> win;
cout << "A" << win.at(8) << "C" << endl;
}
| a.cc: In function 'int main()':
a.cc:7:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
7 | cin >> win;
| ~~~ ^~ ~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
| 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<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<char> >' 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 |
s063065803 | p03860 | C++ | #include<bits/stdc++.h>
#include<iostream>
using namespace std;
int main(){
vector<string> win;
cin >> win;
cout << "A" << win.at(8) << "C" << endl;
}
| a.cc: In function 'int main()':
a.cc:7:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
7 | cin >> win;
| ~~~ ^~ ~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
| 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<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<char> >' 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 |
s709686235 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
vector<string> win;
cin >> win;
cout << "A" << win.at(8) << "C" << endl;
}
| a.cc: In function 'int main()':
a.cc:6:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
6 | cin >> win;
| ~~~ ^~ ~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
| 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<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<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::vector<std::__cxx11::basic_string<char> >' 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.