submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s863599460 | p03636 | C++ |
#include <iostream>
#include <string>
using namespace std;
int main(void){
string a;
cin>>a;
cout<<a[1]<<a.size()-=2<<a[a.size()-1]<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:43: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout<<a[1]<<a.size()-=2<<a[a.size()-1]<<endl;
| ~~~~~~~~~~~~~~~~^~~~~~
|
s940205063 | p03636 | C++ |
#include <iostream>
#include <string>
using namespace std;
int main(void){
string a;
cin>>a;
cout<<a[1]<<a.size()-=2<<a.[a.size()-1]<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:32: error: expected unqualified-id before '[' token
8 | cout<<a[1]<<a.size()-=2<<a.[a.size()-1]<<endl;
| ^
|
s445807214 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
string a;
cin>>a;
cout<<a.front()<<a.size()-=2<<a.back()<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:43: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
7 | cout<<a.front()<<a.size()-=2<<a.back()<<endl;
| ~~~~~~~~~~~^~~~~~
|
s739971549 | p03636 | Java | import java.io.*;
public class I18N {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
System.out.println(s.substring(0, 1) + (s.length() - 2) + s.substring(s.length() - 1, s.length()));
}
} | Main.java:2: error: class I18N is public, should be declared in a file named I18N.java
public class I18N {
^
1 error
|
s074849872 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int N = s.size();
cout << s[0] + tostring(N - 2) + s.back() << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:18: error: 'tostring' was not declared in this scope
10 | cout << s[0] + tostring(N - 2) + s.back() << endl;
| ^~~~~~~~
|
s233826499 | p03636 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
String top = s.substring(0,1);
String finish = s.substring(s.length()-2,s.length()-1);
//System.out.println(top);
//System.out.println(finish);
System.out.println(top + ""+ s.length()-2 + "" + finish );
}
}
| Main.java:13: error: bad operand types for binary operator '-'
System.out.println(top + ""+ s.length()-2 + "" + finish );
^
first type: String
second type: int
1 error
|
s168427242 | p03636 | C++ | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
string output;
output = s[0] + s.length - 2 + s[s.length() - 1];
cout << output << endl;
} | a.cc: In function 'int main()':
a.cc:9:23: 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 '()' ?)
9 | output = s[0] + s.length - 2 + s[s.length() - 1];
| ~~^~~~~~
| ()
|
s723876091 | p03636 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main()
{
string s;
cin >> s;
int len;
len = strlen(s);
len -= 2;
cout << s[0] << len << s[len + 1] << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
10 | len = strlen(s);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
from a.cc:2:
/usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
|
s969830688 | p03636 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main()
{
string s;
cin >> s;
len = strlen(s);
len -= 2;
cout << s[0] << len << s[len + 1] << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:3: error: 'len' was not declared in this scope; did you mean 'mblen'?
9 | len = strlen(s);
| ^~~
| mblen
a.cc:9:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
9 | len = strlen(s);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
from a.cc:2:
/usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
|
s455560144 | p03636 | C++ |
#include <iostream>
#include <string>
#include<algorithm>
#include <cstdlib>
#include <cmath>
#include <regex>
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:15:47: 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 '()' ?)
15 | cout << s[0] << s.length() - 2 << s[s.length - 1] << endl;
| ~~^~~~~~
| ()
|
s707989912 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
int i;
int p;
cin >> s;
i = s.length;
p= i - 2;
cout << s[0] << i << s[p] << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:11: 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'
9 | i = s.length;
| ^~~~~~
|
s610813745 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
int i;
int p;
cin >> s;
i = s.length;
p= i - 2;
cout<<s[0]<<i<<s[p]
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:11: 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'
9 | i = s.length;
| ^~~~~~
a.cc:11:24: error: expected ';' before 'return'
11 | cout<<s[0]<<i<<s[p]
| ^
| ;
12 | return 0;
| ~~~~~~
|
s104622267 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
int i;
cin >> s;
i=s.length-2
cout<<s[0]<<i<<s[s.length]
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:9: 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 '()' ?)
8 | i=s.length-2
| ~~^~~~~~
| ()
|
s118632347 | p03636 | C++ | #include <bits/stdc++.h>
#define o(output) cout << output << endl
#define priolity_queue pq
#define push p
#define top t
using namespace std;
string s;
int a,b,c,d;
char A,B;
int main(){
cin>>s;
cout<<s[0]<<s.size()-2<<s[s.size()-1]
} | a.cc: In function 'int main()':
a.cc:16:40: error: expected ';' before '}' token
16 | cout<<s[0]<<s.size()-2<<s[s.size()-1]
| ^
| ;
17 | }
| ~
|
s258651471 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void) {
string in;
cin >> in;
cout << in[0] << in.size() - 2 << in[in.size];
cout << endl;
} | a.cc: In function 'int main()':
a.cc:7:45: 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]'
7 | cout << in[0] << in.size() - 2 << in[in.size];
| ^
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:1076:7: note: declared here
1076 | size() const _GLIBCXX_NOEXCEPT
| ^~~~
|
s199192483 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void)
{
string s;
cin>>s;
s+=to_strng(s.length());
s+=s(n-1);
cout<<s<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:6: error: 'to_strng' was not declared in this scope
8 | s+=to_strng(s.length());
| ^~~~~~~~
a.cc:9:8: error: 'n' was not declared in this scope
9 | s+=s(n-1);
| ^
|
s523158333 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void)
{
string s;
cin>>s;
int n=s.length();
cout<<s(0)++(to_string(n))++s(n-1)<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:10: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
9 | cout<<s(0)++(to_string(n))++s(n-1)<<endl;
| ~^~~
|
s000174840 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void)
{
string s;
cin>>s;
int n=s.length;
cout<<s(0)++(to_string(n))++s(n-1)<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:11: 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'
8 | int n=s.length;
| ^~~~~~
a.cc:9:10: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
9 | cout<<s(0)++(to_string(n))++s(n-1)<<endl;
| ~^~~
|
s493609619 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void)
{
string s;
int n=s.length;
cin>>s;
cout<<s(0)++(to_string(n))++s(n-1)<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:11: 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 n=s.length;
| ^~~~~~
a.cc:9:10: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
9 | cout<<s(0)++(to_string(n))++s(n-1)<<endl;
| ~^~~
|
s892166907 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void)
{
string s;
cin>>s;
cout<<s(0)++(to_string(s.length))++(*(s.end()))<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:10: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
8 | cout<<s(0)++(to_string(s.length))++(*(s.end()))<<endl;
| ~^~~
a.cc:8:28: 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]'
8 | cout<<s(0)++(to_string(s.length))++(*(s.end()))<<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:1083:7: note: declared here
1083 | length() const _GLIBCXX_NOEXCEPT
| ^~~~~~
|
s503534060 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void)
{
string s;
cin>>s;
cout<<s(0)++(to_string(s.length))++*(s.end())<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:10: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
8 | cout<<s(0)++(to_string(s.length))++*(s.end())<<endl;
| ~^~~
a.cc:8:28: 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]'
8 | cout<<s(0)++(to_string(s.length))++*(s.end())<<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:1083:7: note: declared here
1083 | length() const _GLIBCXX_NOEXCEPT
| ^~~~~~
|
s991371897 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int mian(){
string s;
cin >> s;
int N = s.size();
cout << s[0]<< N-2<<s[N-1]<<endl;
} | a.cc: In function 'int mian()':
a.cc:9:5: warning: no return statement in function returning non-void [-Wreturn-type]
9 | }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s011671304 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
mian(){
string s;
cin >> s;
int N = s.length();
cout << s[0]<< N-2<<s[N-1]<<endl;
} | a.cc:4:5: error: ISO C++ forbids declaration of 'mian' with no type [-fpermissive]
4 | mian(){
| ^~~~
a.cc: In function 'int mian()':
a.cc:9:5: warning: no return statement in function returning non-void [-Wreturn-type]
9 | }
| ^
|
s561593335 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int mian(){
string s;
cin >> s;
int N = s.length();
cout << s[0]<< N-2<<s[N-1]<<endl;
} | a.cc: In function 'int mian()':
a.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
9 | }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s259731944 | p03636 | C++ | #include <iostream >
#include<string>
using namespace std;
int main(){
string s;
cout>>s[0]>>s.size()-2>>s[s.size()-1];
} | a.cc:1:10: fatal error: iostream : No such file or directory
1 | #include <iostream >
| ^~~~~~~~~~~
compilation terminated.
|
s079440056 | p03636 | C++ | include <iostream >
include<string>
using namespace std;
int main(){
string s;
cout>>s[0]>>s.size()-2>>s[s.size()-1];
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream >
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
5 | string s;
| ^~~~~~
a.cc:6:9: error: 'cout' was not declared in this scope
6 | cout>>s[0]>>s.size()-2>>s[s.size()-1];
| ^~~~
a.cc:6:15: error: 's' was not declared in this scope
6 | cout>>s[0]>>s.size()-2>>s[s.size()-1];
| ^
|
s055431443 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string word;
cin >> word;
int length;
length = word.size();
word = word[0] + (string)(length - 2) + word[length -1];
cout << word << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:39: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)'
12 | word = word[0] + (string)(length - 2) + word[length -1];
| ^
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: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/move.h:37,
from /usr/include/c++/14/bits/exception_ptr.h:41,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/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 = 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:12:36: note: cannot convert '(length - 2)' (type 'int') to type 'const char*'
12 | word = word[0] + (string)(length - 2) + word[length -1];
| ~~~~~~~~^~~~
/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 '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 '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 '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 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:540:34: note: no known conversion for argument 1 from 'int' to 'const std::allocator<char> |
s953278559 | p03636 | Java | import java.util.*;
public class i18n {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
String str = sc.next();
char head = str.charAt(0);
int body = str.length() - 2;
char leg = str.charAt(body+1);
System.out.print(head);
System.out.print(body);
System.out.println(leg);
}
} | Main.java:2: error: class i18n is public, should be declared in a file named i18n.java
public class i18n {
^
1 error
|
s882088484 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string s;
cin >> s;
cout << s[0] << s.size() - 2 << s.end() - 1 << "\n";
} | a.cc: In function 'int main()':
a.cc:12:38: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >')
12 | cout << s[0] << s.size() - 2 << s.end() - 1 << "\n";
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~
| | |
| | __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >
| 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 |
s248994618 | p03636 | C++ | #include <iostream>
using namespace std;
int main()
{
string s;
cin >> s;
cout << s[0] << s.size() - 2 << s.end() - 1 << "\n";
} | a.cc: In function 'int main()':
a.cc:11:38: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >')
11 | cout << s[0] << s.size() - 2 << s.end() - 1 << "\n";
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~
| | |
| | __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >
| 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' 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 |
s905779024 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.length();
string x = s[0] + 'n-2' +s[n-1];
cout << x << endl;
} | a.cc:8:21: warning: multi-character character constant [-Wmultichar]
8 | string x = s[0] + 'n-2' +s[n-1];
| ^~~~~
a.cc: In function 'int main()':
a.cc:8:27: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
8 | string x = s[0] + 'n-2' +s[n-1];
|
s705015464 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.length();
string x = s[0] + "n-2" +s[n-1]
cout << x << endl;
} | a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'cout'
9 | cout << x << endl;
| ^~~~
|
s075923688 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = length(s);
string x = s[0] + "n-2" +s[n-1]
cout << x << endl;
} | a.cc: In function 'int main()':
a.cc:7:11: error: 'length' was not declared in this scope
7 | int n = length(s);
| ^~~~~~
a.cc:9:5: error: expected ',' or ';' before 'cout'
9 | cout << x << endl;
| ^~~~
|
s085372031 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
int n=s.size();
cout<<s[0]ns[n-1]<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' before 'ns'
7 | cout<<s[0]ns[n-1]<<endl;
| ^~
| ;
|
s407956819 | p03636 | C++ | #include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
using namespace std;
int main(void) {
int n;
char a, b;
string str;
cin >> str;
n = str.length() - 2;
a = str.front();
b = str.back();
cout << a << n << b << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:20:9: error: 'cin' was not declared in this scope
20 | cin >> str;
| ^~~
a.cc:14:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
13 | #include<random>
+++ |+#include <iostream>
14 | using namespace std;
a.cc:28:9: error: 'cout' was not declared in this scope
28 | cout << a << n << b << endl;
| ^~~~
a.cc:28:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:32: error: 'endl' was not declared in this scope
28 | cout << a << n << b << endl;
| ^~~~
a.cc:14:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
13 | #include<random>
+++ |+#include <ostream>
14 | using namespace std;
|
s824822938 | p03636 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
using namespace std;
int main(){
char s[100];
int len;
cin >> s;
len = strlen(s);
cout << s[0] << len - 2 << s[len - 1] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:24:9: error: 'strlen' was not declared in this scope
24 | len = strlen(s);
| ^~~~~~
a.cc:15:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
14 | #include<random>
+++ |+#include <cstring>
15 |
|
s434486821 | p03636 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
using namespace std;
int main(){
char a[100];
int len;
cin >> a;
len = strlen(a);
cout << a[0] << len - 2 << a[len - 1] << endl;
return 0;} | a.cc: In function 'int main()':
a.cc:25:9: error: 'strlen' was not declared in this scope
25 | len = strlen(a);
| ^~~~~~
a.cc:15:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
14 | #include<random>
+++ |+#include <cstring>
15 |
|
s916529165 | p03636 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
using namespace std;
int main(){
char a[100];
int len;
cin >> a;
len = strlen(a);
cout << a[0] << len - 2 << a[len - 1] << endl;
return 0;} | a.cc: In function 'int main()':
a.cc:25:9: error: 'strlen' was not declared in this scope
25 | len = strlen(a);
| ^~~~~~
a.cc:15:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
14 | #include<random>
+++ |+#include <cstring>
15 |
|
s381444629 | p03636 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
using namespace std;
int main(){
char a[100];
int len;
cin >> a;
len = length(a);
cout << a[0] << len - 2 << a[len - 1] << endl;
return 0;} | a.cc: In function 'int main()':
a.cc:25:9: error: 'length' was not declared in this scope
25 | len = length(a);
| ^~~~~~
|
s173186233 | p03636 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <algorithm>
using namespace std;
int main() {
string s;
cin >> s;
string c = s.size;
int count = stoi(c);
cout << s[0] << count - 2 << s[count - 1];
return 0;
} | a.cc: In function 'int main()':
a.cc:16:22: 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]'
16 | string c = s.size;
| ~~^~~~
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:1076:7: note: declared here
1076 | size() const _GLIBCXX_NOEXCEPT
| ^~~~
|
s697253556 | p03636 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
using namespace std;
int main(){
char a[100];
int len;
cin >> a[100];
len = lenght(a);
cout << a[0] << len - 2 << a[len - 1] << endl;
return 0; | a.cc: In function 'int main()':
a.cc:25:9: error: 'lenght' was not declared in this scope
25 | len = lenght(a);
| ^~~~~~
a.cc:29:12: error: expected '}' at end of input
29 | return 0;
| ^
a.cc:18:11: note: to match this '{'
18 | int main(){
| ^
|
s404235927 | p03636 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
using namespace std;
int main(){
char a[100];
int len;
cin >> a[100];
len = length(a);
cout << a[0] << len - 2 << a[len - 1] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:25:9: error: 'length' was not declared in this scope
25 | len = length(a);
| ^~~~~~
|
s408235359 | p03636 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
using namespace std;
int main(){
char a[100];
cin >> a[100];
cout << a[0] << length(a) -1 << a[length(a) -1] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:24:19: error: 'length' was not declared in this scope
24 | cout << a[0] << length(a) -1 << a[length(a) -1] << endl;
| ^~~~~~
|
s232837292 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
char *s;
cin >> s;
int len = strlen(s);
printf("%c%d%c\n", s[0], len - 2, s[len-1]);
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:13: error: 'strlen' was not declared in this scope
9 | int len = 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>
|
s883028168 | p03636 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
System.out.println(s.substring(0,1) + s.length()-2 + s.substring(s.length()-1));
}
} | Main.java:7: error: bad operand types for binary operator '-'
System.out.println(s.substring(0,1) + s.length()-2 + s.substring(s.length()-1));
^
first type: String
second type: int
1 error
|
s036609920 | p03636 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
System.out.println(s.substring(0,1) + s.length()-2 + s.substring(s.length()-1););
}
} | Main.java:7: error: ')' or ',' expected
System.out.println(s.substring(0,1) + s.length()-2 + s.substring(s.length()-1););
^
Main.java:7: error: illegal start of expression
System.out.println(s.substring(0,1) + s.length()-2 + s.substring(s.length()-1););
^
2 errors
|
s613919795 | p03636 | C++ | s = raw_input()
ans = s[0] + str(len(s) - 2) + s[-1]
print ans | a.cc:1:1: error: 's' does not name a type
1 | s = raw_input()
| ^
|
s952116985 | p03636 | Java | #include<iostream>
using namespace std;
int main()
{
string s;
cin>>s;
int count = 0;
for (int i = 2; i < s.length(); i++)
{
count++;
}
cout<<s[0]<<count<< s[s.length()-1];
}
| Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include<iostream>
^
Main.java:6: error: not a statement
cin>>s;
^
Main.java:16: error: not a statement
cout<<s[0]<<count<< s[s.length()-1];
^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
(use --enable-preview to enable unnamed classes)
5 errors
|
s127107390 | p03636 | Java | package l.i18n;
import java.util.Scanner;
public class LI18n {
public static void main(String[] args) {
int count = 0;
Scanner s = new Scanner(System.in);
String a = s.next();
char r = a.charAt(0);
char r2 = a.charAt(a.length() - 1);
for (int i = 2; i < a.length(); i++) {
count++;
}
System.out.println(r+""+count+""+r2);
}
}
| Main.java:5: error: class LI18n is public, should be declared in a file named LI18n.java
public class LI18n {
^
1 error
|
s133642510 | p03636 | Java | package l.i18n;
import java.util.Scanner;
public class LI18n {
public static void main(String[] args) {
int count = 0;
Scanner s = new Scanner(System.in);
String a = s.next();
char r = a.charAt(0);
char r2 = a.charAt(a.length() - 1);
for (int i = 2; i < a.length(); i++) {
count++;
}
System.out.println(r+""+count+""+r2);
}
}
| Main.java:5: error: class LI18n is public, should be declared in a file named LI18n.java
public class LI18n {
^
1 error
|
s706382944 | p03636 | Java | package l.i18n;
import java.util.Scanner;
public class LI18n.java {
public static void main(String[] args) {
int count = 0;
Scanner s = new Scanner(System.in);
String a = s.next();
char r = a.charAt(0);
char r2 = a.charAt(a.length() - 1);
for (int i = 2; i < a.length(); i++) {
count++;
}
System.out.println(r+""+count+""+r2);
}
}
| Main.java:5: error: '{' expected
public class LI18n.java {
^
1 error
|
s708194732 | p03636 | Java | package l.i18n.java;
import java.util.Scanner;
public class LI18n {
public static void main(String[] args) {
int count = 0;
Scanner s = new Scanner(System.in);
String a = s.next();
char r = a.charAt(0);
char r2 = a.charAt(a.length() - 1);
for (int i = 2; i < a.length(); i++) {
count++;
}
System.out.println(r+""+count+""+r2);
}
}
| Main.java:5: error: class LI18n is public, should be declared in a file named LI18n.java
public class LI18n {
^
1 error
|
s178377154 | p03636 | Java | package l.i18n;
import java.util.Scanner;
public class LI18n {
public static void main(String[] args) {
int count = 0;
Scanner s = new Scanner(System.in);
String a = s.next();
char r = a.charAt(0);
char r2 = a.charAt(a.length() - 1);
for (int i = 2; i < a.length(); i++) {
count++;
}
System.out.println(r+""+count+""+r2);
}
}
| Main.java:5: error: class LI18n is public, should be declared in a file named LI18n.java
public class LI18n {
^
1 error
|
s738956458 | p03636 | Java | package l.i18n;
import java.util.Scanner;
public class LI18n {
public static void main(String[] args) {
int count = 0;
Scanner s = new Scanner(System.in);
String a = s.next();
char r = a.charAt(0);
char r2 = a.charAt(a.length() - 1);
for (int i = 2; i < a.length(); i++) {
count++;
}
System.out.println(r + "" + count + "" + r2);
}
}
| Main.java:5: error: class LI18n is public, should be declared in a file named LI18n.java
public class LI18n {
^
1 error
|
s078967200 | p03636 | Java |
import java.util.Scanner;
public class LI18n {
public static void main(String[] args) {
int count = 0;
Scanner s = new Scanner(System.in);
String a = s.next();
char r = a.charAt(0);
char r2 = a.charAt(a.length() - 1);
for (int i = 2; i < a.length(); i++) {
count++;
}
System.out.println(r + "" + count + "" + r2);
}
}
| Main.java:5: error: class LI18n is public, should be declared in a file named LI18n.java
public class LI18n {
^
1 error
|
s781068952 | p03636 | C++ | #include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
int i,x=0;
char ch[100],ln;
gets(ch);
ln=strlen(ch);
for(i=0;i<ln;i++)
{
if(ch[i+1]>='a'&&ch[i]<='z')
{
x++;
}
}
printf("%c%d%c",ch[0],x-1,ch[ln-1]);
} | a.cc: In function 'int main()':
a.cc:8:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(ch);
| ^~~~
| getw
|
s630097974 | p03636 | Java | public static void main(String[] args) {
int count=0;
Scanner s=new Scanner(System.in);
String a=s.next();
// System.out.println(a);
// for(int i=2;i<=a.length()-1;i++){
//
// }
for(int i=2;i<a.length();i++){
count++;
}
System.out.println(count);
}
}
| Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:22: error: class, interface, enum, or record expected
}
^
2 errors
|
s278411846 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char ch[100],str1,str2;
gets(ch);
int n=strlen(ch),i,c=0;
str1=ch[0];
str2=ch[n-1];
for(i=0; i<n; i++)
{
c++;
}
printf("%c%d%c\n",str1,(c-2),str2);
}
| a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(ch);
| ^~~~
| getw
|
s137083523 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char s[100];
gets(s);
int l=strlen(s);
int i;
char a=s[l-1];
if(l>=3 && l<=100)
{
for(i=1; i<l-2; i++)
{
}
cout<<s[0];
cout<<i;
cout<<a;
}
else
{
cout<<s;
}
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
|
s052209552 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char s[100];
gets(s);
int l=strlen(s);
int i;
char a=s[l-1];
if(l>=3 && l<=100)
{
for(i=1; i<l-2; i++)
{
}
cout<<s[0];
cout<<i;
cout<<a;
}
else
{
cout<<s;
}
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
|
s376295556 | p03636 | C++ | #include<stdio.h>
#include<string.h>
#include<string>
#include<stdlib>
int main()
{
char str[100];
int i,len,num=0;
gets(str);
len=strlen(str);
for(i=0;i<len;i++)
{
if(len<3)
break;
else if(i>0&&i<len-1)
{
num++;
}
}
if(len>2)
printf("%c%d%c\n",str[0],num,str[len-1]);
return 0;
}
| a.cc:4:9: fatal error: stdlib: No such file or directory
4 | #include<stdlib>
| ^~~~~~~~
compilation terminated.
|
s777496333 | p03636 | C++ | #include<stdio.h>
#include<string.h>
int main()
{
char str[100];
int i,len,num=0;
gets(str);
len=strlen(str);
for(i=0;i<len;i++)
{
if(len<3)
break;
else if(i>0&&i<len-1)
{
num++;
}
}
if(len>2)
printf("%c%d%c\n",str[0],num,str[len-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(str);
| ^~~~
| getw
|
s799309752 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char a[100];
gets(a);
int l=strlen(a);
if(l>=3)
{
int k=l-2;
printf("%c%d%c\n",a[0],k,a[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(a);
| ^~~~
| getw
|
s778502802 | p03636 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char a[100];
while(gets(a))
{
int l=strlen(a);
if(l>=3)
{
int k=l-2;
printf("%c%d%c\n",a[0],k,a[l-1]);
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:11: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | while(gets(a))
| ^~~~
| getw
|
s604857303 | p03636 | C++ | #include<algorithm>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<sstream>
#include<unordered_map>
#include<unordered_set>
#include<vector>
using uint = unsigned int;
using ll = long long;
enum : int { M = (int)1e9 + 7 };
enum : ll { MLL = (ll)1e18L + 9 };
#ifdef LOCAL
#include"rprint2.hpp"
#else
#define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
#endif
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
string s; cin >> s;
cout << s[0] << s.size() - 2 << s.back() << '\n';
return 0;
}
| a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:1: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:1: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
In file included from a.cc:4:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:14: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:14: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:27: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:27: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:40: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:40: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:54: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:54: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:67: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:67: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s639156251 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string str;
//int len;
cin >> str;
//len=str.size();
cout << str[0] << str.size() << str[str.size-1] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:43: 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 '()' ?)
12 | cout << str[0] << str.size() << str[str.size-1] << endl;
| ~~~~^~~~
| ()
|
s823203027 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string str;
int len;
cin >> str;
len=str.size();
cout << str[0] << str.size() << str[len-1] endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:45: error: expected ';' before 'endl'
12 | cout << str[0] << str.size() << str[len-1] endl;
| ^~~~~
| ;
|
s445717205 | p03636 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
#include<unordered_map>
using namespace std;
//---------------------------------------------------
//ライブラリゾーン!!!!
#define int long long
#define str string
#define rep(i,j) for(int i=0;i<(int)(j);i++)
typedef long long ll;
typedef long double ld;
const ll inf = 4523372036854775807;
const ld pi = 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989;
struct P {
ll pos, cost;
};
bool operator<(P a, P b) { return a.cost < b.cost; }
bool operator>(P a, P b) { return a.cost > b.cost; }
struct B {//隣接リスト表現
ll to, cost;
};
struct S {//辺の情報を入れる変数
int from, to, cost;
};
ll gcm(ll i, ll j) {//最大公約数
if (i > j) swap(i, j);
if (i == 0) return j;
return gcm(j%i, i);
}
ld radian(ld a, ld b, ld c, ld d) {
return sqrt(pow(a - c, 2) + pow(b - d, 2));
}
//---------------------------------------------------
//+++++++++++++++++++++++++++++++++++++++++++++++++++
signed main() {
string s;
cin >> s;
cout << s[0] << s.size() - 2 << s[n - 1] << endl;
getchar(); getchar();
} | a.cc: In function 'int main()':
a.cc:48:43: error: 'n' was not declared in this scope
48 | cout << s[0] << s.size() - 2 << s[n - 1] << endl;
| ^
|
s770356065 | p03636 | C++ | #include <iostream>
using namespace std;
int main(){
string str;
cin >>str;
cout << str(0)<<str.length()<<str(str.length());
} | a.cc: In function 'int main()':
a.cc:7:12: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
7 | cout << str(0)<<str.length()<<str(str.length());
| ~~~^~~
a.cc:7:34: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (std::__cxx11::basic_string<char>::size_type)'
7 | cout << str(0)<<str.length()<<str(str.length());
| ~~~^~~~~~~~~~~~~~
|
s773256555 | p03636 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main(){
char s[101];
string *a;
int len;
cin >> a;
strcpy(s,*a);
len=strlen(s);
cout << s[0] << (len-2) << s[len];
return 0;
} | a.cc: In function 'int main()':
a.cc:9:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string*' {aka 'std::__cxx11::basic_string<char>*'})
9 | cin >> a;
| ~~~ ^~ ~
| | |
| | std::string* {aka std::__cxx11::basic_string<char>*}
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
9 | cin >> a;
| ^
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive]
9 | cin >> a;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:9:10: error: cannot bind rvalue '(short int)a' to 'short int&'
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive]
9 | cin >> a;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:9:10: error: cannot bind rvalue '(short unsigned int)a' to 'short unsigned int&'
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive]
9 | cin >> a;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:9:10: error: cannot bind rvalue '(int)a' to 'int&'
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive]
9 | cin >> a;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:9:10: error: cannot bind rvalue '(unsigned int)a' to 'unsigned int&'
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive]
9 | cin >> a;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:9:10: error: cannot bind rvalue '(long int)a' to 'long int&'
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive]
9 | cin >> a;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:9:10: error: cannot bind rvalue '(long unsigned int)a' to 'long unsigned int&'
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive]
9 | cin >> a;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:9:10: error: cannot bind rvalue '(long long int)a' to 'long long int&'
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive]
9 | cin >> a;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:9:10: error: cannot bind rvalue '(long long unsigned int)a' to 'long long unsigned int&'
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:10: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
9 | cin >> a;
| ^
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candida |
s985355870 | p03636 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main(){
char s[101];
string a;
int len;
cin >> a;
strcpy(s,a);
len=strlen(s);
cout << s[0] << (len-2) << s[len];
return 0;
} | a.cc: In function 'int main()':
a.cc:10:12: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
10 | strcpy(s,a);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:2:
/usr/include/string.h:141:70: note: initializing argument 2 of 'char* strcpy(char*, const char*)'
141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s291133221 | p03636 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main(){
char s[101];
string a
int len;
cin >> a;
strcpy(s,a);
len=strlen(s);
cout << s[0] << (len-2) << s[len];
return 0;
} | a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'int'
8 | int len;
| ^~~
a.cc:9:10: error: 'a' was not declared in this scope
9 | cin >> a;
| ^
a.cc:11:3: error: 'len' was not declared in this scope; did you mean 'mblen'?
11 | len=strlen(s);
| ^~~
| mblen
|
s199511868 | p03636 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main(){
string s;
int len;
cin >> s;
len=strlen(s);
cout << s[0] << (len-2) << s[len];
return 0;
} | a.cc: In function 'int main()':
a.cc:9:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
9 | len=strlen(s);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:2:
/usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
|
s924704550 | p03636 | C |
#include<cstdio>
#include<cstring>
char a[1001];
int main()
{
gets(a);
int str=strlen(a);
printf("%c%d%c",a[0],str-2,a[str-1]);
return 0;
}
| main.c:2:9: fatal error: cstdio: No such file or directory
2 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s725371964 | p03636 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<ctime>
#include<queue>
using namespace std;
char a[1001];
int main()
{
gets(a);
int str=strlen(a);
cout<<a[0]<<str-2<<a[str-1];
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:2: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(a);
| ^~~~
| getw
|
s251096346 | p03636 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string s;
cin >> s;
cout << s[0] << s.length - 2 << s[s.length - 1];
} | a.cc: In function 'int main()':
a.cc:8:27: 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 '()' ?)
8 | cout << s[0] << s.length - 2 << s[s.length - 1];
| ~~^~~~~~
| ()
a.cc:8:45: 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 '()' ?)
8 | cout << s[0] << s.length - 2 << s[s.length - 1];
| ~~^~~~~~
| ()
|
s076103053 | p03636 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
std::string a;
int s,s2;
char st,en;
cin>>a;
a.c_str();
s=a,size();
s2=s-2;
st=a[0];
en=a[s-1];
cout<<st<<s2<<en<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:12: warning: ignoring return value of 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
9 | a.c_str();
| ~~~~~~~^~
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:2640:7: note: declared here
2640 | c_str() const _GLIBCXX_NOEXCEPT
| ^~~~~
a.cc:10:7: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
10 | s=a,size();
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
a.cc:10:13: error: no matching function for call to 'size()'
10 | s=a,size();
| ~~~~^~
In file included from /usr/include/c++/14/string:53:
/usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidate expects 1 argument, 0 provided
|
s989150044 | p03636 | C++ | #include<iostream>
#include<string>
using namespace
int main(){
std::string a;
int s,s2;
char st,en;
cin>>a;
a.c_str();
s=a,size();
s2=s-2;
st=a[0];
en=a[s-1];
cout<<st<<s2<<en<<endl;
return 0;
} | a.cc:4:1: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:3:16: error: expected ';' before 'int'
3 | using namespace
| ^
| ;
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin>>a;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:8: warning: ignoring return value of 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
9 | a.c_str();
| ~~~~~~~^~
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:
/usr/include/c++/14/bits/basic_string.h:2640:7: note: declared here
2640 | c_str() const _GLIBCXX_NOEXCEPT
| ^~~~~
a.cc:10:3: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
10 | s=a,size();
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
a.cc:10:5: error: 'size' was not declared in this scope; did you mean 'std::size'?
10 | s=a,size();
| ^~~~
| std::size
In file included from /usr/include/c++/14/string:53:
/usr/include/c++/14/bits/range_access.h:272:5: note: 'std::size' declared here
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
a.cc:14:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout<<st<<s2<<en<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:14:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
14 | cout<<st<<s2<<en<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s548381586 | p03636 | C | #include <iostream>
#include<cstring>
#include<string>
using namespace std;
int main()
{
string s;
while(cin>>s)
{
int m=s.length();
cout<<s[0]<<m-2<<s[m-1]<<endl;
}
return 0;
}
| main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s226166577 | p03636 | C++ | #include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
char str[110];
int y;
gets(str);
strlwr(str);
y= strlen(str);
printf("%c%d%c\n",str[0],y-2,str[y-1]);
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(str);
| ^~~~
| getw
a.cc:11:5: error: 'strlwr' was not declared in this scope; did you mean 'strstr'?
11 | strlwr(str);
| ^~~~~~
| strstr
|
s225209317 | p03636 | C | #include<stdio.h>
#include<string.h>
int main(void)
{
char str[110];
int y;
gets(str);
strlwr(str);
y= strlen(str);
printf("%c%d%c\n",str[0],y-2,str[y-1]);
return 0;
}
| main.c: In function 'main':
main.c:9:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
9 | gets(str);
| ^~~~
| fgets
main.c:10:5: error: implicit declaration of function 'strlwr'; did you mean 'strlen'? [-Wimplicit-function-declaration]
10 | strlwr(str);
| ^~~~~~
| strlen
|
s117494521 | p03636 | C++ | #include<stdio.h>
#include<string.h>
int main(void)
{
char str[110];
int y;
gets(str);
strlwr(str);
y= strlen(str);
printf("%c%d%c\n",str[0],y-2,str[y-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(str);
| ^~~~
| getw
a.cc:10:5: error: 'strlwr' was not declared in this scope; did you mean 'strstr'?
10 | strlwr(str);
| ^~~~~~
| strstr
|
s905465315 | p03636 | C++ | #include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int INF = 1e9;
int MOD = 1e9+7;
main(){
string s;
cin >> s;
cout << s.begin() + << s.length()-2 << s.end() << endl;
} | a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:9:25: error: expected primary-expression before '<<' token
9 | cout << s.begin() + << s.length()-2 << s.end() << endl;
| ^~
|
s297098715 | p03636 | C | #include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
char s[100];
cin >> s;
int mozisu = strlen(s);
cout << s[0] << (mozisu - 2) << s[mozisu - 1] << endl;
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s418748984 | p03636 | C++ | #include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
char s[100];
cin >> s;
int mozisu = strlen(s);
cout << s[0] << (mozisu - 2) << s[mozisu - 1] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:18: error: 'strlen' was not declared in this scope
11 | int mozisu = strlen(s);
| ^~~~~~
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 | #include <string>
|
s981235640 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[101];
cin>>s;
int l=strlen(s);
cout<<s[0]<<l-2<<s[n-1];
return 0;
} | a.cc: In function 'int main()':
a.cc:8:28: error: 'n' was not declared in this scope
8 | cout<<s[0]<<l-2<<s[n-1];
| ^
|
s205170604 | p03636 | C++ | #include <iostream>
using namespace std;
int main() {
char s[101];
cin>>s;
int l=strlen(s);
cout<<s[0]<<l-2<<s[n-1];
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: error: 'strlen' was not declared in this scope
7 | int l=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 | using namespace std;
a.cc:8:28: error: 'n' was not declared in this scope
8 | cout<<s[0]<<l-2<<s[n-1];
| ^
|
s709870035 | p03636 | C++ | #include <iostream>
using namespace std;
int main(){
string s;
cin >> s;
int N = s.length();
cout << s[0] << N-2 << s[N-1]<<endl;
return 0
} | a.cc: In function 'int main()':
a.cc:13:9: error: expected ';' before '}' token
13 | return 0
| ^
| ;
14 | }
| ~
|
s868470383 | p03636 | C | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);} | main.c:1:13: error: return type defaults to 'int' [-Wimplicit-int]
1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
| ^~~~
main.c: In function 'main':
main.c:1:13: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:21: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
| ^~~~
main.c:1:29: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
main.c:1:29: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
| ^~~~~~
main.c:1:29: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:48: error: 'n' undeclared (first use in this function)
1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
| ^
main.c:1:48: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:56: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
| ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
+++ |+#include <string.h>
1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
main.c:1:56: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
1 | char c[111];main(a){gets(c);printf("%c%d%c",*c,n-1,c[n=strlen(c)-1]);}
| ^~~~~~
main.c:1:56: note: include '<string.h>' or provide a declaration of 'strlen'
|
s669767603 | p03636 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <array>
#include <vector>
#include <functional>
#include <unordered_map>
#include <map>
#include <numeric>
#include <limits>
#include <utility>
#include <queue>
#include <atltime.h>
#include <random>
using namespace std;
typedef long long LL;
int main(void) {
string a;
cin >> a;
cout << a[0] << a.size() - 2 << a[a.size() - 1] << endl;
return 0;
} | a.cc:14:10: fatal error: atltime.h: No such file or directory
14 | #include <atltime.h>
| ^~~~~~~~~~~
compilation terminated.
|
s596963916 | p03636 | Java | import java.util.Scanner;
public class Main{
public static void main(String [] args){
Scanner in=new Scanner (System.in);
String a=in.next();
int N=a.length();
System.out.println("'+a.charAt(0)+(N-2)+a.charAt(N-1));
}
} | Main.java:7: error: unclosed string literal
System.out.println("'+a.charAt(0)+(N-2)+a.charAt(N-1));
^
1 error
|
s928932470 | p03636 | C++ | import java.util.Scanner;
public class Main{
public static void main(String [] args){
Scanner in=new Scanner (System.in);
String a=in.next();
int N=a.length();
System.out.println("'+a.charAt(0)+(N-2)+a.charAt(N-1));
}
} | a.cc:7:20: warning: missing terminating " character
7 | System.out.println("'+a.charAt(0)+(N-2)+a.charAt(N-1));
| ^
a.cc:7:20: error: missing terminating " character
7 | System.out.println("'+a.charAt(0)+(N-2)+a.charAt(N-1));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main{
| ^~~~~~
|
s827286811 | p03636 | C++ | #include<iostream>
#include<math.h>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<cmath>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<string>
#include<string.h>
#include<map>
#include<vector>
#include<set>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main()
{
char s[200];
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
return 0;
} | a.cc: In function 'int main()':
a.cc:29:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
29 | gets(s);
| ^~~~
| getw
|
s021475627 | p03636 | C++ | #include<bits\stdc++.h>
using namespace std;
int main()
{
char s[200];
gets(s);
cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
return 0;
} | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s028069169 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define RI(a) scanf("%d",&a)
#define RII(a,b) scanf("%d%d",&a,&b)
#define RIII(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
#define ALL(a) a.begin(),a.end()
#define F first
#define S second
#define REP(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#ifdef leowang
#define debug(...) do{\
fprintf(stderr,"%s - %d : (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
_DO(__VA_ARGS__);\
}while(0)
template<typename I> void _DO(I&&x){cerr<<x<<endl;}
template<typename I,typename...T> void _DO(I&&x,T&&...tail){cerr<<x<<", ";_DO(tail...);}
#else
#define debug(...)
#endif
//}}}
const ll maxn=100005;
const ll maxlg=__lg(maxn)+2;
const ll INF64=8000000000000000000LL;
const int INF=2000000000;
int main()
{
string s;
cin>>s;
int n=s.length();
printf("%c%d%c\n",s[0],s-2,s[n-1]);
return 0;
}
| a.cc: In function 'int main()':
a.cc:35:33: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ~^~
| | |
| | int
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
618 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed:
a.cc:35:34: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1790 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed:
a.cc:35:34: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
In file included from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/complex:370:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)'
370 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:370:5: note: template argument deduction/substitution failed:
a.cc:35:34: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/complex:379:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)'
379 | operator-(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:379:5: note: template argument deduction/substitution failed:
a.cc:35:34: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/complex:388:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)'
388 | operator-(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:388:5: note: template argument deduction/substitution failed:
a.cc:35:34: note: mismatched types 'const std::complex<_Tp>' and 'int'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/complex:465:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&)'
465 | operator-(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:465:5: note: candidate expects 1 argument, 2 provided
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:35:34: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:35:34: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:35:34: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:35:34: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed:
a.cc:35:34: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const valarray<_Tp>&)'
1197 | _DEFINE_BINARY_OPERATOR(-, __minus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed:
a.cc:35:34: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1197 | _DEFINE_BINARY_OPERATOR(-, __minus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed:
a.cc:35:34: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
/usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1197 | _DEFINE_BINARY_OPERATOR(-, __minus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed:
a.cc:35:34: note: mismatched types 'const std::valarray<_Tp>' and 'int'
35 | printf("%c%d%c\n",s[0],s-2,s[n-1]);
| ^
|
s467316138 | p03636 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
int n;
cin >> s;
int n = s.length();
cout << s[0] << n -2 << s[n - 1] << endl;
} | a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int n'
8 | int n = s.length();
| ^
a.cc:6:7: note: 'int n' previously declared here
6 | int n;
| ^
|
s499379559 | p03636 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(){
sting s;
cin>>s;
cout<<s[0]<<s.size()-2<<s[s.size()-1]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'sting' was not declared in this scope
5 | sting s;
| ^~~~~
a.cc:6:14: error: 's' was not declared in this scope
6 | cin>>s;
| ^
|
s392254003 | p03636 | C++ | #include<iostream>
#include<string>
int main(){
std::string s; cin >> s;
std::cout<<s[0]<<s.size()-2<<s[s.size()-1]<<'\n';
}
| a.cc: In function 'int main()':
a.cc:4:18: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | std::string s; cin >> s;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
|
s704608020 | p03636 | C++ | #include<iostream>
#include<string>
int main(){
string s; cin >> s;
std::cout<<s[0]<<s.size()-2<<s[s.size()-1]<<'\n';
}
| a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
4 | string s; cin >> s;
| ^~~~~~
a.cc:4: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:4:13: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | string s; cin >> s;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:4:20: error: 's' was not declared in this scope
4 | string s; cin >> s;
| ^
|
s224836718 | p03636 | C++ | #include<iostream>
#include<string>
main(){
string s;cin>>s;
std::cout<<s[0]<<s.size()-2<<s[s.size()-1]<<'\n';
}
| a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
4 | string s;cin>>s;
| ^~~~~~
a.cc:4: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:4:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | string s;cin>>s;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:4:17: error: 's' was not declared in this scope
4 | string s;cin>>s;
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.