submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s089460058
p03992
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) #define rep2(i,n) for(int i=0;i<=n;i++) #define repr(i,a,n) for(int i=a;i<n;i++) #define all(a) a.begin(),a.end() #define P pair<long long,long long> #define uni(e) e.erase(unique(e.begin(),e.end()),e.end()) #define double long double template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } int INF=1e10; int MOD=1e9+7; template<class T> void out(T a){cout<<a<<'\n';} template<class T> void yesno(T b){if(b)out("yes");else out("no");} template<class T> void YesNo(T b){if(b)out("Yes");else out("No");} template<class T> void YESNO(T b){if(b)out("YES");else out("NO");} template<class T> void noyes(T b){if(b)out("no");else out("yes");} template<class T> void NoYes(T b){if(b)out("No");else out("Yes");} template<class T> void NOYES(T b){if(b)out("NO");else out("YES");} int keta(int a){ double b=a; b=log10(b); int c=b; return c+1; } int gcd(int a,int b){ if(a%b==0) return b; return gcd(b,a%b); } int lcm(int a,int b){ return a/gcd(a,b)*b; } bool sosuu(int a){ bool b=1; if(a<=1) return 0; else{ rep1(i,sqrt(a)-1){ if(a%(i+1)==0) b=0; } return b; } } int modpow(int a,int b,int m=MOD){ if(!b)return 1; if(b&1)return modpow(a,b-1,m)*a%m; int memo = modpow(a,b>>1,m); return memo*memo%m; } int fact_mod(int n) { int f=1; for(int i=2;i<n+1;i++) f=f*(i%MOD)% MOD; return f; } int mod_pow(int x,int n) { int res=1; while(n>0){ if(n&1) res=(res*x)%MOD; x=(x*x)%MOD; n>>=1; } return res; } int c_mod(int n, int r) { if(r>n-r) r=n-r; if(r==0) return 1; int a=1; rep(i,r) a=a*((n-i)%MOD)%MOD; int b=mod_pow(fact_mod(r), MOD-2); return (a%MOD)*(b%MOD)%MOD; } signed main(){ string a; cin>>a; a.insert(4,' '); cout<<a<<endl; }
a.cc: In function 'int main()': a.cc:81:11: error: no matching function for call to 'std::__cxx11::basic_string<char>::insert(int, char)' 81 | a.insert(4,' '); | ~~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:2: /usr/include/c++/14/bits/basic_string.h:2007:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (near match) 2007 | insert(size_type __pos, const _CharT* __s) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2007:7: note: conversion of argument 2 would be ill-formed: a.cc:81:14: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 81 | a.insert(4,' '); | ^~~ | | | char /usr/include/c++/14/bits/basic_string.h:1876:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 1876 | insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1876:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2069:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2069 | insert(size_type __pos, const _Tp& __svt) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2069:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = std::__cxx11::basic_string<char>&]': /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 = char; _Res = std::__cxx11::basic_string<char>&; _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:2069:2: required by substitution of 'template<class _Tp> std::__cxx11::basic_string<char>::_If_sv<_Tp, std::__cxx11::basic_string<char>&> std::__cxx11::basic_string<char>::insert(size_type, const _Tp&) [with _Tp = char]' 2069 | insert(size_type __pos, const _Tp& __svt) | ^~~~~~ a.cc:81:11: required from here 81 | a.insert(4,' '); | ~~~~~~~~^~~~~~~ /usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, std::__cxx11::basic_string<char>&>' 2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:2086:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2086 | insert(size_type __pos1, const _Tp& __svt, | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2086:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1831:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]' 1831 | insert(const_iterator __p, size_type __n, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1831:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1911:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 1911 | insert(const_iterator __p, initializer_list<_CharT> __l) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1911:29: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>::const_iterator' 1911 | insert(const_iterator __p, initializer_list<_CharT> __l) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:1939:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 1939 | insert(size_type __pos1, const basic_string& __str) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1939:52: note: no known conversion for argument 2 from 'char' to 'const std::__cxx11::basic_string<char>&' 1939 | insert(size_type __pos1, const basic_string& __str) | ~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1963:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, 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]' 1963 | insert(size_type __pos1, const basic_string& __str, | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1963:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1987:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 1987 | insert(size_type __pos, const _CharT* __s, size_type __n) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1987:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2032:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2032 | insert(size_type __pos, size_type __n, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2032:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2051:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(__const_iterator, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2051 | insert(__const_iterator __p, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2051:31: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>::__const_iterator' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 2051 | insert(__const_iterator __p, _CharT __c) | ~~~~~~~~~~~~~~~~~^~~
s055347690
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<n;i++){ if(i==4){ cout<<" "<<flush; } cout<<s[i]<<flush; } cout<<endl; }
a.cc: In function 'int main()': a.cc:7:17: error: 'n' was not declared in this scope 7 | for(int i=0;i<n;i++){ | ^
s826724695
p03992
C++
//#include <tourist> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p; const int INF = 1e9; const ll LINF = ll(1e18); const int MOD = 1000000007; const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0}; const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1}; #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl #define rep(i, n) for (int i = 0; i < n; i++) #define ALL(v) v.begin(), v.end() #define debug(v) \ cout << #v << ":"; \ for (auto x : v) \ { \ cout << x << ' '; \ } \ cout << endl; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } //cout<<fixed<<setprecision(15);有効数字15桁 //-std=c++14 //-std=gnu++17 ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } ll n, m; int main() { cin.tie(0); ios::sync_with_stdio(false); cin >>s; rep(i,4){ cout<<s[i]; } cout<<" "; rep(i,8){ cout<<s[4+i]; } cout<<"\n"; }
a.cc: In function 'int main()': a.cc:54:11: error: 's' was not declared in this scope 54 | cin >>s; | ^
s609755203
p03992
C++
#include<bits/stdc++.h> using nameapsce std; int main() { string s; cin>>s; for(int i=0;i<12;i++) {cout<<s[i]; if(i==3)cout<<" ";} }
a.cc:2:7: error: expected nested-name-specifier before 'nameapsce' 2 | using nameapsce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string s; | ^~~~~~ a.cc:5:3: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>s; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:8: error: 's' was not declared in this scope 6 | cin>>s; | ^ a.cc:8:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | {cout<<s[i]; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s534307882
p03992
C++
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> #define PI 3.14159265359 using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) const long long INF= 1e+18+1; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll> >vvl; typedef pair<ll,ll> P; typedef tuple<ll,ll,ll> T; const ll MOD=1000000007LL; string abc="abcdefghijklmnopqrstuvwxyz"; string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int main(){ string s;cin>>s; rep(i,n){ cout<<s[i]; if(i==3)cout<<" "; } cout<<endl; }
a.cc: In function 'int main()': a.cc:17:9: error: 'n' was not declared in this scope 17 | rep(i,n){ | ^ a.cc:5:43: note: in definition of macro 'rep' 5 | #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) | ^
s728948916
p03992
C++
#include<bits/stdc++.h> using namespace std; int main() { string s; cin>>s; for(int i=0;i<4;i++) cout<<s[i]; cout<<" "; for(int i=4;i<=s.size;i++) cout<<s[i]; return 0; }
a.cc: In function 'int main()': a.cc:10:22: 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 '()' ?) 10 | for(int i=4;i<=s.size;i++) | ~~^~~~ | ()
s477383471
p03992
C++
#include<iostream> #include<cstdio> using namespace std; int main() { for(int i=1;i<=12;i++) { cout<<getchar(); if(i==4) putchar(" "); } cout<<"\n"; return 0; }
a.cc: In function 'int main()': a.cc:10:21: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 10 | putchar(" "); | ^~~ | | | const char* In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/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/stdio.h:618:25: note: initializing argument 1 of 'int putchar(int)' 618 | extern int putchar (int __c); | ~~~~^~~
s685229515
p03992
C++
#include<iostream> #include<cstdio> using namespace std; int main() { for(int i=1;i<=12;i++) { putchar(getchar()); if(i==4) putchar(" "); } cout<<"\n"; return 0; }
a.cc: In function 'int main()': a.cc:10:21: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 10 | putchar(" "); | ^~~ | | | const char* In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/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/stdio.h:618:25: note: initializing argument 1 of 'int putchar(int)' 618 | extern int putchar (int __c); | ~~~~^~~
s240389932
p03992
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; typedef long long ll; #define rep(i,n) for (int i=0;i < (int)(n);i++) int main(){ string s,t; cin >> s; t=substr(0,4); s=substr(4,8); cout << t+" "+s << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:5: error: 'substr' was not declared in this scope 12 | t=substr(0,4); | ^~~~~~
s806614777
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(){ char s[13]; cin >> s; for(inti=0;i<12;i++){ cout << s[i]; if(i==3){ cout << " "; } } }
a.cc: In function 'int main()': a.cc:6:7: error: 'inti' was not declared in this scope; did you mean 'int'? 6 | for(inti=0;i<12;i++){ | ^~~~ | int a.cc:6:14: error: 'i' was not declared in this scope 6 | for(inti=0;i<12;i++){ | ^
s068585258
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < s.size(); i++) { cout << s.at(i); } if (i == 3) { cout << ' '; } cout << endl; }
a.cc: In function 'int main()': a.cc:10:7: error: 'i' was not declared in this scope 10 | if (i == 3) { | ^
s105790526
p03992
C++
#include <iostream> char n[13]; int main(){ cin>>n; for(int i=0;i<4;i++)cout<<n[i]; cout<<" "; for(int i=4;i<12;i++)cout<<n[i]; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>n; | ^~~ | 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:7:23: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | for(int i=0;i<4;i++)cout<<n[i]; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | cout<<" "; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s405633317
p03992
C
(defun in() (let ((s (read-char))) (if (or (eq s nil) (eq s #\space) (eq s #\newline)) (in) s))) (defun func (x) (when (< x 12) (progn (when (eq x 4) (princ " ")) (princ (in)) (func (1+ x))))) (func 0) (princ #\newline)
main.c:1:7: error: expected ')' before 'in' 1 | (defun in() | ^~~ | ) main.c:3:34: error: stray '#' in program 3 | (if (or (eq s nil) (eq s #\space) (eq s #\newline)) | ^ main.c:3:35: error: stray '\' in program 3 | (if (or (eq s nil) (eq s #\space) (eq s #\newline)) | ^ main.c:3:49: error: stray '#' in program 3 | (if (or (eq s nil) (eq s #\space) (eq s #\newline)) | ^ main.c:3:50: error: stray '\' in program 3 | (if (or (eq s nil) (eq s #\space) (eq s #\newline)) | ^ main.c:16:8: error: stray '#' in program 16 | (princ #\newline) | ^ main.c:16:9: error: stray '\' in program 16 | (princ #\newline) | ^
s322214586
p03992
C++
#include <iostraem> #include <string> using namespace std; int main() { string s; cin >> s; for(int i = 0; i < 4; i++) cout << s[i]; cout << " "; for(int i = 4; i < 12; i++) cout << s[i]; cout << endl; }
a.cc:1:10: fatal error: iostraem: No such file or directory 1 | #include <iostraem> | ^~~~~~~~~~ compilation terminated.
s774570380
p03992
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; int main() { for (int i = 0; i< 4; i++){ char j; cin >> j; cout << j; } cout << " "; for (int i = 0; i < 8; i++) { char j; cin >> j; cout << j; } cout << endl;
a.cc: In function 'int main()': a.cc:17:14: error: expected '}' at end of input 17 | cout << endl; | ^ a.cc:7:12: note: to match this '{' 7 | int main() { | ^
s889285707
p03992
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; int main() { for (int i = 0; i< 4; i++) char j; cin >> j; cout << j; } cout << " "; for (int i = 0; i < 8; i++) { char j; cin >> j; cout << j; } cout << endl;
a.cc: In function 'int main()': a.cc:9:20: error: 'j' was not declared in this scope; did you mean 'jn'? 9 | char j; cin >> j; | ^ | jn a.cc: At global scope: a.cc:12:1: error: 'cout' does not name a type 12 | cout << " "; | ^~~~ a.cc:13:1: error: expected unqualified-id before 'for' 13 | for (int i = 0; i < 8; i++) { | ^~~ a.cc:13:17: error: 'i' does not name a type 13 | for (int i = 0; i < 8; i++) { | ^ a.cc:13:24: error: 'i' does not name a type 13 | for (int i = 0; i < 8; i++) { | ^ a.cc:17:1: error: 'cout' does not name a type 17 | cout << endl; | ^~~~
s454897613
p03992
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; int main() { for (int i = 0; i< 4; i++) char i; cin >> i; cout << i; } cout << " "; for (int i = 0; i < 8; i++) { char i; cin >> i; cout << i; } cout << endl;
a.cc: In function 'int main()': a.cc:9:10: error: redeclaration of 'char i' 9 | char i; cin >> i; | ^ a.cc:8:12: note: 'int i' previously declared here 8 | for (int i = 0; i< 4; i++) | ^ a.cc:9:20: error: 'i' was not declared in this scope 9 | char i; cin >> i; | ^ a.cc: At global scope: a.cc:12:1: error: 'cout' does not name a type 12 | cout << " "; | ^~~~ a.cc:13:1: error: expected unqualified-id before 'for' 13 | for (int i = 0; i < 8; i++) { | ^~~ a.cc:13:17: error: 'i' does not name a type 13 | for (int i = 0; i < 8; i++) { | ^ a.cc:13:24: error: 'i' does not name a type 13 | for (int i = 0; i < 8; i++) { | ^ a.cc:17:1: error: 'cout' does not name a type 17 | cout << endl; | ^~~~
s924939439
p03992
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; int main() { for (int i = 0; i< 4; i++) char i; cin >> i; cout << i; } cout << " " << endl; for (int i = 0; i < 8; i++) { char i; cin >> i; cout << i; } cout << endl;
a.cc: In function 'int main()': a.cc:9:10: error: redeclaration of 'char i' 9 | char i; cin >> i; | ^ a.cc:8:12: note: 'int i' previously declared here 8 | for (int i = 0; i< 4; i++) | ^ a.cc:9:20: error: 'i' was not declared in this scope 9 | char i; cin >> i; | ^ a.cc: At global scope: a.cc:12:1: error: 'cout' does not name a type 12 | cout << " " << endl; | ^~~~ a.cc:13:1: error: expected unqualified-id before 'for' 13 | for (int i = 0; i < 8; i++) { | ^~~ a.cc:13:17: error: 'i' does not name a type 13 | for (int i = 0; i < 8; i++) { | ^ a.cc:13:24: error: 'i' does not name a type 13 | for (int i = 0; i < 8; i++) { | ^ a.cc:17:1: error: 'cout' does not name a type 17 | cout << endl; | ^~~~
s164937030
p03992
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; int main() { for (int i = 0, i< 4; i++) char i; cin >> i; cout << i; } cout << " " << endl; for (int i = 09; i < 8; i++) { char i; cin >> i; cout << i; } cout << endl;
a.cc:13:14: error: invalid digit "9" in octal constant 13 | for (int i = 09; i < 8; i++) { | ^~ a.cc: In function 'int main()': a.cc:8:20: error: expected ';' before '<' token 8 | for (int i = 0, i< 4; i++) | ^ | ; a.cc:8:20: error: expected primary-expression before '<' token a.cc:9:10: error: redeclaration of 'char i' 9 | char i; cin >> i; | ^ a.cc:8:12: note: 'int i' previously declared here 8 | for (int i = 0, i< 4; i++) | ^ a.cc:9:20: error: 'i' was not declared in this scope 9 | char i; cin >> i; | ^ a.cc: At global scope: a.cc:12:1: error: 'cout' does not name a type 12 | cout << " " << endl; | ^~~~ a.cc:13:1: error: expected unqualified-id before 'for' 13 | for (int i = 09; i < 8; i++) { | ^~~ a.cc:13:18: error: 'i' does not name a type 13 | for (int i = 09; i < 8; i++) { | ^ a.cc:13:25: error: 'i' does not name a type 13 | for (int i = 09; i < 8; i++) { | ^ a.cc:17:1: error: 'cout' does not name a type 17 | cout << endl; | ^~~~
s020481356
p03992
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.substr(0, 4) + " " + s.substr(4, 8)); } }
Main.java:7: error: cannot find symbol System.out.println(s.substr(0, 4) + " " + s.substr(4, 8)); ^ symbol: method substr(int,int) location: variable s of type String Main.java:7: error: cannot find symbol System.out.println(s.substr(0, 4) + " " + s.substr(4, 8)); ^ symbol: method substr(int,int) location: variable s of type String 2 errors
s354107366
p03992
C++
#include<iostream> using namespace std; int main(void){ string s; cin >> s; cout << s.insert(4,' '); }
a.cc: In function 'int main()': a.cc:6:19: error: no matching function for call to 'std::__cxx11::basic_string<char>::insert(int, char)' 6 | cout << s.insert(4,' '); | ~~~~~~~~^~~~~~~ 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:2007:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (near match) 2007 | insert(size_type __pos, const _CharT* __s) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2007:7: note: conversion of argument 2 would be ill-formed: a.cc:6:22: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 6 | cout << s.insert(4,' '); | ^~~ | | | char /usr/include/c++/14/bits/basic_string.h:1876:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 1876 | insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1876:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2069:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2069 | insert(size_type __pos, const _Tp& __svt) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2069: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 = std::__cxx11::basic_string<char>&]': /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 = char; _Res = std::__cxx11::basic_string<char>&; _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:2069:2: required by substitution of 'template<class _Tp> std::__cxx11::basic_string<char>::_If_sv<_Tp, std::__cxx11::basic_string<char>&> std::__cxx11::basic_string<char>::insert(size_type, const _Tp&) [with _Tp = char]' 2069 | insert(size_type __pos, const _Tp& __svt) | ^~~~~~ a.cc:6:19: required from here 6 | cout << s.insert(4,' '); | ~~~~~~~~^~~~~~~ /usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, std::__cxx11::basic_string<char>&>' 2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:2086:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2086 | insert(size_type __pos1, const _Tp& __svt, | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2086:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1831:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]' 1831 | insert(const_iterator __p, size_type __n, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1831:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1911:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 1911 | insert(const_iterator __p, initializer_list<_CharT> __l) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1911:29: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>::const_iterator' 1911 | insert(const_iterator __p, initializer_list<_CharT> __l) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:1939:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 1939 | insert(size_type __pos1, const basic_string& __str) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1939:52: note: no known conversion for argument 2 from 'char' to 'const std::__cxx11::basic_string<char>&' 1939 | insert(size_type __pos1, const basic_string& __str) | ~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1963:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, 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]' 1963 | insert(size_type __pos1, const basic_string& __str, | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1963:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1987:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 1987 | insert(size_type __pos, const _CharT* __s, size_type __n) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1987:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2032:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2032 | insert(size_type __pos, size_type __n, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2032:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2051:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(__const_iterator, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2051 | insert(__const_iterator __p, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2051:31: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>::__const_iterator' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 2051 | insert(__const_iterator __p, _CharT __c) | ~~~~~~~~~~~~~~~~~^~~
s843501758
p03992
C++
#include<iostream> using namespace std; int main(void){ string s; cin >> s; s = s.insert(3," "); cout << s); }
a.cc: In function 'int main()': a.cc:7:12: error: expected ';' before ')' token 7 | cout << s); | ^ | ;
s093583318
p03992
C++
#include<iostream> using namespace std; int main(void){ string s; cout << s.substring(0,4) << " " <<s.substring(4,8); }
a.cc: In function 'int main()': a.cc:5:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'? 5 | cout << s.substring(0,4) << " " <<s.substring(4,8); | ^~~~~~~~~ | substr a.cc:5:39: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'? 5 | cout << s.substring(0,4) << " " <<s.substring(4,8); | ^~~~~~~~~ | substr
s439118724
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin>>S; cout<<S.at(0)<<S.at(1)<<S.at(2)<<S.at(3)<<" "<<S.at(4)<<S.at(5)<<S.at(6)<<S.at(7)<<S.at(8)<<S.at(9)<<S.at(10)<<S>at(11)<<endl; }
a.cc: In function 'int main()': a.cc:6:116: error: 'at' was not declared in this scope 6 | cout<<S.at(0)<<S.at(1)<<S.at(2)<<S.at(3)<<" "<<S.at(4)<<S.at(5)<<S.at(6)<<S.at(7)<<S.at(8)<<S.at(9)<<S.at(10)<<S>at(11)<<endl; | ^~
s742215125
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a; cin>>a; cout<<a[0]<<a[1]<<a[2]<<a[3]<<a[4]<<' '<<a[5]<<a[6]<<a[7]<<a[8]<<a[9]<<a\ [10]<<a[11]<<'\n'; }#include<bits/stdc++.h> using namespace std; int main(){ string a; cin>>a; cout<<a[0]<<a[1]<<a[2]<<a[3]<<a[4]<<' '<<a[5]<<a[6]<<a[7]<<a[8]<<a[9]<<a [10]<<a[11]<<'\n'; return 0; }
a.cc:8:2: error: stray '#' in program 8 | }#include<bits/stdc++.h> | ^ a.cc:8:3: error: 'include' does not name a type 8 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:10:5: error: redefinition of 'int main()' 10 | int main(){ | ^~~~ a.cc:3:5: note: 'int main()' previously defined here 3 | int main(){ | ^~~~
s966375947
p03992
Java
import java.util.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); String s=sc.next(); System.out.println(s.subString(0,4)+" "+s.subString(4,12)); } }
Main.java:7: error: cannot find symbol System.out.println(s.subString(0,4)+" "+s.subString(4,12)); ^ symbol: method subString(int,int) location: variable s of type String Main.java:7: error: cannot find symbol System.out.println(s.subString(0,4)+" "+s.subString(4,12)); ^ symbol: method subString(int,int) location: variable s of type String 2 errors
s129636956
p03992
Java
import java.util.*; class Main{ public static void main(tring args[]){ Scanner sc = new Scanner(System.in); String s=sc.next(); System.out.println(s.subString(0,4)+" "+s.subString(4,12)); } }
Main.java:4: error: cannot find symbol public static void main(tring args[]){ ^ symbol: class tring location: class Main Main.java:7: error: cannot find symbol System.out.println(s.subString(0,4)+" "+s.subString(4,12)); ^ symbol: method subString(int,int) location: variable s of type String Main.java:7: error: cannot find symbol System.out.println(s.subString(0,4)+" "+s.subString(4,12)); ^ symbol: method subString(int,int) location: variable s of type String 3 errors
s724160343
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0;i < 4; i++) cout << i[s]; cout << " "; for (int i = 4;i < s.length();i++) cout << s[i]; cout << endl; }
a.cc: In function 'int main()': a.cc:10:14: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 10 | cout << i[s]; | ^
s910885158
p03992
C++
#include<iostream> using namespace std; inr main(){ string str; cin >> str; for(int i=0;i<12;i++){ cout << str[i]; if(i==3) cout << ' '; } cout << endl; }
a.cc:3:1: error: 'inr' does not name a type; did you mean 'int'? 3 | inr main(){ | ^~~ | int
s951912369
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; for(int i = 0; i < a.aize(); i++){ cout << a.at(i); if(i == 3) cout << ' '; else if(i == a.size() - 1) cout << endl; } }
a.cc: In function 'int main()': a.cc:7:24: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'aize'; did you mean 'size'? 7 | for(int i = 0; i < a.aize(); i++){ | ^~~~ | size
s685259612
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string str1"1234", str2, str3"12345678"; str2 = " "; for (int i = 0; i < 4; i++) { str1.at(i) = s.at(i); } for (int i = 0; i < 8; i++) { str3.at(i) = s.at(i + 4); } cout << str1 << str2 << str3 << endl; }
a.cc: In function 'int main()': a.cc:7:14: error: expected initializer before string constant 7 | string str1"1234", str2, str3"12345678"; | ^~~~~~ a.cc:8:3: error: 'str2' was not declared in this scope 8 | str2 = " "; | ^~~~ a.cc:10:5: error: 'str1' was not declared in this scope 10 | str1.at(i) = s.at(i); | ^~~~ a.cc:13:5: error: 'str3' was not declared in this scope 13 | str3.at(i) = s.at(i + 4); | ^~~~ a.cc:15:11: error: 'str1' was not declared in this scope 15 | cout << str1 << str2 << str3 << endl; | ^~~~ a.cc:15:27: error: 'str3' was not declared in this scope 15 | cout << str1 << str2 << str3 << endl; | ^~~~
s241424449
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string str1(1234), str2, str3(12345678); str2 = " "; for (int i = 0; i < 4; i++) { str1.at(i) = s.at(i); } for (int i = 0; i < 8; i++) { str3.at(i) = s.at(i + 4); } cout << str1 << str2 << str3 << endl; }
a.cc: In function 'int main()': a.cc:7:19: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)' 7 | string str1(1234), str2, str3(12345678); | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]': /usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = 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:7:15: note: cannot convert '1234' (type 'int') to type 'const char*' 7 | string str1(1234), str2, str3(12345678); | ^~~~ /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>&' 540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:527:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _
s780181280
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string str1(1234), str2(1), str3(12345678); str2 = " "; for (int i = 0; i < 4; i++) { str1.at(i) = s.at(i); } for (int i = 0; i < 8; i++) { str3.at(i) = s.at(i + 4); } cout << str1 << str2 << str3 << endl; }
a.cc: In function 'int main()': a.cc:7:19: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)' 7 | string str1(1234), str2(1), str3(12345678); | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]': /usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = 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:7:15: note: cannot convert '1234' (type 'int') to type 'const char*' 7 | string str1(1234), str2(1), str3(12345678); | ^~~~ /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>&' 540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:527:7: note: candidate: 'std::__cxx11::basic_string<_Ch
s603195003
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string str1(4), str2(1), str3(8); str2 = " "; for (int i = 0; i < 4; i++) { str1.at(i) = s.at(i); } for (int i = 0; i < 8; i++) { str3.at(i) = s.at(i + 4); } cout << str1 << str2 << str3 << endl; }
a.cc: In function 'int main()': a.cc:7:16: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)' 7 | string str1(4), str2(1), str3(8); | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]': /usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = 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:7:15: note: cannot convert '4' (type 'int') to type 'const char*' 7 | string str1(4), str2(1), str3(8); | ^ /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>&' 540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:527:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_
s698640958
p03992
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; for(int i=0; i<s.length(); i++){ cout << s[i] if(i == 3){cout << " ";} } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:17: error: expected ';' before 'if' 8 | cout << s[i] | ^ | ; 9 | if(i == 3){cout << " ";} | ~~
s283053706
p03992
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef vector<vector<int>> vvi; ll gcd(ll a,ll b){ if (a%b==0) return(b); else return(gcd(b,a%b)); } ll lcm(ll a,ll b){ return a*b/gcd(a,b); } vector<int> bfs(vvi L,int S){ vector<int> v(L.size(),-1); v[S]=0; queue<int> q; q.push(S); while(!q.empty()){ int a=q.front(); q.pop(); for(int x:L[a]){ if (v[x]==-1){ v[x]=v[a]+1; q.push(x); } } } return v; } void initialize(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); cout << fixed << setprecision(15); } ///////////////////////////////////////// int main(){ initialize(); string S; cin >> S; rep(1,4) cout << S[i]; cout << " "; rep(i,8) cout << S[i+4]; return 0; }
a.cc: In function 'int main()': a.cc:45:7: error: expected unqualified-id before numeric constant 45 | rep(1,4) cout << S[i]; | ^ a.cc:2:26: note: in definition of macro 'rep' 2 | #define rep(i,n) for(int i=0;i<n;i++) | ^ a.cc:45:7: error: expected ';' before numeric constant 45 | rep(1,4) cout << S[i]; | ^ a.cc:2:26: note: in definition of macro 'rep' 2 | #define rep(i,n) for(int i=0;i<n;i++) | ^ a.cc:45:7: error: lvalue required as left operand of assignment 45 | rep(1,4) cout << S[i]; | ^ a.cc:2:26: note: in definition of macro 'rep' 2 | #define rep(i,n) for(int i=0;i<n;i++) | ^ a.cc:2:33: error: expected ')' before ';' token 2 | #define rep(i,n) for(int i=0;i<n;i++) | ~ ^ a.cc:45:3: note: in expansion of macro 'rep' 45 | rep(1,4) cout << S[i]; | ^~~ a.cc:45:7: error: lvalue required as increment operand 45 | rep(1,4) cout << S[i]; | ^ a.cc:2:34: note: in definition of macro 'rep' 2 | #define rep(i,n) for(int i=0;i<n;i++) | ^
s942519158
p03992
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a; cin >> a; a.insert(4, ' '); cout << a << endl; }
a.cc: In function 'int main()': a.cc:6:11: error: no matching function for call to 'std::__cxx11::basic_string<char>::insert(int, char)' 6 | a.insert(4, ' '); | ~~~~~~~~^~~~~~~~ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:2007:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (near match) 2007 | insert(size_type __pos, const _CharT* __s) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2007:7: note: conversion of argument 2 would be ill-formed: a.cc:6:15: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 6 | a.insert(4, ' '); | ^~~ | | | char /usr/include/c++/14/bits/basic_string.h:1876:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 1876 | insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1876:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2069:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2069 | insert(size_type __pos, const _Tp& __svt) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2069:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = std::__cxx11::basic_string<char>&]': /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 = char; _Res = std::__cxx11::basic_string<char>&; _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:2069:2: required by substitution of 'template<class _Tp> std::__cxx11::basic_string<char>::_If_sv<_Tp, std::__cxx11::basic_string<char>&> std::__cxx11::basic_string<char>::insert(size_type, const _Tp&) [with _Tp = char]' 2069 | insert(size_type __pos, const _Tp& __svt) | ^~~~~~ a.cc:6:11: required from here 6 | a.insert(4, ' '); | ~~~~~~~~^~~~~~~~ /usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, std::__cxx11::basic_string<char>&>' 2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:2086:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2086 | insert(size_type __pos1, const _Tp& __svt, | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2086:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1831:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]' 1831 | insert(const_iterator __p, size_type __n, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1831:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1911:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 1911 | insert(const_iterator __p, initializer_list<_CharT> __l) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1911:29: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>::const_iterator' 1911 | insert(const_iterator __p, initializer_list<_CharT> __l) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:1939:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 1939 | insert(size_type __pos1, const basic_string& __str) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1939:52: note: no known conversion for argument 2 from 'char' to 'const std::__cxx11::basic_string<char>&' 1939 | insert(size_type __pos1, const basic_string& __str) | ~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1963:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, 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]' 1963 | insert(size_type __pos1, const basic_string& __str, | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1963:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1987:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 1987 | insert(size_type __pos, const _CharT* __s, size_type __n) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1987:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2032:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2032 | insert(size_type __pos, size_type __n, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2032:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2051:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(__const_iterator, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2051 | insert(__const_iterator __p, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2051:31: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>::__const_iterator' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 2051 | insert(__const_iterator __p, _CharT __c) | ~~~~~~~~~~~~~~~~~^~~
s416177151
p03992
C++
#include <bits/stdc++.h> using namespace std; int main(){ char a; for (int i = 0; i < 13; i++) { if (i == 4) { cout << ' '; } else { cin >> a; cout << a; } }
a.cc: In function 'int main()': a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s537083384
p03992
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a; cin >> a; for (int i == 12; i > 6; i++) { a[i] = a[i - 1]; } a[4] = ' '; cout << a; }
a.cc: In function 'int main()': a.cc:6:13: error: expected ';' before '==' token 6 | for (int i == 12; i > 6; i++) { | ^~~ | ; a.cc:6:14: error: expected primary-expression before '==' token 6 | for (int i == 12; i > 6; i++) { | ^~ a.cc:6:26: error: expected ')' before ';' token 6 | for (int i == 12; i > 6; i++) { | ~ ^ | ) a.cc:6:28: error: 'i' was not declared in this scope 6 | for (int i == 12; i > 6; i++) { | ^
s518820281
p03992
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a; cin >> a; for (int i == 12; i < 6; i++) { a[i] = a[i - 1]; } a[4] = ' '; cout << a; }
a.cc: In function 'int main()': a.cc:6:13: error: expected ';' before '==' token 6 | for (int i == 12; i < 6; i++) { | ^~~ | ; a.cc:6:14: error: expected primary-expression before '==' token 6 | for (int i == 12; i < 6; i++) { | ^~ a.cc:6:26: error: expected ')' before ';' token 6 | for (int i == 12; i < 6; i++) { | ~ ^ | ) a.cc:6:28: error: 'i' was not declared in this scope 6 | for (int i == 12; i < 6; i++) { | ^
s485335472
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(void) { string s1[4],s2[8]; cin>>s1>>s2; cout<<s1<<" "<<s2<<endl; }
a.cc: In function 'int main()': a.cc:7:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [4]' {aka 'std::__cxx11::basic_string<char> [4]'}) 7 | cin>>s1>>s2; | ~~~^~~~ | | | | | std::string [4] {aka std::__cxx11::basic_string<char> [4]} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:7:8: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} 7 | cin>>s1>>s2; | ^~ /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:7:8: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive] 7 | cin>>s1>>s2; | ^~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:7:8: error: cannot bind rvalue '(short int)((std::string*)(& s1))' 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:7:8: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive] 7 | cin>>s1>>s2; | ^~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:7:8: error: cannot bind rvalue '(short unsigned int)((std::string*)(& s1))' 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:7:8: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive] 7 | cin>>s1>>s2; | ^~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:7:8: error: cannot bind rvalue '(int)((std::string*)(& s1))' 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:7:8: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive] 7 | cin>>s1>>s2; | ^~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:7:8: error: cannot bind rvalue '(unsigned int)((std::string*)(& s1))' 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:7:8: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive] 7 | cin>>s1>>s2; | ^~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:7:8: error: cannot bind rvalue '(long int)((std::string*)(& s1))' 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:7:8: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive] 7 | cin>>s1>>s2; | ^~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:7:8: error: cannot bind rvalue '(long unsigned int)((std::string*)(& s1))' 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:7:8: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive] 7 | cin>>s1>>s2; | ^~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:7:8: error: cannot bind rvalue '(long long int)((std::string*)(& s1))' 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:7:8: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive] 7 | cin>>s1>>s2; | ^~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:7:8: error: cannot bind rvalue '(long long unsigned int)((std::string*)(& s1))' 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:7:8: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 7 | cin>>s1>>s2; | ^~ /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 [4]' {aka 'std::__cxx11::basic_string<char> [4]'} 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 [4]' {aka 'std::__cxx11::basic_string<char> [4]'} 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 [4]' {aka 'std::__cxx11::basic_string<char> [4]'} 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 [4]' {aka 'std::__cxx11::basic_s
s673605349
p03992
Java
s=input();print(s[:4]+" "+s[4:])
Main.java:1: error: class, interface, enum, or record expected s=input();print(s[:4]+" "+s[4:]) ^ Main.java:1: error: class, interface, enum, or record expected s=input();print(s[:4]+" "+s[4:]) ^ 2 errors
s397850985
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a; cin>>a; for(int i=0;i<a.size();i++){ cout<<a[i]; if(i==3){ cout<<" " } } cout<<endl; }
a.cc: In function 'int main()': a.cc:10:12: error: expected ';' before '}' token 10 | cout<<" " | ^ | ; 11 | } | ~
s535169062
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a; cin>>a; for(int i=0;i<a.size();i++) cout<<a[i]; if(i==3){ cout<<" " } } cout<<endl; }
a.cc: In function 'int main()': a.cc:9:6: error: 'i' was not declared in this scope 9 | if(i==3){ | ^ a.cc:10:12: error: expected ';' before '}' token 10 | cout<<" " | ^ | ; 11 | } | ~ a.cc: At global scope: a.cc:13:9: error: 'cout' does not name a type 13 | cout<<endl; | ^~~~ a.cc:16:1: error: expected declaration before '}' token 16 | } | ^
s323645200
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a; cin>>a; for(i=0;i<a.size();i++) cout<<a[i]; if(i==3){ cout<<" " } } cout<<endl; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i' was not declared in this scope 7 | for(i=0;i<a.size();i++) | ^ a.cc:9:6: error: 'i' was not declared in this scope 9 | if(i==3){ | ^ a.cc:10:12: error: expected ';' before '}' token 10 | cout<<" " | ^ | ; 11 | } | ~ a.cc: At global scope: a.cc:13:9: error: 'cout' does not name a type 13 | cout<<endl; | ^~~~ a.cc:16:1: error: expected declaration before '}' token 16 | } | ^
s443983486
p03992
C++
#include <cstdio> #include <iostream> #include <string> #include <cstdlib> #include <vector> #include <algorithm> #include <functional> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < 12; i++) { cout << s.at[i]; if (i == 3) cout << " "; } cout << endl; }
a.cc: In function 'int main()': a.cc:15:29: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 15 | cout << s.at[i]; | ^
s092564130
p03992
C++
s = gets.chomp puts (s[0...4] + ' ' + s[4..-1])
a.cc:2:9: error: too many decimal points in number 2 | puts (s[0...4] + ' ' + s[4..-1]) | ^~~~~ a.cc:2:26: error: too many decimal points in number 2 | puts (s[0...4] + ' ' + s[4..-1]) | ^~~ a.cc:1:1: error: 's' does not name a type 1 | s = gets.chomp | ^
s831896871
p03992
C++
#include <stdio.h> int main(void){ char s[25]; scanf("%s",s); for(count=11;count!=4;count--){ s[count+1]=s[count]; } s[4]=' '; printf("%s",s); return 0; }
a.cc: In function 'int main()': a.cc:5:7: error: 'count' was not declared in this scope 5 | for(count=11;count!=4;count--){ | ^~~~~
s560147472
p03992
C++
#include <bits/stdc++.h> using namespace std; // gcd(a,b) int gcd(int a,int b){ (b == 0) ? gcd(b, a % b) : (return a); } // lcm(a,b) int lcm(int a,int b){ return (a * b) / gcd(a,b); } int main(int argc, char const *argv[]) { string str; cin >> str; for (int i = 0; i < 12; i ++){ cout << str[i]; if (i == 3) cout << " "; } return 0; }
a.cc: In function 'int gcd(int, int)': a.cc:6:37: error: expected primary-expression before 'return' 6 | (b == 0) ? gcd(b, a % b) : (return a); | ^~~~~~ a.cc:6:37: error: expected ')' before 'return' 6 | (b == 0) ? gcd(b, a % b) : (return a); | ~^~~~~~ | ) a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type] 7 | } | ^
s399274266
p03992
C++
#include <bits/stdc++.h> using namespace std; // gcd(a,b) int gcd(int a,int b){ (b == 0) ? (return a) : gcd(b, a % b); } // lcm(a,b) int lcm(int a,int b){ return (a * b) / gcd(a,b); } int main(int argc, char const *argv[]) { for (int i = 0; i < 12; i ++){ cout << s[i]; if (i == 3) cout << " "; } return 0; }
a.cc: In function 'int gcd(int, int)': a.cc:6:21: error: expected primary-expression before 'return' 6 | (b == 0) ? (return a) : gcd(b, a % b); | ^~~~~~ a.cc:6:21: error: expected ')' before 'return' 6 | (b == 0) ? (return a) : gcd(b, a % b); | ~^~~~~~ | ) a.cc:6:46: error: expected ':' before ';' token 6 | (b == 0) ? (return a) : gcd(b, a % b); | ^ | : a.cc:6:46: error: expected primary-expression before ';' token a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type] 7 | } | ^ a.cc: In function 'int main(int, const char**)': a.cc:17:25: error: 's' was not declared in this scope 17 | cout << s[i]; | ^
s719856986
p03992
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #define _CRT_SECURE_NO_WARNINGS #define TLong long long int main(int argc, char const *argv[]) { char str[17]; scanf("%s",str); for (int i = 0; i < strlen(s) + 1; ++i) { if(i < 4) printf("%c", str[i]); else if(i == 4) puts(" "); else printf("%c", str[i - 1]); return 0; } }
main.c: In function 'main': main.c:14:36: error: 's' undeclared (first use in this function) 14 | for (int i = 0; i < strlen(s) + 1; ++i) | ^ main.c:14:36: note: each undeclared identifier is reported only once for each function it appears in
s161524186
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s;cin>>s; cout<<s.substr(s.begin(),4)<<" "<<s.substr(s.begin()+4,8)<<endl; }
a.cc: In function 'int main()': a.cc:5:25: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 5 | cout<<s.substr(s.begin(),4)<<" "<<s.substr(s.begin()+4,8)<<endl; | ~~~~~~~^~ | | | std::__cxx11::basic_string<char>::iterator In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:3208:24: note: initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 3208 | substr(size_type __pos = 0, size_type __n = npos) const | ~~~~~~~~~~^~~~~~~~~ a.cc:5:55: error: cannot convert '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 5 | cout<<s.substr(s.begin(),4)<<" "<<s.substr(s.begin()+4,8)<<endl; | ~~~~~~~~~^~ | | | __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> > /usr/include/c++/14/bits/basic_string.h:3208:24: note: initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 3208 | substr(size_type __pos = 0, size_type __n = npos) const | ~~~~~~~~~~^~~~~~~~~
s781242072
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin>>S; rep(i,S.size()){ if(i==4)cout<<' '; cout<<S[i]; } cout<<endl; }
a.cc: In function 'int main()': a.cc:7:13: error: 'i' was not declared in this scope 7 | rep(i,S.size()){ | ^ a.cc:7:9: error: 'rep' was not declared in this scope 7 | rep(i,S.size()){ | ^~~
s751247492
p03992
C++
#include<algorithm> #include<iostream> #include<functional> #include<cmath> #include<iomanip> using namespace std; int main(){ char s[16]; for(int i=0;i<12;i++){ cin>>s[i]; char a=s[i] cout<<a; if(i==3) cout<<" "; } cout<<endl; }
a.cc: In function 'int main()': a.cc:12:5: error: expected ',' or ';' before 'cout' 12 | cout<<a; | ^~~~
s725422532
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; s.insert(4,' '); cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:6:11: error: no matching function for call to 'std::__cxx11::basic_string<char>::insert(int, char)' 6 | s.insert(4,' '); | ~~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:2007:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (near match) 2007 | insert(size_type __pos, const _CharT* __s) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2007:7: note: conversion of argument 2 would be ill-formed: a.cc:6:14: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 6 | s.insert(4,' '); | ^~~ | | | char /usr/include/c++/14/bits/basic_string.h:1876:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 1876 | insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1876:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2069:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2069 | insert(size_type __pos, const _Tp& __svt) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2069:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = std::__cxx11::basic_string<char>&]': /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 = char; _Res = std::__cxx11::basic_string<char>&; _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:2069:2: required by substitution of 'template<class _Tp> std::__cxx11::basic_string<char>::_If_sv<_Tp, std::__cxx11::basic_string<char>&> std::__cxx11::basic_string<char>::insert(size_type, const _Tp&) [with _Tp = char]' 2069 | insert(size_type __pos, const _Tp& __svt) | ^~~~~~ a.cc:6:11: required from here 6 | s.insert(4,' '); | ~~~~~~~~^~~~~~~ /usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, std::__cxx11::basic_string<char>&>' 2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:2086:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2086 | insert(size_type __pos1, const _Tp& __svt, | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2086:9: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1831:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]' 1831 | insert(const_iterator __p, size_type __n, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1831:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1911:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(const_iterator, std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 1911 | insert(const_iterator __p, initializer_list<_CharT> __l) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1911:29: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>::const_iterator' 1911 | insert(const_iterator __p, initializer_list<_CharT> __l) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:1939:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 1939 | insert(size_type __pos1, const basic_string& __str) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1939:52: note: no known conversion for argument 2 from 'char' to 'const std::__cxx11::basic_string<char>&' 1939 | insert(size_type __pos1, const basic_string& __str) | ~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:1963:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, 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]' 1963 | insert(size_type __pos1, const basic_string& __str, | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1963:7: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:1987:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 1987 | insert(size_type __pos, const _CharT* __s, size_type __n) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:1987:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2032:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2032 | insert(size_type __pos, size_type __n, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2032:7: note: candidate expects 3 arguments, 2 provided /usr/include/c++/14/bits/basic_string.h:2051:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(__const_iterator, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]' 2051 | insert(__const_iterator __p, _CharT __c) | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:2051:31: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>::__const_iterator' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 2051 | insert(__const_iterator __p, _CharT __c) | ~~~~~~~~~~~~~~~~~^~~
s106044123
p03992
C++
import java.util.*; class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String s = sc.next(); char[] c = s.toCharArray(); String s2=""; for(int i=0;i<4;i++) { s2+=c[i]; } s2+=" "; for(int i=4;i<c.length;i++){ s2+=c[i]; } //String s = String.valueOf(i); //int i = Integer.parseInt(s); System.out.println(s2); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:12: error: expected ':' before 'static' 6 | private static Scanner sc = new Scanner(System.in); | ^~~~~~~ | : a.cc:6:20: error: 'Scanner' does not name a type 6 | private static Scanner sc = new Scanner(System.in); | ^~~~~~~ a.cc:8:11: error: expected ':' before 'static' 8 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:8:29: error: 'String' has not been declared 8 | public static void main(String[] args) { | ^~~~~~ a.cc:8:38: error: expected ',' or '...' before 'args' 8 | public static void main(String[] args) { | ^~~~ a.cc:24:2: error: expected ';' after class definition 24 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:9:9: error: 'String' was not declared in this scope 9 | String s = sc.next(); | ^~~~~~ a.cc:10:13: error: structured binding declaration cannot have type 'char' 10 | char[] c = s.toCharArray(); | ^~ a.cc:10:13: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:10:13: error: empty structured binding declaration a.cc:10:16: error: expected initializer before 'c' 10 | char[] c = s.toCharArray(); | ^ a.cc:11:16: error: expected ';' before 's2' 11 | String s2=""; | ^~ a.cc:13:13: error: 's2' was not declared in this scope 13 | s2+=c[i]; | ^~ a.cc:13:17: error: 'c' was not declared in this scope 13 | s2+=c[i]; | ^ a.cc:15:9: error: 's2' was not declared in this scope 15 | s2+=" "; | ^~ a.cc:16:23: error: 'c' was not declared in this scope 16 | for(int i=4;i<c.length;i++){ | ^ a.cc:21:9: error: 'System' was not declared in this scope 21 | System.out.println(s2); | ^~~~~~
s513345403
p03992
C
#include <stdio.h> int main() { int i; char a[12]; scanf("%s,a); for(i=0;i<=3;i++) { printf("%c",a[i]); } printf(" "); for(i=4;i<strlen(a);i++) { printf("%c",a[i]); } return 0; }
main.c: In function 'main': main.c:7:10: warning: missing terminating " character 7 | scanf("%s,a); | ^ main.c:7:10: error: missing terminating " character 7 | scanf("%s,a); | ^~~~~~~ main.c:8:5: error: expected expression before 'for' 8 | for(i=0;i<=3;i++) | ^~~ main.c:17:14: error: expected ';' before '}' token 17 | return 0; | ^ | ; 18 | } | ~
s837021462
p03992
C++
,.,.,.,.>++++[>++++++++<-]>.,.,.,.,.,.,.,.,.>++++[>++++++++<-]>.
a.cc:1:1: error: expected unqualified-id before ',' token 1 | ,.,.,.,.>++++[>++++++++<-]>.,.,.,.,.,.,.,.,.>++++[>++++++++<-]>. | ^ a.cc:1:2: error: expected unqualified-id before '.' token 1 | ,.,.,.,.>++++[>++++++++<-]>.,.,.,.,.,.,.,.,.>++++[>++++++++<-]>. | ^
s579375695
p03992
C++
,.,.,.,.>++++[>++++++++<-]<....,.,.,.,.,.,.,.,.
a.cc:1:1: error: expected unqualified-id before ',' token 1 | ,.,.,.,.>++++[>++++++++<-]<....,.,.,.,.,.,.,.,. | ^ a.cc:1:2: error: expected unqualified-id before '.' token 1 | ,.,.,.,.>++++[>++++++++<-]<....,.,.,.,.,.,.,.,. | ^
s796371334
p03992
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c=''; for(int i=0;i<13;i++){ if(i==3) c=' '; else cin<<c; cout<<c; } cout<<endl; }
a.cc:4:10: error: empty character constant 4 | char c=''; | ^~ a.cc: In function 'int main()': a.cc:9:10: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char') 9 | cin<<c; | ~~~^~~ | | | | | char | std::istream {aka std::basic_istream<char>} a.cc:9:10: note: candidate: 'operator<<(int, int)' (built-in) 9 | cin<<c; | ~~~^~~ a.cc:9:10: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:9:7: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 9 | cin<<c; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14
s533370665
p03992
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; for(int i=0;i<13;i++){ if(i==3) c=' '; else cin<<c; cout<<c; } cout<<endl; }
a.cc: In function 'int main()': a.cc:9:10: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char') 9 | cin<<c; | ~~~^~~ | | | | | char | std::istream {aka std::basic_istream<char>} a.cc:9:10: note: candidate: 'operator<<(int, int)' (built-in) 9 | cin<<c; | ~~~^~~ a.cc:9:10: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:9:7: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 9 | cin<<c; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:9:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin<<c; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _
s632035369
p03992
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<=s.size();i++){ if(i==4){ cout<<" "; continue; } if(i<=3){ cout<<s[i]; }else{ cout<<s[ii1]; } } cout<<endl; }
a.cc: In function 'int main()': a.cc:15:15: error: 'ii1' was not declared in this scope 15 | cout<<s[ii1]; | ^~~
s846041329
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(i=0;i<=3;i++) cout<<s[i]; cout<<' '; for(i=4;i<s.size();i++) cout<<s[i]; cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'i' was not declared in this scope 6 | for(i=0;i<=3;i++) | ^ a.cc:9:9: error: 'i' was not declared in this scope 9 | for(i=4;i<s.size();i++) | ^
s992518250
p03992
C++
#include<iostream> using namespace std; string s; int main() { cin>>s; cout<<s[0]<<s[1]<<s[2]<<s[3]<<" "<<s[4]<<s[5]<<s[6]<<s[7]<<s[8]<<s[9]<<s[10]<<s[11]; return 0; }
a.cc: In function 'int main()': a.cc:6:10: error: 's\U0000ff1b' was not declared in this scope 6 | cin>>s; | ^~~
s848312314
p03992
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; s = s.Insert(4," "); cout << s << endl; }
a.cc: In function 'int main()': a.cc:7:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Insert'; did you mean 'insert'? 7 | s = s.Insert(4," "); | ^~~~~~ | insert
s095654727
p03992
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; cout << s.Insert(4," ") << endl; }
a.cc: In function 'int main()': a.cc:7:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Insert'; did you mean 'insert'? 7 | cout << s.Insert(4," ") << endl; | ^~~~~~ | insert
s548207567
p03992
C++
,.,.,.,.>++++++++++++++++++++++++++++++++.,.,.,.,.,.,.,.,.
a.cc:1:1: error: expected unqualified-id before ',' token 1 | ,.,.,.,.>++++++++++++++++++++++++++++++++.,.,.,.,.,.,.,.,. | ^ a.cc:1:2: error: expected unqualified-id before '.' token 1 | ,.,.,.,.>++++++++++++++++++++++++++++++++.,.,.,.,.,.,.,.,. | ^
s465238692
p03992
C++
#include<iostream> #include<algorithm> #include<math.h> #include<cstdio> #include<ctype.h> #include<stdio.h> #include<set> #include<vector> #include<map> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<numeric> #include<string> using namespace std; typedef long long ll; ll dx[] = { 1,1,0,-1,-1,-1,0,1 }; ll dy[] = { 0,1,1,1,0,-1,-1,-1 }; ll prime(ll x) { ll i; if (x < 2)return 0; else if (x == 2) return 1; if (x % 2 == 0) return 0; for (i = 3; i*i <= x; i += 2) { if (x%i == 0) return 0; } return 1; } ll gcd(ll a, ll b) { if (a<b) { return gcd(b, a); } else if (a%b) { return gcd(b, a%b); } else { return b; } } ll MOD = 1000000007; int main() { string S; cin>>S; cout<<S.substr(0,3)<<" "<<substr(4,11)<<endl; }
a.cc: In function 'int main()': a.cc:41:35: error: 'substr' was not declared in this scope 41 | cout<<S.substr(0,3)<<" "<<substr(4,11)<<endl; | ^~~~~~
s501554180
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < 12; i++) { cout >> s[i]; if (i == 3) cout >> ' '; } cout << endl; }
a.cc: In function 'int main()': a.cc:6:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}) 6 | cout >> s[i]; a.cc:6:10: note: candidate: 'operator>>(int, int)' (built-in) a.cc:6:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41, from a.cc:1: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:6:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 6 | cout >> s[i]; | ^~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> s[i]; | ^ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = char&]': a.cc:6:16: required from here 6 | cout >> s[i]; | ^ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> s[i]; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)' 207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> s[i]; | ^ /usr/include/c++/14/iomani
s487981854
p03992
C++
s = input(); ans = s[0:4] ans += " " ans += (s[4::]) print(ans)
a.cc:1:1: error: 's' does not name a type 1 | s = input(); | ^ a.cc:2:1: error: 'ans' does not name a type 2 | ans = s[0:4] | ^~~
s956287163
p03992
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #include<vector> #include<string> #include<sstream> #include<iomanip> #include<utility> #include<cmath> #include<set> #include<list> #include<queue> #include<stack> #include<deque> #include<map> #include<set> #include<cstring> #include<iterator> #include<bitset> #include<assert.h> using namespace std; struct edge {int /*from,*/to,cost;}; typedef long long ll; typedef pair<int,int> P; typedef pair<int,pair<int,int> > PP; typedef vector<int> VI; typedef vector<long long int> VL; typedef vector<edge> VE; static const int MOD = 1000000007; static const int INF = 2147483647; //static const long long INF = 9223372000000000000; //static const long long INF = 9223372000000000000/2; //static const int INF = 1000010000; //int dx4[4] = {0,1,0,-1}, dy4[4] = {-1,0,1,0}; //int dx5[5] = {-1,0,0,0,1}, dy5[5] = {0,-1,0,1,0}; //int dx8[8] = {-1,0,1,1,1,0,-1,-1}, dy8[8] = {1,1,1,0,-1,-1,-1,0}; //int dx9[9] = {-1,0,1,1,1,0,-1,-1,0}, dy9[9] = {1,1,1,0,-1,-1,-1,0,0}; #define PB push_back #define MP make_pair #define FI first #define SE second #define NP next_permutation #define PQ priority_queue #define UB upper_bound #define LB lower_bound #define ALL(x) (x).begin(),(x).end() #define SZ(a) int((a).size()) #define LEN(a) int((a).length()) #define MAX(a,b,c) max((a),max((b),(c))) #define MIN(a,b,c) min((a),min((b),(c))) #define SORT(c) sort((c).begin(),(c).end()) #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,x) for(int i=0;i<(int)(x);i++) #define REP1(i,x) for(int i=1;i<=(int)(x);i++) #define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--) #define RREP1(i,x) for(int i=((int)(x));i>0;i--) //#define int ll signed main(){ string s; cin >> s; REP(i,4) cout >> s[i]; printf(" "); FOR(i,4,12) cout >> s[i]; puts(" "); return 0; }
a.cc: In function 'int main()': a.cc:64:19: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}) 64 | REP(i,4) cout >> s[i]; a.cc:64:19: note: candidate: 'operator>>(int, int)' (built-in) a.cc:64:19: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:64:14: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 64 | REP(i,4) cout >> s[i]; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = char&]': a.cc:64:25: required from here 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ In file included from a.cc:8: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)' 207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)' 237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed: a.cc:64:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 64 | REP(i,4) cout >> s[i]; | ^ /usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Get_money<_MoneyT>)' 271 | operator>>(basic_istream<_CharT, _Traits>& __is, _Get_money<_MoneyT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:271:5: note: template
s708637942
p03992
C++
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <cstring> #include <map> #include <queue> #include <cmath> #include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3 using namespace std; #define MOD 1000000007 #define ll long long #define ld long double #define FOR(i,a,b) for(ll i=(ll)a;i<(ll)b;i++) #define rep(i,n) FOR(i,0,n) #define pb push_back #define mp make_pair #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define rmsame(a) sort(all(a)),a.erase(unique(all(a)), a.end()) #define rmvector(a,b) rep(i,a.size())rep(j,b.size())if(a[i]==b[j]){a.erase(a.begin()+i);i--;break;} template<typename X> bool exist(vector<X> vec, X item){return find(all(vec), item)!=vec.end();} template<class T = ll> T in(){T x; cin >> x; return (x);} int main(){ cin.tie(0); ios::sync_with_stdio(false); string s = <string>in(); rep(i,s.size()){ cout << s[i]; if(i==3) cout << " " ; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:30:13: error: expected primary-expression before '<' token 30 | string s = <string>in(); | ^ a.cc:30:20: error: expected primary-expression before '>' token 30 | string s = <string>in(); | ^
s304755207
p03992
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String before = sc.next(); for (int i = 0; i < 12; i++) { System.out.print(before.charAt(i)); if (i == 3) { System.out.print(' '); } } } }
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s743611126
p03992
C
#include <stdio.h> String main(String *lst){ String lst_[15]; int i; for(i =0; i++; i<4){ lst_[i] = lst[i]; } lst_[4] = " "; for(i =5; i++; i<12){ lst_[i] = lst[i]; } lst_[12] = "¥n"; return *lst_; }
main.c:3:1: error: unknown type name 'String' 3 | String main(String *lst){ | ^~~~~~ main.c:3:13: error: unknown type name 'String' 3 | String main(String *lst){ | ^~~~~~
s554711306
p03992
C
#include <stdio.h> String main(String *lst){ String lst_[15]; int i; for(i =0; i++; i<4){ lst_[i] = lst[i]; } lst_[4] = " "; for(i =5; i++; i<12){ lst_[i] = lst[i]; } lst_[12] = "¥n"; return *lst_;
main.c:3:1: error: unknown type name 'String' 3 | String main(String *lst){ | ^~~~~~ main.c:3:13: error: unknown type name 'String' 3 | String main(String *lst){ | ^~~~~~
s013483283
p03992
C++
#include "IntMod.h" typedef IntMod<1000000007> MInt; //#include "Union_Find.h" #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <string> #include <vector> #include <list> #include <utility> #include <algorithm> #include <functional> #include <cmath> #include <stack> #include <queue> #include <set> #include <map> #include <iomanip> #include <sstream> #include <numeric> #include <array> #include <bitset> using namespace std; #define REP(i,a,n) for(int i = (a); i < (int)(n); ++i) #define REPM(i,n,a) for(int i = ((n) - 1); i >= (a); --i) #define EPS 0.0001 #define INF 0x3FFFFFFF #define INFLL 0x3FFFFFFF3FFFFFFF #define INFD 1.0e+308 #define FLOAT setprecision(16) typedef long long LL; typedef unsigned long long ULL; typedef pair<LL, LL> PP; template <class T, class U> istream& operator>>(istream& ist, pair<T, U>& right) { return ist >> right.first >> right.second; } template <class T, class U> ostream& operator<<(ostream& ost, pair<T, U>& right) { return ost << right.first << ' ' << right.second; } template <class T, class TCompatible, size_t N> void Fill(T(&dest)[N], const TCompatible& val) { fill(begin(dest), end(dest), val); } template <class T, class TCompatible, size_t M, size_t N> void Fill(T(&dest)[M][N], const TCompatible& val) { for (int i = 0; i < M; ++i) Fill(dest[i], val); } // all_of #if 1 #include <unordered_set> #include <unordered_map> template<typename T> using PriorityQ = priority_queue<T, vector<T>, greater<T> >; // コスト小を優先 #endif string s; int main() { cin >> s; s.insert(s.begin() + 4, ' '); cout << s << endl; return 0; }
a.cc:1:10: fatal error: IntMod.h: No such file or directory 1 | #include "IntMod.h" | ^~~~~~~~~~ compilation terminated.
s606131527
p03992
C++
#include <iostream> int main(){ for(int i = 0; i < 12; i++){ char c; cin >> c; cout << c; if(i == 3){ cout << " "; } } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> c; | ^~~ | 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:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout << c; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s708977957
p03992
C++
#include <iostream> int mains(){ for(int i = 0; i < 12; i++){ char c; cin >> c; cout << c; if(i == 3){ cout << " "; } } cout << endl; return 0; }
a.cc: In function 'int mains()': a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> c; | ^~~ | 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:6:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout << c; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s166242842
p03992
C++
#include<iostream> using namespace std; int main(){ int a[4],b[8]; cin >> a[4] >>b[8]; cout << a[4] <<" " << b[8]; return0; }
a.cc: In function 'int main()': a.cc:8:1: error: 'return0' was not declared in this scope 8 | return0; | ^~~~~~~
s284078954
p03992
C++
gh
a.cc:1:1: error: 'gh' does not name a type 1 | gh | ^~
s136824686
p03992
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // get a integer int a = sc.nextInt(); int[] arr = new int[a]; for (int i = 0; i < a; i++) { arr[i] = sc.nextInt(); } int count = 0; if (arr[arr[i]] == i) { count++; } System.out.println(count / 2); } }
Main.java:12: error: cannot find symbol if (arr[arr[i]] == i) { ^ symbol: variable i location: class Main Main.java:12: error: cannot find symbol if (arr[arr[i]] == i) { ^ symbol: variable i location: class Main 2 errors
s840174767
p03992
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // get a integer int a = sc.nextInt(); int[] arr = new int[a]; for (int i = 0; i < a; i++) { a[i] = sc.nextInt(); } int count = 0; if (a[a[i]] == i) { count++; } System.out.println(count / 2); } }
Main.java:9: error: array required, but int found a[i] = sc.nextInt(); ^ Main.java:12: error: cannot find symbol if (a[a[i]] == i) { ^ symbol: variable i location: class Main Main.java:12: error: array required, but int found if (a[a[i]] == i) { ^ Main.java:12: error: array required, but int found if (a[a[i]] == i) { ^ Main.java:12: error: cannot find symbol if (a[a[i]] == i) { ^ symbol: variable i location: class Main 5 errors
s850627765
p03992
C++
#include<iostream> using namespace std; int main() { string s; cin >> s cout << s.substr(0,4) << ' ' << s.substr(4, 8); return 0; }
a.cc: In function 'int main()': a.cc:7:11: error: expected ';' before 'cout' 7 | cin >> s | ^ | ; 8 | cout << s.substr(0,4) << ' ' << s.substr(4, 8); | ~~~~
s492145628
p03992
Java
public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s=sc.next(); s=s.substring(0,4)+" "+s.substring(4,12); System.out.println(s); } }
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s998251734
p03992
C++
string s; cin >> s; cout << s.substr(0, 4) + " " + s.substr(4);
a.cc:1:1: error: 'string' does not name a type 1 | string s; | ^~~~~~ a.cc:2:1: error: 'cin' does not name a type 2 | cin >> s; | ^~~ a.cc:3:1: error: 'cout' does not name a type 3 | cout << s.substr(0, 4) + " " + s.substr(4); | ^~~~
s104437933
p03992
C++
#include <stdio.h> #include <iostream> #include <string> using namespace std; int main(int argc, char *argv[]){ cout << taskA(string(argv[0])); } string taskA(string s) { return s.substr(0, 4) + " " + s.substr(4); }
a.cc: In function 'int main(int, char**)': a.cc:6:17: error: 'taskA' was not declared in this scope 6 | cout << taskA(string(argv[0])); | ^~~~~
s502371179
p03992
C
int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);}
main.c: In function 'main': main.c:1:26: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);} | ^~~~ main.c:1:41: error: unknown type name 'size_t' 1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);} | ^~~~~~ main.c:1:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' +++ |+#include <stddef.h> 1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);} main.c:1:97: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);} | ^~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts' +++ |+#include <stdio.h> 1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);}
s516536335
p03992
C++
int main() { string a; cin >> a; rep(i, 4) cout << a[i]; cout << " "; rep(i, 8) cout << a[i + 4]; cout << endl; }
a.cc: In function 'int main()': a.cc:2:9: error: 'string' was not declared in this scope 2 | string a; | ^~~~~~ a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin >> a; | ^~~ a.cc:3:16: error: 'a' was not declared in this scope 3 | cin >> a; | ^ a.cc:4:13: error: 'i' was not declared in this scope 4 | rep(i, 4) | ^ a.cc:4:9: error: 'rep' was not declared in this scope 4 | rep(i, 4) | ^~~ a.cc:6:9: error: 'cout' was not declared in this scope 6 | cout << " "; | ^~~~ a.cc:9:17: error: 'endl' was not declared in this scope 9 | cout << endl; | ^~~~
s262134092
p03992
C++
#include <bits/stdc++.h> int main() {string s; cin>>s; cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:4:2: error: 'string' was not declared in this scope 4 | {string s; | ^~~~~~ a.cc:4:2: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:5:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>s; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:5:7: error: 's' was not declared in this scope 5 | cin>>s; | ^ a.cc:6:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s335325660
p03992
C++
#include <bits/stdc++.h> int main() { string s; cin>> s; cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl; }
a.cc: In function 'int main()': a.cc:4:3: error: 'string' was not declared in this scope 4 | { string s; | ^~~~~~ a.cc:4:3: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>> s; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:5:7: error: 's' was not declared in this scope 5 | cin>> s; | ^ a.cc:6:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s616278398
p03992
C++
int main(){ char *str = new char[10001]; int count; scanf("%s", str); scanf("%d", &count); size_t str_len = strlen(str); int idx = 0; while(count > 0){ int sub_a = static_cast<int>(str[idx]) - 97; int next2a = 123 - static_cast<int>(str[idx]); if(idx == str_len - 1){ str[idx] = 97 + (sub_a + count) % 26; count = 0; } else if(sub_a % 26 != 0 && next2a <= count){ str[idx] = 'a'; count -= next2a; idx ++; } else idx++; } printf("%s\n", str); delete[] str; return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'scanf' was not declared in this scope 5 | scanf("%s", str); | ^~~~~ a.cc:8:5: error: 'size_t' was not declared in this scope 8 | size_t str_len = strlen(str); | ^~~~~~ a.cc:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' +++ |+#include <cstddef> 1 | a.cc:20:19: error: 'str_len' was not declared in this scope 20 | if(idx == str_len - 1){ | ^~~~~~~ a.cc:35:5: error: 'printf' was not declared in this scope 35 | printf("%s\n", str); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 |
s612174180
p03992
C++
#include <iostream> #include <string> using namespace std; int main(){ char *str = new char[10000]; int count; scanf("%s", str); scanf("%d", &count); size_t str_len = strlen(str); int idx = 0; while(count > 0){ int sub_a = static_cast<int>(str[idx] - 97); int next2a = static_cast<int>(123 - str[idx]); if(sub_a % 26 != 0 && next2a < count){ str[idx] = 'a'; count -= next2a; idx ++; } else if(idx == str_len - 1){ str[idx] = 97 + (sub_a + count) % 26; count = 0; } else idx++; } printf("%s", str); delete[] str; return 0; }
a.cc: In function 'int main()': a.cc:13:22: error: 'strlen' was not declared in this scope 13 | size_t str_len = strlen(str); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostream> +++ |+#include <cstring> 3 | #include <string>
s791253964
p03992
C++
include <stdio.h> int main(){ // get size int number; scanf("%d", &number); int *likes = new int[number]; for(int i = 0; i < number; i++){ scanf("%d", &likes[i]); } int pairs = 0; for(int i = 0; i < number; i++){ int r1 = i+1; int r1_likes = likes[i]; int r2_likes = likes[r1_likes-1]; if(r1 == r2_likes){ pairs++; } } printf("%d\n", pairs); return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <stdio.h> | ^~~~~~~
s354757274
p03992
C++
#include <stdioi.h> int main(){ // get size int number; scanf("%d", &number); int *likes = new int[number]; for(int i = 0; i < number; i++){ scanf("%d", &likes[i]); } int pairs = 0; for(int i = 0; i < number; i++){ int r1 = i+1; int r1_likes = likes[i]; int r2_likes = likes[r1_likes-1]; if(r1 == r2_likes){ pairs++; } } printf("%d", pairs); return 0; }
a.cc:1:10: fatal error: stdioi.h: No such file or directory 1 | #include <stdioi.h> | ^~~~~~~~~~ compilation terminated.
s412352011
p03992
C++
#include<iostream> using namespace std; ios::sync_with_stdio(false); int main(void){ string s; cin >> s; cout << s.substr(0,4) << " " << s.substr(4,8) << endl; return 0; }
a.cc:3:1: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax 3 | ios::sync_with_stdio(false); | ^~~
s874410035
p03992
C++
#include <iostream> #include <cstdio> #define rep(i, n) fr(i, 0, n) int main() { string s; cin >>s; rep(i, 4)cout<<s[i]; cout<<" "; rep(i, 8)cout<<s[i+4]; cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'string' was not declared in this scope 6 | string s; | ^~~~~~ a.cc:6:5: 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:2: /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:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | 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:7:11: error: 's' was not declared in this scope 7 | cin >>s; | ^ a.cc:8:9: error: 'i' was not declared in this scope 8 | rep(i, 4)cout<<s[i]; | ^ a.cc:4:22: note: in definition of macro 'rep' 4 | #define rep(i, n) fr(i, 0, n) | ^ a.cc:4:19: error: 'fr' was not declared in this scope 4 | #define rep(i, n) fr(i, 0, n) | ^~ a.cc:8:5: note: in expansion of macro 'rep' 8 | rep(i, 4)cout<<s[i]; | ^~~ a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout<<" "; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s806174367
p03992
C++
#include<iostream> using namespace std; int main { string S; cin>>S; for(int i=0;i<12;i++) { if (i==4) cout<<' '; cout<<S[i]; } return 0; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main | ^~~~ a.cc:6:8: error: expected primary-expression before 'S' 6 | string S; | ^ a.cc:6:8: error: expected '}' before 'S' a.cc:5:1: note: to match this '{' 5 | { | ^ a.cc:7:1: error: 'cin' does not name a type 7 | cin>>S; | ^~~ a.cc:8:1: error: expected unqualified-id before 'for' 8 | for(int i=0;i<12;i++) | ^~~ a.cc:8:13: error: 'i' does not name a type 8 | for(int i=0;i<12;i++) | ^ a.cc:8:18: error: 'i' does not name a type 8 | for(int i=0;i<12;i++) | ^ a.cc:13:1: error: expected unqualified-id before 'return' 13 | return 0; | ^~~~~~ a.cc:14:1: error: expected declaration before '}' token 14 | } | ^
s407217754
p03992
C++
#include<iostream> #include<string.h> using namespace std; int main { char S[13]; cin.getline(S,12); for(int i=12;i>=4;i--) { S[i]=S[i-1]; } S[4]=' '; cout<<S; return 0; }
a.cc:5:5: error: cannot declare '::main' to be a global variable 5 | int main | ^~~~ a.cc:7:1: error: expected primary-expression before 'char' 7 | char S[13]; | ^~~~ a.cc:7:1: error: expected '}' before 'char' a.cc:6:1: note: to match this '{' 6 | { | ^ a.cc:8:1: error: 'cin' does not name a type 8 | cin.getline(S,12); | ^~~ a.cc:9:1: error: expected unqualified-id before 'for' 9 | for(int i=12;i>=4;i--) | ^~~ a.cc:9:14: error: 'i' does not name a type 9 | for(int i=12;i>=4;i--) | ^ a.cc:9:19: error: 'i' does not name a type 9 | for(int i=12;i>=4;i--) | ^ a.cc:13:1: error: 'S' does not name a type 13 | S[4]=' '; | ^ a.cc:14:1: error: 'cout' does not name a type 14 | cout<<S; | ^~~~ a.cc:15:1: error: expected unqualified-id before 'return' 15 | return 0; | ^~~~~~ a.cc:16:1: error: expected declaration before '}' token 16 | } | ^
s936479247
p03992
C++
#include<iostream> #include<string.h> using namespace std; int main { char str[51]; cin.getline(str,49); for(int i=50;i>=4;i--) { str[i]=str[i-1]; } str[4]=' '; }
a.cc:5:5: error: cannot declare '::main' to be a global variable 5 | int main | ^~~~ a.cc:7:1: error: expected primary-expression before 'char' 7 | char str[51]; | ^~~~ a.cc:7:1: error: expected '}' before 'char' a.cc:6:1: note: to match this '{' 6 | { | ^ a.cc:8:1: error: 'cin' does not name a type 8 | cin.getline(str,49); | ^~~ a.cc:9:1: error: expected unqualified-id before 'for' 9 | for(int i=50;i>=4;i--) | ^~~ a.cc:9:14: error: 'i' does not name a type 9 | for(int i=50;i>=4;i--) | ^ a.cc:9:19: error: 'i' does not name a type 9 | for(int i=50;i>=4;i--) | ^ a.cc:13:1: error: 'str' does not name a type 13 | str[4]=' '; | ^~~ a.cc:14:1: error: expected declaration before '}' token 14 | } | ^
s322002571
p03992
C++
#include<iostream> #include<string.h> using namespace std; int main { char srt[51]; cin.getline(str,49); for(int i=50;i>=4;i--) { str[i]=str[i-1]; } str[4]=' '; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main | ^~~~ a.cc:6:1: error: expected primary-expression before 'char' 6 | char srt[51]; | ^~~~ a.cc:6:1: error: expected '}' before 'char' a.cc:5:1: note: to match this '{' 5 | { | ^ a.cc:7:1: error: 'cin' does not name a type 7 | cin.getline(str,49); | ^~~ a.cc:8:1: error: expected unqualified-id before 'for' 8 | for(int i=50;i>=4;i--) | ^~~ a.cc:8:14: error: 'i' does not name a type 8 | for(int i=50;i>=4;i--) | ^ a.cc:8:19: error: 'i' does not name a type 8 | for(int i=50;i>=4;i--) | ^ a.cc:12:1: error: 'str' does not name a type 12 | str[4]=' '; | ^~~ a.cc:13:1: error: expected declaration before '}' token 13 | } | ^