submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s553305918 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int size = s.length();
string hajime = s[0];
string owari = s[size - 1];
cout << hajime << size - 2 << owari << endl;
}
| a.cc: In function 'int main()':
a.cc:9:28: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
9 | string hajime = s[0];
| ^
a.cc:10:34: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
10 | string owari = s[size - 1];
| ^
|
s036052030 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int size = s.size();
int hajime = s[0];
int owari = s[size - 1]
cout << hajime << size - 2 << owari << endl;
} | a.cc: In function 'int main()':
a.cc:11:5: error: expected ',' or ';' before 'cout'
11 | cout << hajime << size - 2 << owari << endl;
| ^~~~
|
s274402668 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int size = s.size();
int hajime = s[0];
int owari = s[size - 1]
cout << hajime + owari << endl;
} | a.cc: In function 'int main()':
a.cc:11:5: error: expected ',' or ';' before 'cout'
11 | cout << hajime + owari << endl;
| ^~~~
|
s340126010 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
char first, end;
int p;
cin >> s;
p = strlen(s);
first = s[0];
end = s[p - 1];
cout << first << p-2 << end << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:13: error: 'strlen' was not declared in this scope
11 | p = strlen(s);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 | #include <string>
|
s862642937 | p03636 | C++ | #include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main(){
string s;
ostringstream result;
char first, end;
int p;
cin >> s;
p = strlen(s);
first = s[0];
end = s[p - 1];
result << first << p-2 << end;
cout << result.str() << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:13: error: 'strlen' was not declared in this scope
13 | p = strlen(s);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <sstream>
+++ |+#include <cstring>
4 | using namespace std;
|
s084197104 | p03636 | C++ | #include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main(){
string s;
stringstream result;
char first, end;
int p;
cin >> s;
p = strlen(s);
first = s[0];
end = s[p - 1];
result << first << p-2 << end;
cout << result.str() << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:13: error: 'strlen' was not declared in this scope
13 | p = strlen(s);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <sstream>
+++ |+#include <cstring>
4 | using namespace std;
|
s091749854 | p03636 | C | #include <stdio.h>
int main(){
char s[105];
scanf("%s", s);
int n = 0;
for (n=0, s[n] != '\0', ++n);
printf("%c%d%c", s[0], n, s[n]);
return 0;
} | main.c: In function 'main':
main.c:8:30: error: expected ';' before ')' token
8 | for (n=0, s[n] != '\0', ++n);
| ^
| ;
main.c:8:30: error: expected expression before ')' token
|
s985576974 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S,s ;
int C;
cin>>S;
C= S.size();
s=S[0]&c-2&S[C];
}
| a.cc: In function 'int main()':
a.cc:12:10: error: 'c' was not declared in this scope
12 | s=S[0]&c-2&S[C];
| ^
|
s338789897 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int num = S.size();
cout << S[0] << num-2 << S.end() <<endl;
}
| a.cc: In function 'int main()':
a.cc:10:25: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::__cxx11::basic_string<char>::iterator')
10 | cout << S[0] << num-2 << S.end() <<endl;
| ~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::iterator
| std::basic_ostream<char>
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostre |
s455750045 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char s[10001];
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1]<<endl;
} | a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s265800638 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin >> s;
int size = s.size() - 2 ;
string size_string = size;
string result = s[0] + size_string + s[size-1];
cout << result << endl;
} | a.cc: In function 'int main()':
a.cc:9:24: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
9 | string size_string = size;
| ^~~~
|
s042375040 | p03636 | Java | import java.util.Scanner;
public class Maiin {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String S = scan.next();
String a =S.substring(0, 1)+Integer.toString(S.substring(1, S.length()-1).length())
+S.substring(S.length()-1, S.length());
System.out.println(a);
}
} | Main.java:3: error: class Maiin is public, should be declared in a file named Maiin.java
public class Maiin {
^
1 error
|
s145401688 | p03636 | C++ | #include<iostream>
#include <string>
using namespace std;
int main() {
string s;
cin>>s;
int size = s.size();
cout<<str[0]<<size-1<< str[size-1] <<endl;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'str' was not declared in this scope; did you mean 'std'?
9 | cout<<str[0]<<size-1<< str[size-1] <<endl;
| ^~~
| std
|
s768938985 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int length = s.length;
cout << (s[0] + to_string(length - 2) + s[length-2]) << endl;
} | a.cc: In function 'int main()':
a.cc:7:20: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
7 | int length = s.length;
| ^~~~~~
|
s523158862 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int length = s.size;
cout << (s[0] + to_string(length - 2) + s[length-1]) << endl;
} | a.cc: In function 'int main()':
a.cc:7:20: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
7 | int length = s.size;
| ^~~~
|
s755348717 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int length = s.length;
cout << (s[0] + to_string(length - 2) + s[length-1]) << endl;
} | a.cc: In function 'int main()':
a.cc:7:20: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
7 | int length = s.length;
| ^~~~~~
|
s217997073 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int length = s.length;
cout << s[0] + to_string(length - 2) + s[length-1];
} | a.cc: In function 'int main()':
a.cc:7:20: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
7 | int length = s.length;
| ^~~~~~
|
s341767263 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string S;
cin>>S;
cout<<S.front()<<S.length()-2<<S.end();
}
| a.cc: In function 'int main()':
a.cc:7:32: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'std::__cxx11::basic_string<char>::iterator')
7 | cout<<S.front()<<S.length()-2<<S.end();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::iterator
| std::basic_ostream<char>::__ostream_type {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 'std::__cxx11::basic_string<char>::iterator' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' 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 |
s576698560 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string S;
cout<<S.front()<<S.length<<S.end();
}
| a.cc: In function 'int main()':
a.cc:7:18: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
7 | cout<<S.front()<<S.length<<S.end();
| ~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
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,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1083:7: note: declared here
1083 | length() const _GLIBCXX_NOEXCEPT
| ^~~~~~
|
s910286496 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
int main() {
string s;
cin>>s;
int sum=s.size()-2;
cout<<s[0]<<sum<<s{sum+1]<<endl;
} | a.cc: In function 'int main()':
a.cc:11:21: error: expected ';' before '{' token
11 | cout<<s[0]<<sum<<s{sum+1]<<endl;
| ^
| ;
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:7:17: note: to match this '{'
7 | int main() {
| ^
|
s668524550 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;
int main(){
string s;
in(s);
out(s[0]);
out(s.size() - 2);
out(s[n - 1]);
memi;
} | a.cc: In function 'int main()':
a.cc:22:9: error: 'n' was not declared in this scope
22 | out(s[n - 1]);
| ^
a.cc:14:24: note: in definition of macro 'out'
14 | #define out(n) cout << n
| ^
|
s353910727 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int len=s.size;
cout<<s[0]<<len-2<<s[len-1];
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
7 | int len=s.size;
| ^~~~
|
s041017217 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int len=s.size;
cout<<s[0]<<len-2<<s[len-1];
} | a.cc: In function 'int main()':
a.cc:7:15: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
7 | int len=s.size;
| ^~~~
|
s911431030 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S
cin >> S;
cout << S.at(0);
cout << S.size()-2;
cout << S.at(S.size()-1) << endl;
} | a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
6 | cin >> S;
| ^~~
a.cc:7:11: error: 'S' was not declared in this scope
7 | cout << S.at(0);
| ^
|
s094305827 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
cout << s.at(0) << "s.size()-2" << s.at(s.size-1);
} | a.cc: In function 'int main()':
a.cc:7:47: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
7 | cout << s.at(0) << "s.size()-2" << s.at(s.size-1);
| ~~^~~~
| ()
|
s861778859 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
string t;
cin >> t;
cout << t[0] + t.size() - 2 + t[t.size] << endl;
} | a.cc: In function 'int main()':
a.cc:8:38: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
8 | cout << t[0] + t.size() - 2 + t[t.size] << endl;
| ^
In file included 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,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: declared here
1076 | size() const _GLIBCXX_NOEXCEPT
| ^~~~
|
s412055285 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
for (int i = 0;i < S;i++) {
if(S.at(i) == )
}
| a.cc: In function 'int main()':
a.cc:8:19: error: no match for 'operator<' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
8 | for (int i = 0;i < S;i++) {
| ~ ^ ~
| | |
| int std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'const std::pair<_T1, _T2>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | for (int i = 0;i < S;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:8:21: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | for (int i = 0;i < S;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:8:21: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
8 | for (int i = 0;i < S;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, _ |
s231314267 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
cin>>s;
cout<<s[0]<<s.size-2<<s[s.size()-1];
return 0;
} | a.cc: In function 'int main()':
a.cc:7:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
7 | cout<<s[0]<<s.size-2<<s[s.size()-1];
| ~~^~~~
| ()
|
s018138407 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define LLI(n) lli n; cin >> n;
#define STR(n) string n; cin >> s;
#define Sort(n) sort(n.begin(), n.end());
#define Reve(n) reverse(n.begin(), n.end());
#define yes cout << "Yes" << endl;
#define no cout << "No" << endl;
#define C45(n) (n + 1) / 2
#define OUT(n) cout << n << endl;
#define SRC(n, c)for (lli i = 0;i < s.size(); i++) { if (s.at(i) == c) { n++; } };
//素数
bool IsPrime(lli num)
{
if (num < 2) return false;
else if (num == 2) return true;
else if (num % 2 == 0) return false;
long double sqrtNum = sqrt(num);
for (lli i = 3; i <= sqrtNum; i += 2)
{
if (num % i == 0)return false;
}
return true;
}
//各桁の和
lli Sum(lli n)
{
lli sum=0;
if (n<0) return 0;
while (n>0)
{
sum += n%10;
n /= 10;
}
return sum;
}
int main(void)
{
ios::sync_with_stdio(false);
STR(s);
OUT(s.begin+"18"+s.end);
return 0;
}
| a.cc: In function 'int main()':
a.cc:45:14: error: invalid operands of types '<unresolved overloaded function type>' and 'const char [3]' to binary 'operator+'
45 | OUT(s.begin+"18"+s.end);
| ~~~~~~~^~~~~
| | |
| | const char [3]
| <unresolved overloaded function type>
a.cc:12:24: note: in definition of macro 'OUT'
12 | #define OUT(n) cout << n << endl;
| ^
|
s600778772 | p03636 | C++ | #include<iostream>
#include<string>
int main(){
std::string s;
std::cin >> s;
int n = s.size() - 2;
std::cout << s[0] << n << s[s.size() - 1] ; | a.cc: In function 'int main()':
a.cc:8:46: error: expected '}' at end of input
8 | std::cout << s[0] << n << s[s.size() - 1] ;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s243867081 | p03636 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String x = sc.next();
String y = Integer.toString(x.length() - 2);
System.out.print(x.charAt(0));
System.out.print(y);
System.out.println(x.charAt(x.length() -1);
}
}
| Main.java:9: error: ')' or ',' expected
System.out.println(x.charAt(x.length() -1);
^
1 error
|
s820349149 | p03636 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String x = sc.next();
String y = Integer.toString(x.lentgh() - 2);
System.out.print(x.charAt(0));
System.out.print(y);
System.out.println(x.charAt(x.length -1));
}
}
| Main.java:6: error: cannot find symbol
String y = Integer.toString(x.lentgh() - 2);
^
symbol: method lentgh()
location: variable x of type String
Main.java:9: error: cannot find symbol
System.out.println(x.charAt(x.length -1));
^
symbol: variable length
location: variable x of type String
2 errors
|
s567152730 | p03636 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String x = sc.next();
String y = Integer.toString(x.lentgh() - 2);
System.out.print(x.charAt(0));
System.out.print(y);
System.out.println(x.charAt(x.length -1);
}
} | Main.java:9: error: ')' or ',' expected
System.out.println(x.charAt(x.length -1);
^
1 error
|
s226443145 | p03636 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String x = sc.next();
//文字数を検索→先頭と最後尾以外を置換
String y = x.substring(1, x.length() - 1);
String z = (x.length() -2).toString();
System.out.println(x.replace(y, z));
}
} | Main.java:8: error: int cannot be dereferenced
String z = (x.length() -2).toString();
^
1 error
|
s021341286 | p03636 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String x = sc.next();
//文字数を検索→先頭と最後尾以外を置換
String y = x.substring(1, x.length - 1);
String z = (x.length -2).toString();
System.out.println(x.replace(y, z));
}
} | Main.java:7: error: cannot find symbol
String y = x.substring(1, x.length - 1);
^
symbol: variable length
location: variable x of type String
Main.java:8: error: cannot find symbol
String z = (x.length -2).toString();
^
symbol: variable length
location: variable x of type String
2 errors
|
s052176514 | p03636 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String x = sc.next();
//文字数を検索→先頭と最後尾以外を置換
String y = x.substring(1, x.length - 1);
String z = (x.length -2).toString();
System.out.println(x.replace(y, z);
}
} | Main.java:9: error: ')' or ',' expected
System.out.println(x.replace(y, z);
^
1 error
|
s270909358 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
cout << s[0] + (s.length - 2) + s[s.length - 1] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:21: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
10 | cout << s[0] + (s.length - 2) + s[s.length - 1] << endl;
| ~~^~~~~~
| ()
a.cc:10:39: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
10 | cout << s[0] + (s.length - 2) + s[s.length - 1] << endl;
| ~~^~~~~~
| ()
|
s256818730 | p03636 | C++ | #include <iostream>
#include<string>
using namespace std;
int main()
{
int n;
string S;
cin >> S;
n = S.size;
cout << S[0] << n<<S[n];
} | a.cc: In function 'int main()':
a.cc:9:15: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
9 | n = S.size;
| ^~~~
|
s346491388 | p03636 | C++ | a = input()
print(a[0]+(str)(len(a)-2)+a[-1])
| a.cc:1:1: error: 'a' does not name a type
1 | a = input()
| ^
|
s744557925 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s; cin>>s;
int n=s.size()-1;
cout<<s.begin()<<n<<s.end()<<endl;
} | a.cc: In function 'int main()':
a.cc:6:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::__cxx11::basic_string<char>::iterator')
6 | cout<<s.begin()<<n<<s.end()<<endl;
| ~~~~^~~~~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::iterator
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' 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 'std::__cxx11::basic_string<char>::iterator' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std: |
s099898465 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s; cin>>s;
int n=s.size()-1;
cout<<s.start()<<n<<s.end()<<endl;
} | a.cc: In function 'int main()':
a.cc:6:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'start'
6 | cout<<s.start()<<n<<s.end()<<endl;
| ^~~~~
|
s037555546 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s; cin>>s;
n=s.size()-1;
cout<<s.start()<<n<<s.end()<<endl;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'n' was not declared in this scope
5 | n=s.size()-1;
| ^
a.cc:6:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'start'
6 | cout<<s.start()<<n<<s.end()<<endl;
| ^~~~~
|
s260509492 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[110],ans;
int main(){
cin>>s;
int len=strlen(s);
for(int i=1;i<strlen-1;i++) ans++;
cout<<s[0]<<ans<<s[len-1];
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
7 | for(int i=1;i<strlen-1;i++) ans++;
| ~~~~~~^~
a.cc:7:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | for(int i=1;i<strlen-1;i++) ans++;
| ~^~~~~~~~~
|
s960848144 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for(int i=0; i<N; i++)
typedef long long ll;
#define dump(x) cerr<<#x<<"="<<x<<endl
int main() {
string s; cin >> s;
cout << s.at(0) << s.size()-2 << s.at(s.size()-1) << endl;
| a.cc: In function 'int main()':
a.cc:10:63: error: expected '}' at end of input
10 | cout << s.at(0) << s.size()-2 << s.at(s.size()-1) << endl;
| ^
a.cc:7:12: note: to match this '{'
7 | int main() {
| ^
|
s729294123 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef long double ld;
const int inf=1e9+7;
const ll longinf=1LL<<60;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define F first
#define S second
const int mx=200010;
const ll mod=1e9+7;
int main(){
string s;
cin >> s;
int sz=s.size();
cout << s[0] << sz-2 << s[sz-1] << endl;
return 0;
} | a.cc:21:3: error: extended character is not valid in an identifier
21 | cout << s[0] << sz-2 << s[sz-1] << endl;
| ^
a.cc: In function 'int main()':
a.cc:21:3: error: 'cout\U00003000' was not declared in this scope
21 | cout << s[0] << sz-2 << s[sz-1] << endl;
| ^~~~~~
|
s742498717 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>n;
int x=s.size();
cout<<s[0]<<x-2<<s[x-1];} | a.cc: In function 'int main()':
a.cc:5:6: error: 'n' was not declared in this scope
5 | cin>>n;
| ^
|
s641326115 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
string size = s.size();
string out;
out[1] = s[1];
out[2] = size;
out[3] = s[3];
cout << out << endl;
} | a.cc: In function 'int main()':
a.cc:8:25: error: conversion from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
8 | string size = s.size();
| ~~~~~~^~
a.cc:11:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
11 | out[2] = size;
| ^~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
|
s235417722 | p03636 | C++ | #include<iostream>
#include<cstring>
using namespace std;
char s[10001];
int main()
{
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
|
s395235870 | p03636 | C++ | #include<iostream>
#include<cstring>
using namespace std;
char s[10001];
int main()
{
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
|
s149022843 | p03636 | C++ | #include<iostream>
#include<cstring>
using namespace std;
char s[10001];
int main()
{
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
|
s050558986 | p03636 | C++ | #include<iostream>
#include<cstring>
using namespace std;
char s[10001];
int main()
{
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
|
s815073672 | p03636 | C++ | #include<iostream>
#include<cstring>
using namespace std;
char s[10001];
int main()
{
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
|
s410842252 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char s[105];
scanf("%d",s);
int sum=0;
while(a[sum])
{
sum++;
};
printf("%c%d%c",s[0],sum-2,s[sum-1]);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:15: error: 'a' was not declared in this scope
8 | while(a[sum])
| ^
|
s716418496 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char s[105];
scanf("%d",s);
int sum=0;
while(a[sum])
{
sum++;
}
printf("%c%d%c",s[0],sum-2,s[sum-1]);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:15: error: 'a' was not declared in this scope
8 | while(a[sum])
| ^
|
s663885837 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char a[100];
cin>>a;
int len=a.length();
cout<<a[0]<<len-2<<a[len];
return 0;
} | a.cc: In function 'int main()':
a.cc:7:13: error: request for member 'length' in 'a', which is of non-class type 'char [100]'
7 | int len=a.length();
| ^~~~~~
|
s010935353 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,i;
char s[i];
cin>>s;
a=s.length();
cout<<s[0]<<a-2<<s[a-1]<<endl;
} | a.cc: In function 'int main()':
a.cc:8:7: error: request for member 'length' in 's', which is of non-class type 'char [i]'
8 | a=s.length();
| ^~~~~~
|
s347390243 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin >> s;
int x = s.size();
cout << s.at(0);
cout << x-2;
cout << s.at(y-1) << endl;
}
| a.cc: In function 'int main()':
a.cc:11:15: error: 'y' was not declared in this scope
11 | cout << s.at(y-1) << endl;
| ^
|
s033390397 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin >> s;
int x = s.size();
cout << s.at(0);
cout << x-2;
cout << s.at(y-1) << endl;
}
| a.cc: In function 'int main()':
a.cc:11:15: error: 'y' was not declared in this scope
11 | cout << s.at(y-1) << endl;
| ^
|
s897088236 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin >> s;
int x = s.size();
cout << s.at(0);
cout << x-2;
cout << s.at(y-1) << endl;
}
| a.cc: In function 'int main()':
a.cc:11:15: error: 'y' was not declared in this scope
11 | cout << s.at(y-1) << endl;
| ^
|
s397401038 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin >> s;
int x = s.size();
cout << s.at(0);
cout << x-2;
cout << s.at(y-1) << endl;
}
| a.cc: In function 'int main()':
a.cc:11:15: error: 'y' was not declared in this scope
11 | cout << s.at(y-1) << endl;
| ^
|
s488077025 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
string s;
int main()
{
cin>>s;
int ans=s.size()-3;
cout<<s[0]<<ans<<s[s.size()-1];
return;
} | a.cc: In function 'int main()':
a.cc:9:4: error: return-statement with no value, in function returning 'int' [-fpermissive]
9 | return;
| ^~~~~~
|
s025760304 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
cin>>s;
cout<<s[0]<<s.size()-2<<s[n-1];
}
| a.cc: In function 'int main()':
a.cc:9:35: error: 'n' was not declared in this scope
9 | cout<<s[0]<<s.size()-2<<s[n-1];
| ^
|
s767757919 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int totalsize = s.size() + 2 ;
cout << s[0] << size << s[s.size()-1] << endl;
}
| a.cc: In function 'int main()':
a.cc:12:18: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
12 | cout << s[0] << size << s[s.size()-1] << endl;
| ~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]'
306 | operator<<(nullptr_t)
| ^~~~~~~~
/usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::nullptr_t'
306 | operat |
s851953791 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int totalsize = s.size() + 2 ;
cout >> s[0] >> size >> s[s.size()-1] >> endl;
}
| a.cc: In function 'int main()':
a.cc:12:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
a.cc:12:10: note: candidate: 'operator>>(int, int)' (built-in)
a.cc:12:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
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,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:12:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = char&]':
a.cc:12:16: required from here
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
|
s010868862 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> c;
int totalsize = s.size() + 2 ;
cout >> s[0] >> size >> s[s.size()-1] >> endl;
} | a.cc: In function 'int main()':
a.cc:8:12: error: 'c' was not declared in this scope
8 | cin >> c;
| ^
a.cc:12:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
a.cc:12:10: note: candidate: 'operator>>(int, int)' (built-in)
a.cc:12:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
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,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:12:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:12:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = char&]':
a.cc:12:16: required from here
12 | cout >> s[0] >> size >> s[s.size()-1] >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
|
s018460037 | p03636 | C++ | #!/bin/bash
read s
echo ${s:0:1}$((${#s}-2))${s:$((${#s}-1)):$((${#s}-1))}
exit 0 | a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/bin/bash
| ^
a.cc:4:19: error: stray '#' in program
4 | echo ${s:0:1}$((${#s}-2))${s:$((${#s}-1)):$((${#s}-1))}
| ^
a.cc:4:35: error: stray '#' in program
4 | echo ${s:0:1}$((${#s}-2))${s:$((${#s}-1)):$((${#s}-1))}
| ^
a.cc:4:48: error: stray '#' in program
4 | echo ${s:0:1}$((${#s}-2))${s:$((${#s}-1)):$((${#s}-1))}
| ^
a.cc:3:1: error: 'read' does not name a type
3 | read s
| ^~~~
a.cc:4:15: error: expected constructor, destructor, or type conversion before '(' token
4 | echo ${s:0:1}$((${#s}-2))${s:$((${#s}-1)):$((${#s}-1))}
| ^
a.cc:4:22: error: expected unqualified-id before '-' token
4 | echo ${s:0:1}$((${#s}-2))${s:$((${#s}-1)):$((${#s}-1))}
| ^
a.cc:5:1: error: 'exit' does not name a type
5 | exit 0
| ^~~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
+++ |+#include <cstdlib>
1 | #!/bin/bash
|
s131675874 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char a,b,c,i=0;
cin>>a;
while(cin>>b!=EOF)i++;
cin>>c;
cout<<a<<i<<c;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:21: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>' and 'int')
6 | while(cin>>b!=EOF)i++;
| ~~~~~~^~
| |
| std::basic_istream<char>
a.cc:6:21: note: candidate: 'operator!=(int, int)' (built-in)
6 | while(cin>>b!=EOF)i++;
| ^
a.cc:6:21: note: no known conversion for argument 1 from 'std::basic_istream<char>' to 'int'
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:1132:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1132 | operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1132:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c++/14/ext/string_conversions.h:45,
from /usr/include/c++/14/bits/basic_string.h:4154,
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:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | while(cin>>b!=EOF)i++;
| ^~~
/usr/include/c++/14/bits/regex.h:1212: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>&)'
1212 | operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1212:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
6 | while(cin>>b!=EOF)i++;
| ^~~
/usr/include/c++/14/bits/regex.h:1305: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>&)'
1305 | operator!=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1305:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | while(cin>>b!=EOF)i++;
| ^~~
/usr/include/c++/14/bits/regex.h:1379:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1379 | operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1379:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
6 | while(cin>>b!=EOF)i++;
| ^~~
/usr/include/c++/14/bits/regex.h:1473:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1473 | operator!=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1473:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | while(cin>>b!=EOF)i++;
| ^~~
/usr/include/c++/14/bits/regex.h:1547:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1547 | operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1547:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
6 | while(cin>>b!=EOF)i++;
| ^~~
/usr/include/c++/14/bits/regex.h:1647:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1647 | operator!=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1647:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | while(cin>>b!=EOF)i++;
| ^~~
/usr/include/c++/14/bits/regex.h:2213:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator!=(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2213 | operator!=(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2213:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
6 | while(cin>>b!=EOF)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:1052:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1052 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1052:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::pair<_T1, _T2>'
6 | while(cin>>b!=EOF)i++;
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:455:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
455 | operator!=(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
6 | while(cin>>b!=EOF)i++;
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:500:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
500 | operator!=(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
6 | while(cin>>b!=EOF)i++;
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1686:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1686 | operator!=(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1686:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
6 | while(cin>>b!=EOF)i++;
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1753:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1753 | operator!=(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1753:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
6 | while(cin>>b!=EOF)i++;
| ^~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42:
/usr/include/c++/14/bits/postypes.h:197:5: note: candidate: 'template<class _StateT> bool std::operator!=(const fpos<_StateT>&, const fpos<_StateT>&)'
197 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:197:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::fpos<_StateT>'
6 | while(cin>>b!=EOF)i++;
| ^~~
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:243:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const allocator<_CharT>&, const allocator<_T2>&)'
243 | operator!=(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:243:5: note: template argument deduction/substitution failed:
a.cc:6:23: note: 'std::basic_istream<char>' is not derived from 'const std::allocator<_CharT>'
6 | while(cin>>b!=EOF)i++;
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47:
/usr/include/c++/14/string_view:651:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
651 | operator!=(basic_str |
s174147658 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string s;
int len=s.size;
cout<<s[0]<<" "<<len-2<<" "<<s[len];
return 0;
} | a.cc: In function 'int main()':
a.cc:5:19: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
5 | int len=s.size;
| ^~~~
|
s856958058 | p03636 | C++ | #include<cstring>
#include<cstdio>
using namespace std;
char s[10000];
int main()
{
gets(s);
printf("%c%d%c",s[0],strlen(s)-2,s[strlen(s)-1]);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
a.cc:8:12: error: unable to find string literal operator 'operator""\U0000ff0cs' with 'const char [7]', 'long unsigned int' arguments
8 | printf("%c%d%c",s[0],strlen(s)-2,s[strlen(s)-1]);
| ^~~~~~~~~~~
|
s160585329 | p03636 | C++ | # Problem https://atcoder.jp/contests/abc069/tasks/abc069_b
# Python 3rd Try
def solver(inputStr) :
top = inputStr[0]
middle = len(inputStr)-2
endChar = inputStr[-1]
return top,middle,endChar
if __name__=="__main__" :
answer1=''
answer2=0
answer3=''
S = input()
answer1,answer2,answer3= solver(S)
print(answer1,answer2,answer3,sep='')
| a.cc:1:3: error: invalid preprocessing directive #Problem
1 | # Problem https://atcoder.jp/contests/abc069/tasks/abc069_b
| ^~~~~~~
a.cc:2:3: error: invalid preprocessing directive #Python
2 | # Python 3rd Try
| ^~~~~~
a.cc:13:13: error: empty character constant
13 | answer1=''
| ^~
a.cc:15:13: error: empty character constant
15 | answer3=''
| ^~
a.cc:18:39: error: empty character constant
18 | print(answer1,answer2,answer3,sep='')
| ^~
a.cc:5:1: error: 'def' does not name a type
5 | def solver(inputStr) :
| ^~~
|
s623995342 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
cout << S[0] << S.size() - 2 << S[S.size.() - 1] << endl;
} | a.cc: In function 'int main()':
a.cc:6:39: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
6 | cout << S[0] << S.size() - 2 << S[S.size.() - 1] << endl;
| ~~^~~~
| ()
|
s600042526 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
cout<<s[0]<<s.size()-2<<s[s.size-1]<<endl;
} | a.cc: In function 'int main()':
a.cc:6:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
6 | cout<<s[0]<<s.size()-2<<s[s.size-1]<<endl;
| ~~^~~~
| ()
|
s500015856 | p03636 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
char a[120];
int main()
{
scanf("%s",a);
printf("%c%d%c\n",a[0],strlen(a)-2,a[strlen(a)-1a]);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:52: error: unable to find numeric literal operator 'operator""a'
9 | printf("%c%d%c\n",a[0],strlen(a)-2,a[strlen(a)-1a]);
| ^~
|
s040814562 | p03636 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
char a[120];
int main()
{
scanf("%s",a);
printf("%c%d%c",a[0],strlen(a)-2,a[strlen(a)-1a]);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:50: error: unable to find numeric literal operator 'operator""a'
9 | printf("%c%d%c",a[0],strlen(a)-2,a[strlen(a)-1a]);
| ^~
|
s526239242 | p03636 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main(){
char a[1010];
int x;
cin>>a;
cout<<a[0];
x=strlen(a);
x=x-2;
cout<<x;
cout<<a[x+1];
cout<<endl;3
}
| a.cc: In function 'int main()':
a.cc:14:21: error: expected ';' before '}' token
14 | cout<<endl;3
| ^
| ;
15 | }
| ~
|
s785211339 | p03636 | C++ | s=input();l=s[1:-1]
print(s[0]+str(len(l))+s[-1]) | a.cc:1:1: error: 's' does not name a type
1 | s=input();l=s[1:-1]
| ^
a.cc:1:11: error: 'l' does not name a type
1 | s=input();l=s[1:-1]
| ^
|
s916891263 | p03636 | C++ | #include <bits/stdc++.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int my_abs(int num){
if (num > 0)
return num;
else
return -num;
}
int main(){
string S;
cin >> S;
cout << S.at(0);
cout << S.size()-2;
cout << S.at(S.size-1);
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:20:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
20 | cout << S.at(S.size-1);
| ~~^~~~
| ()
|
s640251753 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >>s;
int n=string.size();
cout << string.at(0) << n-2 << string.at(n-1);
}
| a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before '.' token
7 | int n=string.size();
| ^
a.cc:8:17: error: expected primary-expression before '.' token
8 | cout << string.at(0) << n-2 << string.at(n-1);
| ^
a.cc:8:40: error: expected primary-expression before '.' token
8 | cout << string.at(0) << n-2 << string.at(n-1);
| ^
|
s158623113 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >>s;
int n=string.size();
cout << string.at(0) << n-2 << string.at(n-1);
}
| a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before '.' token
7 | int n=string.size();
| ^
a.cc:8:17: error: expected primary-expression before '.' token
8 | cout << string.at(0) << n-2 << string.at(n-1);
| ^
a.cc:8:40: error: expected primary-expression before '.' token
8 | cout << string.at(0) << n-2 << string.at(n-1);
| ^
|
s987892661 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >>s;
int n=string.size();
cout << string.at(0) << n-2 << string.at(n-1);
} | a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before '.' token
7 | int n=string.size();
| ^
a.cc:8:17: error: expected primary-expression before '.' token
8 | cout << string.at(0) << n-2 << string.at(n-1);
| ^
a.cc:8:40: error: expected primary-expression before '.' token
8 | cout << string.at(0) << n-2 << string.at(n-1);
| ^
|
s128206132 | p03636 | C++ | #include<bits/stdc++.h>
string a;
using namespace std;
int main(){
gets(a);
cout<<a[0]<<a.size()-2<<a[a.size()-1];
return 0;
} | a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'?
2 | string a;
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:5:10: error: 'a' was not declared in this scope
5 | gets(a);
| ^
a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
5 | gets(a);
| ^~~~
| getw
|
s754132582 | p03636 | C++ | #include<bits/stdc++.h>
string a;
using namespace std;
int main(){
cin>>a;
cout<<a[0]<<a.size()-2<<a[a.size()-1];
return 0;
} | a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'?
2 | string a;
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:5:10: error: 'a' was not declared in this scope
5 | cin>>a;
| ^
|
s888674423 | p03636 | C++ | #include<cstring>
#include<iostream>
string a;
using namespace std;
int main(){
cin>>a;
cout<<a[0]<<a.size()-2<<a[a.size()-1];
return 0;
} | a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
3 | string a;
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:6:10: error: 'a' was not declared in this scope
6 | cin>>a;
| ^
|
s061824819 | p03636 | C++ | #include<bits/stdc++>
using namespace std;
int main(){
string s;
int i;
cin >> s;
i = s.size();
cout << s.at(0) << i - 2 << s.at(i-1) << endl;
} | a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s387547063 | p03636 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
char s[1001],a,b;
int l=0,len=0;
int main()
{
cin>>s;
for(int i=0;i<strlen(s);i++)
{
l=strlen(s)-2;
len=strlen(s);
a=s[0];
b=s[len-1];
}
cout<<a<<l<<b<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:23: error: 'strlen' was not declared in this scope
9 | for(int i=0;i<strlen(s);i++)
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#include <cstring>
3 | using namespace std;
|
s320838481 | p03636 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
char s[1001],a,b;
int l=0;
int main()
{
cin>>s;
for(int i=0;i<strlen(s);i++)
{
l=strlen(s)-2;
a=s[0];
b=s[strlen(s)-1];
}
cout<<a<<l<<b<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:23: error: 'strlen' was not declared in this scope
9 | for(int i=0;i<strlen(s);i++)
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#include <cstring>
3 | using namespace std;
|
s832428772 | p03636 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<windows.h>
using namespace std;
string s;
long long l,ans;
int main()
{
cin>>s;
l=s.size();
ans=l-2;
cout<<s[0]<<ans<<s[l-1];
return 0;
}
| a.cc:6:9: fatal error: windows.h: No such file or directory
6 | #include<windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s220559690 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
int l;
cin>>a;
l=s.size();
cout<<a[0]<<l-2<<a[l-1];
} | a.cc: In function 'int main()':
a.cc:9:7: error: 's' was not declared in this scope
9 | l=s.size();
| ^
|
s674516966 | p03636 | C++ |
#include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
int l;
cin>>a;
len=s.size();
cout<<a[0]<<l-2<<a[l-1];
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'len' was not declared in this scope
10 | len=s.size();
| ^~~
a.cc:10:9: error: 's' was not declared in this scope
10 | len=s.size();
| ^
|
s329102479 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S;
cin>>S;
cout<<S.at(0)+string(S.size()-2)+S.at(S.size()-1)<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:34: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(std::__cxx11::basic_string<char>::size_type)'
6 | cout<<S.at(0)+string(S.size()-2)+S.at(S.size()-1)<<endl;
| ^
In file included 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,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
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/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
/usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = long unsigned int; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
149 | using _If_sv = enable_if_t<
| ^~~~~~
/usr/include/c++/14/bits/basic_string.h:797:30: required from here
797 | template<typename _Tp, typename = _If_sv<_Tp, void>>
| ^~~~~~~~
/usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, void>'
2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
788 | basic_string(const _Tp& __t, size_type __pos, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
765 | basic_string(_InputIterator __beg, _InputIterator __end,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
669 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:646:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
646 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:646:7: note: template argument deduction/substitution failed:
a.cc:6:32: note: cannot convert '(S.std::__cxx11::basic_string<char>::size() - 2)' (type 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}) to type 'const char*'
6 | cout<<S.at(0)+string(S.size()-2)+S.at(S.size()-1)<<endl;
| ~~~~~~~~^~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
721 | basic_string(basic_string&& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
716 | basic_string(const basic_string& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:711:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:711:45: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to 'std::initializer_list<char>'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:682:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
682 | basic_string(basic_string&& __str) noexcept
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:682:35: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to 'std::__cxx11::basic_string<char>&&'
682 | basic_string(basic_string&& __str) noexcept
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
624 | basic_string(const _CharT* __s, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
604 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate expects 4 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
586 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
569 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:552:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
552 | basic_string(const basic_string& __str)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:552:40: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to 'const std::__cxx11::basic_string<char>&'
552 | basic_string(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:540:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
540 | |
s478958102 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[10000];
int main(){
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
5 | gets(s);
| ^~~~
| getw
|
s097806243 | p03636 | C++ | #include<iostream>
#include<algorithm>
#include<cstdio>
#include<string>
using namespace std;
char s[10000];
int main(){
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
return 0;
} | a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(s);
| ^~~~
| getw
a.cc:9:17: error: 'strlen' was not declared in this scope
9 | cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<cstdio>
+++ |+#include <cstring>
4 | #include<string>
|
s411032708 | p03636 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<cmath>
using namespace std;
char s[10000];
int main(){
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
return 0;
} | a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s);
| ^~~~
| getw
|
s457145206 | p03636 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
char s[10000];
int main(){
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
return 0;
} | a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
a.cc:7:17: error: 'strlen' was not declared in this scope
7 | cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
+++ |+#include <cstring>
3 | using namespace std;
|
s138233490 | p03636 | C++ | #include<iostream>
#include<string>
int main() {
string str;
std::cin >> str;
std::cout << str.at(0) << str.size() -2 << str.back() << std::endl;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
5 | string str;
| ^~~~~~
a.cc:5:3: 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:6:15: error: 'str' was not declared in this scope; did you mean 'std'?
6 | std::cin >> str;
| ^~~
| std
|
s433668761 | p03636 | C++ | #include<iostream>
#include<string>
int main(void){
std::string s;
std::cin >> s;
std::cout << s[0] << s.size() << s[s.end()] << std::endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:37: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator')
6 | std::cout << s[0] << s.size() << s[s.end()] << std::endl;
| ^
In file included from /usr/include/c++/14/string:54,
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,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1247:29: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
1247 | operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
1265 | operator[](size_type __pos)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1265:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
1265 | operator[](size_type __pos)
| ~~~~~~~~~~^~~~~
|
s586998005 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
sting s;
cin >> s;
int x=s.size();
string ans = s[0]+s.size()+s[x-1];
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'sting' was not declared in this scope
4 | sting s;
| ^~~~~
a.cc:5:10: error: 's' was not declared in this scope
5 | cin >> s;
| ^
|
s211458422 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
sting s;
cin >> s;
int x=s.size();
string ans = s[0]+s.size()+s[x-1];
cout << ans << endl; | a.cc: In function 'int main()':
a.cc:4:3: error: 'sting' was not declared in this scope
4 | sting s;
| ^~~~~
a.cc:5:10: error: 's' was not declared in this scope
5 | cin >> s;
| ^
a.cc:8:23: error: expected '}' at end of input
8 | cout << ans << endl;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s944121838 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
gets(s);
int l=strlen(s);
cout<<s[0]<<l-2<<s[l-1];
return 0;
} | a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
a.cc:7:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
7 | int l=strlen(s);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
from a.cc:1:
/usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
|
s207012918 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[10000];
int main(){
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s]-1];} | a.cc: In function 'int main()':
a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
5 | gets(s);
| ^~~~
| getw
a.cc:6:40: error: expected ')' before ']' token
6 | cout<<s[0]<<strlen(s)-2<<s[strlen(s]-1];}
| ~ ^
| )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.