submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s380681385
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string A, B, C; cin >> A >> B >> C; char b = B.at(0) cout << A << b << C << endl; }
a.cc: In function 'int main()': a.cc:8:5: error: expected ',' or ';' before 'cout' 8 | cout << A << b << C << endl; | ^~~~
s474852362
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string A, B, C; cin >> A >> B >> c; char b = B.at(0) cout << A << b << C << endl; }
a.cc: In function 'int main()': a.cc:6:20: error: 'c' was not declared in this scope 6 | cin >> A >> B >> c; | ^ a.cc:8:5: error: expected ',' or ';' before 'cout' 8 | cout << A << b << C << endl; | ^~~~
s915724367
p03860
C++
nclude <iostream> int main(void) { std::string prefix, suffix, contest_name; std::cin >> prefix >> contest_name >> suffix; std::cout << prefix.at(0) << contest_name.at(0) << suffix.at(0) << std::endl; return 0; }
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude <iostream> | ^~~~~~
s977308803
p03860
C++
#include<bits/stdc++.h> using namespace std; int main() { string a,s,c; cin >> A >> s >> C; cout << 'A' << s.at(0) << 'C'; }
a.cc: In function 'int main()': a.cc:7:10: error: 'A' was not declared in this scope 7 | cin >> A >> s >> C; | ^ a.cc:7:20: error: 'C' was not declared in this scope 7 | cin >> A >> s >> C; | ^
s875650910
p03860
C++
#include<bits/stdc++.h> using namespace std; int main() { string x; cin >> x; cout << "A"+x.at(0)+"C" << endl; }
a.cc: In function 'int main()': a.cc:7:22: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 7 | cout << "A"+x.at(0)+"C" << endl; | ~~~~~~~~~~~^~~~ | | | | | const char [2] | const char*
s776493799
p03860
C++
string a, b, c; cin >> a >> b >>c; cout << a[0] << b[0] << c[0] << endl;
a.cc:1:1: error: 'string' does not name a type 1 | string a, b, c; | ^~~~~~ a.cc:2:1: error: 'cin' does not name a type 2 | cin >> a >> b >>c; | ^~~ a.cc:3:1: error: 'cout' does not name a type 3 | cout << a[0] << b[0] << c[0] << endl; | ^~~~
s606912629
p03860
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string n; cin >> n; cout << 'A' + n.at(0) 'C' << endl; }
a.cc: In function 'int main()': a.cc:9:28: error: expected ';' before 'C' 9 | cout << 'A' + n.at(0) 'C' << endl; | ^~~~ | ;
s118876838
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string A,S,C; cin >> A >> S >> C; string a=A.at(0),c=C.at(0); char x = S.at(0); cout << a + x + c << endl; }
a.cc: In function 'int main()': a.cc:7:16: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 7 | string a=A.at(0),c=C.at(0); | ~~~~^~~ a.cc:7:26: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 7 | string a=A.at(0),c=C.at(0); | ~~~~^~~
s555339689
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string A,S,C; cin >> A >> S >> C; string a=A.at(0),c=C.at(0); char x = S.at(0); cout << A + x + C << endl; }
a.cc: In function 'int main()': a.cc:7:16: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 7 | string a=A.at(0),c=C.at(0); | ~~~~^~~ a.cc:7:26: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 7 | string a=A.at(0),c=C.at(0); | ~~~~^~~
s123896752
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; char x = S.at(1); cout << 'A' + x + 'C' << endl;
a.cc: In function 'int main()': a.cc:8:33: error: expected '}' at end of input 8 | cout << 'A' + x + 'C' << endl; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s375699969
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; char x = s.at(i) cout << 'A' << x << 'C' << endl; }
a.cc: In function 'int main()': a.cc:7:17: error: 'i' was not declared in this scope 7 | char x = s.at(i) | ^
s326664679
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; char x = s.at(i) cout << 'A' + x + 'C' << endl; }
a.cc: In function 'int main()': a.cc:7:17: error: 'i' was not declared in this scope 7 | char x = s.at(i) | ^
s927632216
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; char c; cin >> s; c = s.at(0); cout << A << c << C << endl; }
a.cc: In function 'int main()': a.cc:9:11: error: 'A' was not declared in this scope 9 | cout << A << c << C << endl; | ^ a.cc:9:21: error: 'C' was not declared in this scope 9 | cout << A << c << C << endl; | ^
s116746844
p03860
C++
#include<bits/stdc++.h> #include <math.h> using namespace std; #define rep(i,n) for(ll i=0;i<n;i++) #define repl(i,l,r) for(ll i=(l);i<(r);i++) #define per(i,n) for(ll i=n-1;i>=0;i--) #define lper(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define mp make_pair #define all(x) (x).begin(),(x).end() #define CST(x) cout<<fixed<<setprecision(x) using ll=long long; using vl=vector<ll>; using vvl=vector<vector<ll>>; using pl=pair<ll,ll>; const ll MOD=1000000007; const ll MOD9=998244353; const int inf=1e9; const ll INF=4e18; const ll dy[4]={1,0,-1,0}; const ll dx[4]={0,-1,0,1}; int main() { string A; string B; string C; cin >>A>>B>>C; cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; }
a.cc: In function 'int main()': a.cc:28:26: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}) 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ | | | | | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char} | std::basic_ostream<char> a.cc:28:26: note: candidate: 'operator>>(int, int)' (built-in) 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ a.cc:28:26: note: no known conversion for argument 1 from '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:28:17: note: cannot convert 'std::operator<< <char_traits<char> >((* & std::operator<< <char_traits<char> >(std::cout, ((int)A.std::__cxx11::basic_string<char>::at(0)))), ((int)B.std::__cxx11::basic_string<char>::at(0)))' (type 'std::basic_ostream<char>') to type 'std::byte' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ~~~~~~~~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = char&]': a.cc:28:34: required from here 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:28:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 28 | cout <<A.at(0)<<B.at(0)>>C.at(0)<< endl; | ^ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /u
s487546517
p03860
C++
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false); cin.tie(0); #define FOR(i,s,n) for(int i = s; i < (n); i++) #define REP(i,n) FOR(i,0,n) #define ALL(n) (n).begin(), (n).end() #define RALL(n) (n).rbegin(), (n).rend() #define ATYN(n) cout << ( (n) ? "Yes":"No") << '\n'; #define CFYN(n) cout << ( (n) ? "YES":"NO") << '\n'; #define OUT(n) cout << (n) << '\n'; using ll = long long; using ull = unsigned long long; using pii = pair<int,int>; using pll = pair<ll,ll>; int main(void) { IOS vector<string> s(3); REP(i,3) cin >> s[i]; OUT("A" + s[1][0] + "C") return 0; }
a.cc: In function 'int main()': a.cc:22:23: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 22 | OUT("A" + s[1][0] + "C") | ^ ~~~ | | | const char [2] a.cc:10:25: note: in definition of macro 'OUT' 10 | #define OUT(n) cout << (n) << '\n'; | ^
s126826341
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string x; cin>>x; cout<<"A"<<string.at(0)<<"C"<<endl; }
a.cc: In function 'int main()': a.cc:8:18: error: expected primary-expression before '.' token 8 | cout<<"A"<<string.at(0)<<"C"<<endl; | ^
s358040740
p03860
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a[1000],b[1000],c[1000]; cin >> a >> b >> c; cout << "A" << b[0] << "C"; return 0; if(a==b==c){ cout << 1; } else if(a==b||b==c||c==a){ cout << 2; } else{ cout << e; } }
a.cc: In function 'int main()': a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a==b==c){ | ~~~~^~~ a.cc:15:13: error: 'e' was not declared in this scope 15 | cout << e; | ^
s280075214
p03860
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a[1000],b[1000],c[1000]; cin >> a >> b >> c; cout << "A" << b[0] << "C"; return 0; if(a==b==c){ cout << 1; } else if(a==b||b==c||c==a){ cout << 2; } int e=3; else{ cout << e; } }
a.cc: In function 'int main()': a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a==b==c){ | ~~~~^~~ a.cc:15:3: error: 'else' without a previous 'if' 15 | else{ | ^~~~
s966592535
p03860
C++
#include <bits/stdc++.h> using namespace std; string a; int main() { scanf("AtCoder %s Contest",a); printf("A%cC",b[0]); return 0; }
a.cc: In function 'int main()': a.cc:7:19: error: 'b' was not declared in this scope 7 | printf("A%cC",b[0]); | ^
s759506330
p03860
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); String ans = "A" + String.valueOf(c.charAt(8)) + "C"; System.out.println(ans); } }
Main.java:7: error: cannot find symbol String ans = "A" + String.valueOf(c.charAt(8)) + "C"; ^ symbol: variable c location: class Main 1 error
s974199258
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s1,s2 s3; cin >> s2; char c = s2.at(0); cout << 'A' << c << 'C' << endl; }
a.cc: In function 'int main()': a.cc:5:16: error: expected initializer before 's3' 5 | string s1,s2 s3; | ^~ a.cc:6:10: error: 's2' was not declared in this scope; did you mean 's1'? 6 | cin >> s2; | ^~ | s1
s749316630
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; char c = s.at(0); cout << 'A' << c << 'C' }
a.cc: In function 'int main()': a.cc:9:26: error: expected ';' before '}' token 9 | cout << 'A' << c << 'C' | ^ | ; 10 | } | ~
s285256768
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string c ; cin >> c; cout << "A" + c.at(0) + "C" << endl; } // が母音であるとき、vowel と、そうでないとき consonant
a.cc: In function 'int main()': a.cc:8:31: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 8 | cout << "A" + c.at(0) + "C" << endl; | ~~~~~~~~~~~~~ ^ ~~~ | | | | const char* const char [2]
s166756658
p03860
Java
import java.util.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); String s = sc.nextLine(); sc.close(); String ans = "A"; sc = new Scanner(s); for(int i = 0; i < 2; ++i){ String tmp = sc.next(); } sc.close(); ans += tmp.charAt(0) + "C"; System.out.println(ans); } }
Main.java:15: error: cannot find symbol ans += tmp.charAt(0) + "C"; ^ symbol: variable tmp location: class Main 1 error
s864291954
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a >> b >> c ; cout << a[0] << b[0] << c[0] << endl; return[0] }
a.cc: In function 'int main()': a.cc:8:12: error: expected identifier before numeric constant 8 | return[0] | ^ a.cc: In lambda function: a.cc:9:1: error: expected '{' before '}' token 9 | } | ^ a.cc: In function 'int main()': a.cc:8:11: error: invalid user-defined conversion from 'main()::<lambda()>' to 'int' [-fpermissive] 8 | return[0] | ^~~ a.cc:8:11: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match) 8 | return[0] | ^ a.cc:8:11: note: no known conversion from 'void (*)()' to 'int' a.cc:8:14: error: expected ';' before '}' token 8 | return[0] | ^ | ; 9 | } | ~
s795196040
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; cout << a[0] << b[0] << c[0] << endl; return[0] }
a.cc: In function 'int main()': a.cc:7:12: error: expected identifier before numeric constant 7 | return[0] | ^ a.cc: In lambda function: a.cc:8:1: error: expected '{' before '}' token 8 | } | ^ a.cc: In function 'int main()': a.cc:7:11: error: invalid user-defined conversion from 'main()::<lambda()>' to 'int' [-fpermissive] 7 | return[0] | ^~~ a.cc:7:11: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match) 7 | return[0] | ^ a.cc:7:11: note: no known conversion from 'void (*)()' to 'int' a.cc:7:14: error: expected ';' before '}' token 7 | return[0] | ^ | ; 8 | } | ~
s266046027
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c, cout << a[0] << b[0] << c[0] << endl; }
a.cc: In function 'int main()': a.cc:6:10: error: expected initializer before '<<' token 6 | cout << a[0] << b[0] << c[0] << endl; | ^~
s574785671
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S ; cin >> S; cout << "Atcoder" << S.at(0); << "Contest" << endl; }
a.cc: In function 'int main()': a.cc:8:37: error: expected primary-expression before '<<' token 8 | cout << "Atcoder" << S.at(0); << "Contest" << endl; | ^~
s323838661
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S, s ; cin >> S; char s = S.at(0); cout << "Atcoder" << "s" << "Contest" << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: conflicting declaration 'char s' 8 | char s = S.at(0); | ^ a.cc:5:13: note: previous declaration as 'std::string s' 5 | string S, s ; | ^
s946495693
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S, s ; cin >> S; char s = S.at(0) cout << "Atcoder" << "s" << "Contest" << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: conflicting declaration 'char s' 8 | char s = S.at(0) | ^ a.cc:5:13: note: previous declaration as 'std::string s' 5 | string S, s ; | ^
s365508227
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S, s ; cin >> S; char s == S.at(0) cout << "Atcoder" << "s" << "Contest" << endl; }
a.cc: In function 'int main()': a.cc:8:11: error: expected initializer before '==' token 8 | char s == S.at(0) | ^~
s129311317
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S, s ; cin >> S; s == S.at(0) cout << "Atcoder" << "s" << "Contest" << endl; }
a.cc: In function 'int main()': a.cc:8:6: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}) 8 | s == S.at(0) | ~ ^~ ~~~~~~~ | | | | | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char} | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | s == S.at(0) | ^ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:8:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 8 | s == S.at(0) | ^ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | s == S.at(0) | ^ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:8:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 8 | s == S.at(0) | ^ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | s == S.at(0) | ^ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:8:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 8 | s == S.at(0) | ^ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | s == S.at(0) | ^ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 8 | s == S.at(0) | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 8 | s == S.at(0) | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | s == S.at(0) | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | s == S.at(0) | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | s == S.at(0) | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | s == S.at(0) | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, 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/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 8 | s == S.at(0) | ^ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 8 | s == S.at(0) | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/str
s960534120
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; s == S.at(0) cout << "Atcoder" << "s" << "Contest" << endl; }
a.cc: In function 'int main()': a.cc:8:4: error: 's' was not declared in this scope 8 | s == S.at(0) | ^
s091318725
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; string ans = a.at(0) + b.at(0) + c.at(0); cout << ans << endl; }
a.cc: In function 'int main()': a.cc:7:34: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 7 | string ans = a.at(0) + b.at(0) + c.at(0); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~
s998958017
p03860
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] strs = sc.nextLine();.split(" "); System.out.println("A" + strs[1].charAt(0) + "C"); } }
Main.java:5: error: illegal start of expression String[] strs = sc.nextLine();.split(" "); ^ 1 error
s026603918
p03860
C++
#include<bits/stdc++.h> #define int long long using namespace std; int main(){ int N,x; cin >> N >> x; vector<int> a(N); int loop; for(loop=0;loop<N;loop++){ cin >> a[loop]; } int ans=0,tmp; if(a[0]>x){ ans += a[0]-x; a[0]=x; } for(loop=1;loop<N;loop++){ if(a[loop-1]+a[loop]>x){ tmp = a[loop-1]+a[loop]-x; a[loop] -= tmp; ans += tmp; } } cout << ans << endl; return 0; }
cc1plus: error: '::main' must return 'int'
s623174195
p03860
C++
#include <bits/stdc++> using namespace std; int main() { string str; char c; cin >> str; c = str.at(8); cout << "A" << c << 'C' << endl; }
a.cc:1:10: fatal error: bits/stdc++: No such file or directory 1 | #include <bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s723926813
p03860
C++
#include <bits/stdc++> using namespace std; int main() { string str; char c; cin >> str; c = str.at(8); cout << "A" << c << 'C' << endl; }
a.cc:1:10: fatal error: bits/stdc++: No such file or directory 1 | #include <bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s119336847
p03860
C++
//{{{ #include <bits/stdc++.h> using namespace std; const string truename = "Yes"; const string falsename = "No"; struct IoSetup { IoSetup(){ cin.tie(nullptr); // ios::sync_with_stdio(false); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); }; } ioSetup; //{{{ rep rrep loop #define repX(a,b,c,d,x,...) x #define repN(a) repX a #define rep(...) repN((__VA_ARGS__,rep4,rep3,rep2,loop))(__VA_ARGS__) #define rrep(...) repN((__VA_ARGS__,rrep4,rrep3,rrep2))(__VA_ARGS__) #define loop(n) rep2(i_,n) #define rep2(i,n) rep3(i,0,n) #define rep3(i,begin,end) for(ll i=(ll)(begin),i##_end=(ll)(end);i<i##_end;++i) #define rep4(i,begin,end,step) for(ll i=(ll)(begin),i##_end=(ll)(end);i<i##_end;i+=step) #define rrep2(i,n) rrep3(i,0,n) #define rrep3(i,begin,end) for(ll i=(ll)(end-1),i##_end=(ll)(begin);i>=i##_end;--i) #define rrep4(i,begin,end,step) for(ll i=(ll)(end-1),i##_end=(ll)(begin);i>=i##_end;i-=step) //}}} #define each(x,a) for(auto&x:a) #define sz(x) ((ll)(x).size()) //{{{ Type using ull = unsigned long long; using ll = long long; using pii = pair<ll, ll>; using vp = vector<pii>; using vs = vector<string>; using vi = vector<ll>; using vvi = vector<vi>; #define v(T) vector<T> #define vv(T) v(v(T)) template<class T> vector<T> Vector(size_t a, T val){return vector<T>(a, val);} template<class... Tail> auto Vector(size_t a, Tail... tail){ return vector<decltype(Vector(tail...))>(a, Vector(tail...)); } //}}} //{{{ STL overload template<class T, class Compare>inline void sort(T&a, Compare comp) { sort(a.begin(), a.end(), comp); } template<class T> inline void sort(T&a) { sort(a.begin(), a.end()); } template<class T> inline void rsort(T&a) { sort(a.rbegin(), a.rend()); } template<class T> inline void reverse(T&a) { reverse(a.begin(), a.end()); } template<class T> inline bool next_permutation(T&a) { return next_permutation(a.begin(), a.end()); } template<class T, class U>inline bool binary_search(T&a, const U&v) { return binary_search(a.begin(), a.end(), v); } template<class T, class U>inline auto lower_bound(T&a, const U&v) { return lower_bound(a.begin(), a.end(), v); } template<class T, class U>inline auto upper_bound(T&a, const U&v) { return upper_bound(a.begin(), a.end(), v); } //}}} //{{{ Functions template<class T> inline T Sum(vector<T>&a){ return accumulate(a.begin(), a.end(), (T)0); } template<class T> inline T Max(vector<T>&a){ return *max_element(a.begin(), a.end()); } template<class T> inline T Min(vector<T>&a){ return *min_element(a.begin(), a.end()); } template<class T, class U> inline bool chmax(T&a, const U&b){ return (b > a) ? (a = b, true) : false; } template<class T, class U> inline bool chmin(T&a, const U&b){ return (b < a) ? (a = b, true) : false; } ll gcd(const ll a, const ll b){ return b ? gcd(b, a % b) : a; } ll lcm(const ll a, const ll b){ return a / gcd(a, b) * b; } ll ceil(const ll a, const ll b){ return (a + b - 1) / b; } ll popcount(ll a){ a -= ((a >> 1) & 0x5555555555555555LL); a = (a & 0x3333333333333333LL) + ((a >> 2) & 0x3333333333333333LL); a = (a + (a >> 4)) & 0x0f0f0f0f0f0f0f0fLL; a += (a >> 8); a += (a >> 16); a += (a >> 32); return a & 0x7f; } //}}} //{{{ in class in { int n, m; public: in() : n(0), m(0){} in(int n) : n(n), m(0){}; in(int n, int m) : n(n), m(m){}; template <class T> operator T() {assert(n==0); assert(m==0); T ret; cin >> ret; return ret; } template <class T> operator vector<T>() {assert(n>0); assert(m==0); vector<T> ret(n); for(ll i=0;i<(ll)n;++i) cin>>ret[i]; return ret; } template <class T> operator vector<vector<T>>() {assert(n>0); assert(m>0); vector<vector<T>> ret(n, vector<T>(m)); for(ll i=0;i<(ll)n;++i) for(ll j=0;j<(ll)m;++j) cin>>ret[i][j]; return ret; } }; //}}} //{{{ << overload template<class T,class U>ostream &operator<<(ostream &o,const pair<T,U>&j){o<<"{"<<j.first<<", "<<j.second<<"}";return o;} template<class T,class U>ostream &operator<<(ostream &o,const map<T,U>&j){o<<"{";for(auto t=j.begin();t!=j.end();++t)o<<(t!=j.begin()?", ":"")<<*t;o<<"}";return o;} template<class T>ostream &operator<<(ostream &o,const set<T>&j){o<<"{";for(auto t=j.begin();t!=j.end();++t)o<<(t!=j.begin()?", ":"")<<*t;o<<"}";return o;} template<class T>ostream &operator<<(ostream &o,const multiset<T>&j){o<<"{";for(auto t=j.begin();t!=j.end();++t)o<<(t!=j.begin()?", ":"")<<*t;o<<"}";return o;} template<class T>ostream &operator<<(ostream &o,const vector<T>&j){o<<"{";for(ll i=0;i<(ll)j.size();++i)o<<(i>0?", ":"")<<j[i];o<<"}";return o;} //}}} //{{{ print / out template<class T> int print(const T& a){ cout << a; return 0; } inline int out(bool f){ cout << (f ? truename : falsename) << '\n'; return 0; } inline int out(){ cout << '\n'; return 0; } template<class T> inline int out(const T& t){ print(t); cout << '\n'; return 0; } template<class Head, class... Tail> inline int out(const Head& head, const Tail&... tail){ print(head); cout << " "; out(tail...); return 0; } //}}} //{{{ debug_print / debug_out #ifdef LOCAL #if 1 // Colorize #include "console_color.hpp" #else #define setColor(...) #endif template<class T> int debug_print(const T& a){ cerr << a; return 0; } inline int debug_out(bool f){ cerr << (f ? truename : falsename) << '\n'; return 0; } inline int debug_out(){ cerr << '\n'; return 0; } template<class T> inline int debug_out(const T& t){ debug_print(t); cerr << '\n'; return 0; } template<class Head, class... Tail> inline int debug_out(const Head& head, const Tail&... tail){ debug_print(head); cerr << " "; debug_out(tail...); return 0; } #define debug(...) do{ setColor(COL_WHITE, COL_DARK_BLUE); cerr << "[L." << __LINE__ << "] " << #__VA_ARGS__ << ":"; setColor(); cerr << " "; debug_out(__VA_ARGS__); }while(0) #else #define debug_print(...) #define debug_out(...) #define debug(...) #endif //}}} //{{{ Modular template <std::int_fast64_t Mod> class Modular { using u64 = std::uint_fast64_t; public: u64 a; constexpr Modular(std::int_fast64_t x = 0) noexcept : a(x % Mod + (x < 0 ? Mod : 0)) {} constexpr u64 val() const noexcept { return a; } constexpr Modular operator+(const Modular rhs) const noexcept { return Modular(*this) += rhs; } constexpr Modular operator-(const Modular rhs) const noexcept { return Modular(*this) -= rhs; } constexpr Modular operator*(const Modular rhs) const noexcept { return Modular(*this) *= rhs; } constexpr Modular operator/(const Modular rhs) const noexcept { return Modular(*this) /= rhs; } constexpr bool operator==(const Modular rhs) const noexcept { return Modular(*this).val() == rhs.val(); } Modular &operator+=(const Modular rhs) noexcept { a += rhs.a; if (a >= Mod) a -= Mod; return *this; } Modular &operator-=(const Modular rhs) noexcept { if (a < rhs.a) a += Mod; a -= rhs.a; return *this; } Modular &operator++() noexcept { return *this += 1; } Modular &operator--() noexcept { return *this -= 1; } Modular &operator*=(const Modular rhs) noexcept { a = a * rhs.a % Mod; return *this; } Modular &operator/=(Modular rhs) noexcept { u64 exp = Mod - 2; while(exp){ if(exp % 2) *this *= rhs; rhs *= rhs; exp /= 2; } return *this; } Modular pow(u64 t) const { if(!t) return 1; Modular<Mod> a = pow(t>>1); a *= a; if(t&1) a *= *this; return a; } }; template <std::int_fast64_t Mod> ostream& operator<<(ostream& os, const Modular<Mod>& m){ return os << m.a; } //}}} const double pi=acos(-1); const double eps = 1e-9; const ll inf = 1001001001; const ll mod=(ll)1e9+7; using mint = Modular<mod>; //}}} int main(){ string a; a = in(); a = in(); string ans = "ABC"; ans[1] = a[0]; out(ans); }
a.cc: In function 'int main()': a.cc:161:10: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'in') 161 | a = in(); | ^ 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:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 817 | operator=(const basic_string& __str) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 828 | operator=(const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 840 | operator=(_CharT __c) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 858 | operator=(basic_string&& __str) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:926:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 926 | operator=(initializer_list<_CharT> __l) | ^~~~~~~~ a.cc:162:10: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'in') 162 | a = in(); | ^ /usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 817 | operator=(const basic_string& __str) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 828 | operator=(const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 840 | operator=(_CharT __c) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 858 | operator=(basic_string&& __str) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:926:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 926 | operator=(initializer_list<_CharT> __l) | ^~~~~~~~
s691647259
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s;cin>>"Atcoder"<<s<<"Contest"; cout<<"A"<<(char)toupper(s[0])<<"C"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:15: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'const char [8]') 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ~~~^~~~~~~~~~~ | | | | | const char [8] | 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:5:17: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'const char*' 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ^~~~~~~~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:5:17: error: invalid conversion from 'const char*' to 'short int' [-fpermissive] 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ^~~~~~~~~ | | | const char* a.cc:5:17: error: cannot bind rvalue '(short int)((const char*)"Atcoder")' to 'short int&' /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:5:17: error: invalid conversion from 'const char*' to 'short unsigned int' [-fpermissive] 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ^~~~~~~~~ | | | const char* a.cc:5:17: error: cannot bind rvalue '(short unsigned int)((const char*)"Atcoder")' to 'short unsigned int&' /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:5:17: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ^~~~~~~~~ | | | const char* a.cc:5:17: error: cannot bind rvalue '(int)((const char*)"Atcoder")' to 'int&' /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:5:17: error: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive] 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ^~~~~~~~~ | | | const char* a.cc:5:17: error: cannot bind rvalue '(unsigned int)((const char*)"Atcoder")' to 'unsigned int&' /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:5:17: error: invalid conversion from 'const char*' to 'long int' [-fpermissive] 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ^~~~~~~~~ | | | const char* a.cc:5:17: error: cannot bind rvalue '(long int)((const char*)"Atcoder")' to 'long int&' /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:5:17: error: invalid conversion from 'const char*' to 'long unsigned int' [-fpermissive] 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ^~~~~~~~~ | | | const char* a.cc:5:17: error: cannot bind rvalue '(long unsigned int)((const char*)"Atcoder")' to 'long unsigned int&' /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:5:17: error: invalid conversion from 'const char*' to 'long long int' [-fpermissive] 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ^~~~~~~~~ | | | const char* a.cc:5:17: error: cannot bind rvalue '(long long int)((const char*)"Atcoder")' to 'long long int&' /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:5:17: error: invalid conversion from 'const char*' to 'long long unsigned int' [-fpermissive] 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ^~~~~~~~~ | | | const char* a.cc:5:17: error: cannot bind rvalue '(long long unsigned int)((const char*)"Atcoder")' to 'long long unsigned int&' /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:5:17: error: invalid conversion from 'const void*' to 'void*' [-fpermissive] 5 | string s;cin>>"Atcoder"<<s<<"Contest"; | ^~~~~~~~~ | | | const void* a.cc:5:17: error: cannot bind rvalue '(void*)((const void*)((const char*)"Atcoder"))' to 'void*&' /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'const char [8]' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'const char [8]' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'const char [8]' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'const char [8]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122
s932245390
p03860
C++
#pragma gcc optimize("Ofast") #include <bits/stdc++.h> using namespace std; using ll = long long; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(V) (V).begin(),(V).end() #define SORT(V) sort(ALL(V)) //小さい方からソート #define REV(V) reverse(ALL(V)) //リバース #define RSORT(V) SORT(V);REV(V) //大きい方からソート #define NPN(V) next_permutation(ALL(V)) //順列 #define pb(n) push_back(n) #define endl '\n' #define Endl '\n' #define DUMP(x) cout << #x << " = " << (x) << endl #define YES(n) cout << ((n) ? "YES" : "NO" ) << endl #define Yes(n) cout << ((n) ? "Yes" : "No" ) << endl #define Yay(n) cout << ((n) ? "Yay!": ":(") << endl #define RAPID cin.tie(0);ios::sync_with_stdio(false) #define IN(n) cin >> n #define IN2(a,b) cin >> a >> b #define IN3(a,b,c) cin >> a >> b >> c #define IN4(a,b,c,d) cin >> a >> b >> c >> d #define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);} #define OUT(n) cout << n << endl #define VOUT(V) REP(i, (V).size()) {cout << (V)[i] << endl;} #define VOUT2(V) REP(i, (V).size()) {cout << (V)[i] << " ";} cout<<endl; // 型マクロ定義 #define int long long #define P pair<ll,ll> #define Vi vector<ll> #define Vd vector<double> #define Vs vector<string> #define Vc vector<char> #define M map<ll,ll> #define S set<ll> #define PQ priority_queue<ll> #define PQG priority_queue<ll,V,greater<ll> // const int MOD = 1000000007; const int INF = 1061109567; const double EPS = 1e-10; const double PI = acos(-1.0); int gcd(int a,int b){return b?gcd(b,a%b):a;} //最小公倍数 string toStrUp(string str){char diff = 'A'-'a';REP(i,str.size()) str[i] += diff;return str;} string gCh(string str, int key){return str.substr(key,1);} signed main() { RAPID; // デフォルト変数定義 int n,m,a,b,c,d,x,y,z; string s,t; // // ここから IN3(x,y,z); OUT("A"+gCh(y,0)+"C"); }
a.cc: In function 'int main()': a.cc:62:15: error: could not convert 'y' from 'long long int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'} 62 | OUT("A"+gCh(y,0)+"C"); | ^ | | | long long int a.cc:27:24: note: in definition of macro 'OUT' 27 | #define OUT(n) cout << n << endl | ^
s751980566
p03860
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String a = sc.next().substring(0,1); String s = sc.next().substring(0,1); String c = sc.next().substring(0,1); System.out.println(a + x + c); } }
Main.java:11: error: cannot find symbol System.out.println(a + x + c); ^ symbol: variable x location: class Main 1 error
s222367250
p03860
C++
#include <bits/stdc++.h> using namespace std; int main () { string a, b, c; cin >> a >> b >> c; cout << "A" << b.t(0) << "C" << endl; }
a.cc: In function 'int main()': a.cc:8:22: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 't'; did you mean 'at'? 8 | cout << "A" << b.t(0) << "C" << endl; | ^ | at
s378506540
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a>>b>>c; cout<<a.at(0)<<b.at(0)<<c.at(0)<<endl; }
a.cc: In function 'int main()': a.cc:10:17: error: request for member 'at' in 'a', which is of non-class type 'int' 10 | cout<<a.at(0)<<b.at(0)<<c.at(0)<<endl; | ^~ a.cc:10:26: error: request for member 'at' in 'b', which is of non-class type 'int' 10 | cout<<a.at(0)<<b.at(0)<<c.at(0)<<endl; | ^~ a.cc:10:35: error: request for member 'at' in 'c', which is of non-class type 'int' 10 | cout<<a.at(0)<<b.at(0)<<c.at(0)<<endl; | ^~
s829017031
p03860
C
#include <stdio.h> int main(void){ char Su[120],bin[255]; scanf("&s%s&s",Su[],Su[],bin[]); printf("A%sC",Su[8]); return 0; }
main.c: In function 'main': main.c:4:27: error: expected expression before ']' token 4 | scanf("&s%s&s",Su[],Su[],bin[]); | ^
s215499789
p03860
C
#include<stdio.h> int main(void){ int a,b,x,i; scanf("%d %d %d",&a,&b,&x); i = (b - a) / x printf("%d",i); return 0; }
main.c: In function 'main': main.c:5:18: error: expected ';' before 'printf' 5 | i = (b - a) / x | ^ | ; 6 | printf("%d",i); | ~~~~~~
s110211579
p03860
C++
#include<bits/stdc++.h> using namespace std; int main() { string a, b, c; cin>>a>>b>>>c; cout<<a[0]<<b[0]<<c[0]<<"\n"; return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: expected primary-expression before '>' token 7 | cin>>a>>b>>>c; | ^
s969815229
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a,s; int b; cin >> a ; for(int i = 0;i < i.size();i++){ if (b){ s=a.at(i); break; } if(a.at(i) == ' ') b=1; } cout << "A" << s << "C" << endl; }
a.cc: In function 'int main()': a.cc:8:21: error: request for member 'size' in 'i', which is of non-class type 'int' 8 | for(int i = 0;i < i.size();i++){ | ^~~~
s769279149
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a,s; int b; cin >> a ; for(int i = 0;i < i.size();i++){ if (b){ s=a.at(i); break; } if(a.at(i) == ' ') b=1; } cout >> "A" >> s >> "C" >> endl; }
a.cc: In function 'int main()': a.cc:8:21: error: request for member 'size' in 'i', which is of non-class type 'int' 8 | for(int i = 0;i < i.size();i++){ | ^~~~ a.cc:16:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]') 16 | cout >> "A" >> s >> "C" >> endl; | ~~~~ ^~ ~~~ | | | | | const char [2] | std::ostream {aka std::basic_ostream<char>} 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:16:1: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[2]]': a.cc:16:9: required from here 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:16:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 16 | cout >> "A" >> s >> "C" >> endl; | ^~~ /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/substi
s146001734
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string >>a>>b>>c>>; cin>>a>>b>>c>>; cout >>a[0]>>b[0]>>c[0]>>endl; }
a.cc: In function 'int main()': a.cc:5:8: error: expected unqualified-id before '>>' token 5 | string >>a>>b>>c>>; | ^~ a.cc:6:6: error: 'a' was not declared in this scope 6 | cin>>a>>b>>c>>; | ^ a.cc:6:9: error: 'b' was not declared in this scope 6 | cin>>a>>b>>c>>; | ^ a.cc:6:12: error: 'c' was not declared in this scope 6 | cin>>a>>b>>c>>; | ^ a.cc:6:15: error: expected primary-expression before ';' token 6 | cin>>a>>b>>c>>; | ^
s476103180
p03860
C++
#include<iostream> using namespace std; int main(){ string S; char c; cin >> S; /*for('A'>S[0] || 'Z'<S[0]){ cin >>S; if('A'<S[0] && 'Z'>S[0])break; } */ cout <<"AtCoder "<< S << " Contest"<<endl; c = S.at(0); cout <<'A' << <<'C' <<endl; }
a.cc: In function 'int main()': a.cc:18:24: error: expected primary-expression before '<<' token 18 | cout <<'A' << <<'C' <<endl; | ^~
s885924020
p03860
C++
#include<iostream> using namespace std; int main(){ string S; for('A'>S[0] || 'Z'<S[0]){ cin >>S; if('A'<S[0] && 'Z'>S[0])break; } cout <<"AtCoder "<< S << " Contest"<<endl; cout <<'A' << S.at(0) <<'C' <<endl; }
a.cc: In function 'int main()': a.cc:7:33: error: expected ';' before ')' token 7 | for('A'>S[0] || 'Z'<S[0]){ | ^ | ; a.cc:14:43: error: expected ')' before ';' token 14 | cout <<'A' << S.at(0) <<'C' <<endl; | ^ | ) a.cc:7:12: note: to match this '(' 7 | for('A'>S[0] || 'Z'<S[0]){ | ^
s811701368
p03860
C++
#include<iostream> using namespace std; int main(){ string S; /*for('A'>S[0] || 'Z'<S[0]){ cin >>S; if('A'<S[0] && 'Z'>S[0])break; } */ cout <<"AtCoder %s Contest",S <<endl; cout <<"A%cC",S.at(0) <<endl; }
a.cc: In function 'int main()': a.cc:12:39: error: no match for 'operator<<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>') 12 | cout <<"AtCoder %s Contest",S <<endl; | ~~^~~~~~ 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/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/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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef: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:12:41: note: couldn't deduce template parameter '_IntegerType' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ 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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: a.cc:12:41: note: couldn't deduce template parameter '_Tp' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ a.cc:14:31: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and '<unresolved overloaded function type>' to binary
s129788878
p03860
C++
#include<iostream> using namespace std; int main(){ string S; for('A'>S[0] || 'Z'<S[0]){ cin >>S; if('A'<S[0] && 'Z'>S[0])break; } cout <<"AtCoder %s Contest",S <<endl; cout <<"A%cC",S.at(0) <<endl; }
a.cc: In function 'int main()': a.cc:7:33: error: expected ';' before ')' token 7 | for('A'>S[0] || 'Z'<S[0]){ | ^ | ; a.cc:12:39: error: no match for 'operator<<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>') 12 | cout <<"AtCoder %s Contest",S <<endl; | ~~^~~~~~ 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/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/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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef: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:12:41: note: couldn't deduce template parameter '_IntegerType' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ 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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: a.cc:12:41: note: couldn't deduce template parameter '_Tp' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ a.cc
s379420555
p03860
C++
#include<iostream> using namespace std; int main(){ string S; for('A'>S[0] || 'Z'<S[0]){ cin >>S; if('A'<S[0] && 'Z'>S[0])break; } cout <<"AtCoder %s Contest",S <<endl; cout <<"A%cC",S.at(0) <<endl; }
a.cc: In function 'int main()': a.cc:7:33: error: expected ';' before ')' token 7 | for('A'>S[0] || 'Z'<S[0]){ | ^ | ; a.cc:12:39: error: no match for 'operator<<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>') 12 | cout <<"AtCoder %s Contest",S <<endl; | ~~^~~~~~ 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/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/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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef: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:12:41: note: couldn't deduce template parameter '_IntegerType' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ 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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: a.cc:12:41: note: couldn't deduce template parameter '_Tp' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ a.cc
s923039586
p03860
C++
#include<iostream> using namespace std; int main(){ string S; /*for('A'>S[0] || 'Z'<S[0]){ cin >>s2; if('A'<S[0] && 'Z'>S[0])break; } */ cout <<"AtCoder %s Contest",S <<endl; cout <<"A%cC",S.at(0) <<endl; }
a.cc: In function 'int main()': a.cc:12:39: error: no match for 'operator<<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>') 12 | cout <<"AtCoder %s Contest",S <<endl; | ~~^~~~~~ 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/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/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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef: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:12:41: note: couldn't deduce template parameter '_IntegerType' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ 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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: a.cc:12:41: note: couldn't deduce template parameter '_Tp' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ a.cc:14:31: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and '<unresolved overloaded function type>' to binary
s351080097
p03860
C++
#include<iostream> using namespace std; int main(){ string S; for('A'>S[0] || 'Z'<S[0]){ cin >>s2; if('A'<S[0] && 'Z'>S[0])break; } cout <<"AtCoder %s Contest",S <<endl; cout <<"A%cC",S.at(0) <<endl; }
a.cc: In function 'int main()': a.cc:7:33: error: expected ';' before ')' token 7 | for('A'>S[0] || 'Z'<S[0]){ | ^ | ; a.cc:12:39: error: no match for 'operator<<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>') 12 | cout <<"AtCoder %s Contest",S <<endl; | ~~^~~~~~ 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/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/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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef: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:12:41: note: couldn't deduce template parameter '_IntegerType' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ 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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /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:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:12:41: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: a.cc:12:41: note: couldn't deduce template parameter '_Tp' 12 | cout <<"AtCoder %s Contest",S <<endl; | ^~~~ a.cc
s226214371
p03860
C++
#include<iostream> using namespace std; int main(){ string S for('A'>S[0] || 'Z'<S[0]){ cin >>s2; if('A'<S[0] && 'Z'>S[0])break; } cout <<"AtCoder %s Contest",S <<endl; cout <<"A%cC",S.at(0) <<endl; }
a.cc: In function 'int main()': a.cc:7:9: error: expected initializer before 'for' 7 | for('A'>S[0] || 'Z'<S[0]){ | ^~~ a.cc:12:37: error: 'S' was not declared in this scope 12 | cout <<"AtCoder %s Contest",S <<endl; | ^
s875095002
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c, x; cin >> a >> b >> c; x = "aaa" x.at(0) = a.at(0); x.at(1) = b.at(0); x.at(2) = c.at(0); cout << x << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: expected ';' before 'x' 8 | x = "aaa" | ^ | ; 9 | x.at(0) = a.at(0); | ~
s115655192
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; char x, y, z; cin >> a >> b >> c; x = a.at(0); y = b.at(0); z = c.at cout << x + y + z << endl; }
a.cc: In function 'int main()': a.cc:11:9: error: cannot resolve overloaded function 'at' based on conversion to type 'char' 11 | z = c.at | ^~
s011854801
p03860
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ char c; scanf("%*s %c",&d); printf("A%cC\n",c); return 0; }
a.cc: In function 'int main()': a.cc:8:33: error: 'd' was not declared in this scope 8 | char c; scanf("%*s %c",&d); | ^
s642418888
p03860
C++
#include<bits/stdc++.h> using namespace std; int main(){ string r,s,t; cin >> r >> s >> t; cout >> 'A' >> s.at(0) >> 'C' >> endl; }
a.cc: In function 'int main()': a.cc:6:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'char') 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ~~~~ ^~ ~~~ | | | | | char | std::ostream {aka std::basic_ostream<char>} a.cc:6:8: note: candidate: 'operator>>(int, int)' (built-in) 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ~~~~~^~~~~~ a.cc:6:8: 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:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = char]': a.cc:6:11: required from here 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:6:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~ /usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_is
s623723955
p03860
C++
#includd<bits/stdc++.h> using namespace std; int main(){ string r,s,t; cin >> r >> s >> t; cout >> 'A' >> s.at(0) >> 'C' >> endl; }
a.cc:1:2: error: invalid preprocessing directive #includd; did you mean #include? 1 | #includd<bits/stdc++.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:4:3: error: 'string' was not declared in this scope 4 | string r,s,t; | ^~~~~~ a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' +++ |+#include <string> 1 | #includd<bits/stdc++.h> a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> r >> s >> t; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #includd<bits/stdc++.h> a.cc:5:10: error: 'r' was not declared in this scope 5 | cin >> r >> s >> t; | ^ a.cc:5:15: error: 's' was not declared in this scope 5 | cin >> r >> s >> t; | ^ a.cc:5:20: error: 't' was not declared in this scope 5 | cin >> r >> s >> t; | ^ a.cc:6:3: error: 'cout' was not declared in this scope 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~~ a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:6:36: error: 'endl' was not declared in this scope 6 | cout >> 'A' >> s.at(0) >> 'C' >> endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #includd<bits/stdc++.h>
s868778741
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; cout << "A" + S.at(8) + "C" << endl; }
a.cc: In function 'int main()': a.cc:7:25: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 7 | cout << "A" + S.at(8) + "C" << endl; | ~~~~~~~~~~~~~ ^ ~~~ | | | | const char* const char [2]
s197738688
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; cout << "A" + S.at(8) + C << endl; }
a.cc: In function 'int main()': a.cc:7:27: error: 'C' was not declared in this scope 7 | cout << "A" + S.at(8) + C << endl; | ^
s362237510
p03860
C++
#include"bits/stdc++.h" #include<boost/multi_array.hpp> #include<boost/optional.hpp> #include<boost/range/irange.hpp> #include<boost/range/algorithm.hpp> #include<boost/range/adaptors.hpp> using namespace std; namespace adaptor = boost::adaptors; #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++) #define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--) typedef long long ll; void Main(){ string s1,s2,s3; cin >> s1 >>s2 >>;s3 cout << "A" << s2[0] << "C" << endl; return; } int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); cout << fixed << setprecision(15); Main(); return 0; }
a.cc:2:9: fatal error: boost/multi_array.hpp: No such file or directory 2 | #include<boost/multi_array.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s885097036
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b, c; cin >> a >> b >> c; cout << a.at(0) + b.at(0) + c.at(0) << endl }
a.cc: In function 'int main()': a.cc:7:46: error: expected ';' before '}' token 7 | cout << a.at(0) + b.at(0) + c.at(0) << endl | ^ | ; 8 | } | ~
s269393446
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string ; char c = str.at(0); cout << str + c << endl; // HelloH }
a.cc: In function 'int main()': a.cc:5:3: error: declaration does not declare anything [-fpermissive] 5 | string ; | ^~~~~~ a.cc:7:12: error: 'str' was not declared in this scope; did you mean 'std'? 7 | char c = str.at(0); | ^~~ | std
s874714588
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a,x,c; cin >> a >> x >> c; cout << ‘A’ + x.at(0) + ‘C’ << endl; }
a.cc:8:11: error: extended character ‘ is not valid in an identifier 8 | cout << ‘A’ + x.at(0) + ‘C’ << endl; | ^ a.cc:8:11: error: extended character ’ is not valid in an identifier a.cc:8:27: error: extended character ‘ is not valid in an identifier 8 | cout << ‘A’ + x.at(0) + ‘C’ << endl; | ^ a.cc:8:27: error: extended character ’ is not valid in an identifier a.cc: In function 'int main()': a.cc:8:11: error: '\U00002018A\U00002019' was not declared in this scope 8 | cout << ‘A’ + x.at(0) + ‘C’ << endl; | ^~~ a.cc:8:27: error: '\U00002018C\U00002019' was not declared in this scope 8 | cout << ‘A’ + x.at(0) + ‘C’ << endl; | ^~~
s626800649
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin >> S>> S; cout << “A“ << S.at(0)<< “C”<< endl; }
a.cc:7:9: error: extended character “ is not valid in an identifier 7 | cout << “A“ << S.at(0)<< “C”<< endl; | ^ a.cc:7:9: error: extended character “ is not valid in an identifier a.cc:7:26: error: extended character “ is not valid in an identifier 7 | cout << “A“ << S.at(0)<< “C”<< endl; | ^ a.cc:7:26: error: extended character ” is not valid in an identifier a.cc: In function 'int main()': a.cc:7:9: error: '\U0000201cA\U0000201c' was not declared in this scope 7 | cout << “A“ << S.at(0)<< “C”<< endl; | ^~~ a.cc:7:26: error: '\U0000201cC\U0000201d' was not declared in this scope 7 | cout << “A“ << S.at(0)<< “C”<< endl; | ^~~
s294215273
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s>> s; cout << “A“ << s.at(0)<< “C”<< endl; }
a.cc:7:9: error: extended character “ is not valid in an identifier 7 | cout << “A“ << s.at(0)<< “C”<< endl; | ^ a.cc:7:9: error: extended character “ is not valid in an identifier a.cc:7:26: error: extended character “ is not valid in an identifier 7 | cout << “A“ << s.at(0)<< “C”<< endl; | ^ a.cc:7:26: error: extended character ” is not valid in an identifier a.cc: In function 'int main()': a.cc:7:9: error: '\U0000201cA\U0000201c' was not declared in this scope 7 | cout << “A“ << s.at(0)<< “C”<< endl; | ^~~ a.cc:7:26: error: '\U0000201cC\U0000201d' was not declared in this scope 7 | cout << “A“ << s.at(0)<< “C”<< endl; | ^~~
s648663264
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s>> s; cout << “A“ << s.at(0)<< “ C”<< endl; }
a.cc:7:9: error: extended character “ is not valid in an identifier 7 | cout << “A“ << s.at(0)<< “ C”<< endl; | ^ a.cc:7:9: error: extended character “ is not valid in an identifier a.cc:7:26: error: extended character “ is not valid in an identifier 7 | cout << “A“ << s.at(0)<< “ C”<< endl; | ^ a.cc:7:28: error: extended character ” is not valid in an identifier 7 | cout << “A“ << s.at(0)<< “ C”<< endl; | ^ a.cc: In function 'int main()': a.cc:7:9: error: '\U0000201cA\U0000201c' was not declared in this scope 7 | cout << “A“ << s.at(0)<< “ C”<< endl; | ^~~ a.cc:7:26: error: '\U0000201c' was not declared in this scope 7 | cout << “A“ << s.at(0)<< “ C”<< endl; | ^
s960594904
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a; char s; cin >> a >> s; cout << A << s << C; }
a.cc: In function 'int main()': a.cc:9:11: error: 'A' was not declared in this scope 9 | cout << A << s << C; | ^ a.cc:9:21: error: 'C' was not declared in this scope 9 | cout << A << s << C; | ^
s293624072
p03860
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String s=sc.next(); char[] c=s.tocharArray(); System.out.println("A"+c[9]+"C"); } }
Main.java:7: error: cannot find symbol char[] c=s.tocharArray(); ^ symbol: method tocharArray() location: variable s of type String 1 error
s499886624
p03860
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String[] s=sc.next(); char[] c=s.tocharArray(); System.out.println("A"+c[9]+"C"); } }
Main.java:6: error: incompatible types: String cannot be converted to String[] String[] s=sc.next(); ^ Main.java:7: error: cannot find symbol char[] c=s.tocharArray(); ^ symbol: method tocharArray() location: variable s of type String[] 2 errors
s474825830
p03860
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String[] s=sc.next().split(" "); char[] c=s[1].tocharArray(); System.out.println("A"+c[1]+"C"); } }
Main.java:7: error: cannot find symbol char[] c=s[1].tocharArray(); ^ symbol: method tocharArray() location: class String 1 error
s779158679
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a,b,c; cin>>a>>b>>c; cout<<a.at(0)<<b.at(0)<<c.at(0)<< }
a.cc: In function 'int main()': a.cc:9:1: error: expected primary-expression before '}' token 9 | } | ^
s774987241
p03860
Java
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String[] s=sc.next().split(" "); s[1]=s[1].replaceAll("a-z","A-Z"); char[] answer={s[0].charAt(0),s[1].charAt(1),s.charAt(2)}; String ans=String.valueOf(answer); System.out.println(ans); } }
Main.java:8: error: cannot find symbol char[] answer={s[0].charAt(0),s[1].charAt(1),s.charAt(2)}; ^ symbol: method charAt(int) location: variable s of type String[] 1 error
s764733067
p03860
Java
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String[] s=sc.next().split(" "); s[1]=s[1].replaceAll("a-z","A-Z"); String ans=s[0].charAt(0)+s[1].charAt(1)+s.charAt(2); System.out.println(ans); } }
Main.java:8: error: cannot find symbol String ans=s[0].charAt(0)+s[1].charAt(1)+s.charAt(2); ^ symbol: method charAt(int) location: variable s of type String[] 1 error
s895139641
p03860
C++
#include<cstdio> #include<iostream> using namespace std; long long a[100005]; int main() { long long n,x,t; while(~scanf("%lld%lld",&n,&x)) { long long sum = 0; a[0] = 0; for(int i = 1; i <= n; i++) { scanf("%lld",&a[i]); if(a[i] + a[i-1] > x) { t = a[i] + a[i-1] - x; / / the number of the difference from the previous value sum += t; //Statistics to the sum a[i] -= t; / / Change the original value, so that the next number is judged } } printf("%lld\n",sum); } return 0; }
a.cc: In function 'int main()': a.cc:21:43: error: expected primary-expression before '/' token 21 | t = a[i] + a[i-1] - x; / / the number of the difference from the previous value | ^ a.cc:21:45: error: expected primary-expression before '/' token 21 | t = a[i] + a[i-1] - x; / / the number of the difference from the previous value | ^ a.cc:21:47: error: 'the' was not declared in this scope 21 | t = a[i] + a[i-1] - x; / / the number of the difference from the previous value | ^~~ a.cc:23:30: error: expected primary-expression before '/' token 23 | a[i] -= t; / / Change the original value, so that the next number is judged | ^ a.cc:23:32: error: expected primary-expression before '/' token 23 | a[i] -= t; / / Change the original value, so that the next number is judged | ^ a.cc:23:34: error: 'Change' was not declared in this scope 23 | a[i] -= t; / / Change the original value, so that the next number is judged | ^~~~~~
s592836809
p03860
C++
#include<cstdio> #include<iostream> using namespace std; long long a[100005]; int main() { long long n,x,t; while(~scanf("%lld%lld",&n,&x)) { long long sum = 0; a[0] = 0; for(int i = 1; i <= n; i++) { scanf("%lld",&a[i]); if(a[i] + a[i-1] > x) { t = a[i] + a[i-1] - x; / / the number of the difference from the previous value sum += t; //Statistics to the sum a[i] -= t; / / Change the original value, so that the next number is judged } } printf("%lld\n",sum); } return 0; }
a.cc: In function 'int main()': a.cc:21:43: error: expected primary-expression before '/' token 21 | t = a[i] + a[i-1] - x; / / the number of the difference from the previous value | ^ a.cc:21:45: error: expected primary-expression before '/' token 21 | t = a[i] + a[i-1] - x; / / the number of the difference from the previous value | ^ a.cc:21:47: error: 'the' was not declared in this scope 21 | t = a[i] + a[i-1] - x; / / the number of the difference from the previous value | ^~~ a.cc:23:30: error: expected primary-expression before '/' token 23 | a[i] -= t; / / Change the original value, so that the next number is judged | ^ a.cc:23:32: error: expected primary-expression before '/' token 23 | a[i] -= t; / / Change the original value, so that the next number is judged | ^ a.cc:23:34: error: 'Change' was not declared in this scope 23 | a[i] -= t; / / Change the original value, so that the next number is judged | ^~~~~~
s045910003
p03860
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b,c; cin >> a >> b >> c; string ans == ""; ans += a.at(0); ans += b.at(0); ans += c.at(0); cout << ans << endl; }
a.cc: In function 'int main()': a.cc:7:14: error: expected initializer before '==' token 7 | string ans == ""; | ^~ a.cc:8:3: error: 'ans' was not declared in this scope; did you mean 'abs'? 8 | ans += a.at(0); | ^~~ | abs
s765099802
p03860
C++
#include <stdio.h> #include <string.h> int main () { char str[101]; gets (str); printf("A%cC", str[0]); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets (str); | ^~~~ | getw
s867380968
p03860
C++
#include <stdio.h> int main () { char str[101]; gets (str); printf("A%cC", str[0]); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets (str); | ^~~~ | getw
s892246530
p03860
C++
#include <stdio.h> #include <cmath> #include <cstring> int main(){ char s[135]={0}; gets(s); printf("A%cC", s[8]); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw
s578130577
p03860
C++
#include <stdio.h> #include <cmath> #include <cstring> int main(){ char s[135]={0}; gets(s); printf("A%cC", s[8]); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw
s269408178
p03860
C++
#include <stdio.h> #include <cmath> int main(){ char s[135]={0}; gets(s); printf("A%cC", s[8]); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(s); | ^~~~ | getw
s077082763
p03860
C
#include <stdio.h> #include <cmath> int main(){ char s[135]={0}; gets(s); printf("A%cC", s[8]); return 0; }
main.c:2:10: fatal error: cmath: No such file or directory 2 | #include <cmath> | ^~~~~~~ compilation terminated.
s954935360
p03860
C++
#include <stdio.h> #include <cmath> int main(){ char s[135]={0}; gets(s); printf("A%cC", s[8]); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(s); | ^~~~ | getw
s521429379
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; string res = "A"; getline(cin, s); for(uint i = 7; i < s.size(); i++) { if(s.at(i) >= 'A' && s.at(i) <= 'Z') { res += s.at(i); res += "C" break; } } cout << res << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:17: error: expected ';' before 'break' 14 | res += "C" | ^ | ; 15 | break; | ~~~~~
s829813246
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int a,b,x; cin >> a >> b >> x; if((b-a+1)>x){ long long int ans = (b-a)/x; if(a%x==0&&b%x==0) ans++; cout << ans << endl;} else if((b-a+1)=x) cout << 1 << endl;) else{if(a/x==b/x)cout << 1 << endl; else cout << 0 << endl; } }
a.cc: In function 'int main()': a.cc:11:23: error: lvalue required as left operand of assignment 11 | else if((b-a+1)=x) cout << 1 << endl;) | ~~~~^~~ a.cc:11:48: error: expected primary-expression before ')' token 11 | else if((b-a+1)=x) cout << 1 << endl;) | ^
s766896214
p03860
C++
#include <stdio.h> #include <cstring> int main(){ char x[]={0}; gets(x); ptintf("A%sC", x[9]); return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(x); | ^~~~ | getw a.cc:6:5: error: 'ptintf' was not declared in this scope; did you mean 'printf'? 6 | ptintf("A%sC", x[9]); | ^~~~~~ | printf
s033735865
p03860
C++
#include<bits/stdc++.h> using namespace std; #define ll long long // long long省略 #define pb push_back // push_back省略 #define mp make_pair // make_pair省略 #define fi first // first省略 #define se second // second省略 #define itn int // int誤字保険 #define count cout // cout誤字保険 #define vecotr vector // vector誤字保険 #define ednl endl // endl誤字保険 #define opt() cin.tie(0); ios::sync_with_stdio(false) // 入出力速度改善 #define rep(i,l,r) for(ll i=(l);i<(r);i++) // 範囲[l, r)で刻み1のfor文(順方向) #define repp(i,l,r,k) for(ll i=(l);i<(r);i+=(k)) // 範囲[l, r)で刻みkのfor文(順方向) #define rrep(i,l,r) for(ll i=(r-1);i>=(l);i--) // 範囲[l, r)で刻み1のfor文(逆方向) #define rrepp(i,l,r,k) for(ll i=(r-1);i>=(l);i-=(k)) // 範囲[l, r)で刻みkのfor文(逆方向) #define all(x) (x).begin(), (x).end() // vectorのポインタ位置指定用 #define max(p,q)((p)>(q)?(p):(q)) // max拡張 #define min(p,q)((p)<(q)?(p):(q)) // min拡張 #define bit(n,m)(((n)>>(m))&1) // 変数nのm番目のbitを取り出す 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; } int dy[]={0, 1, 0, -1}; // 4方向近傍 int dx[]={1, 0, -1, 0}; // 4方向近傍 int main(){ stirng a,b,c;cin>>a>>b>>c; cout<<"A"<<b[0]<<"C"<<endl; }
a.cc: In function 'int main()': a.cc:30:5: error: 'stirng' was not declared in this scope 30 | stirng a,b,c;cin>>a>>b>>c; | ^~~~~~ a.cc:30:23: error: 'a' was not declared in this scope 30 | stirng a,b,c;cin>>a>>b>>c; | ^ a.cc:30:26: error: 'b' was not declared in this scope; did you mean 'pb'? 30 | stirng a,b,c;cin>>a>>b>>c; | ^ | pb a.cc:30:29: error: 'c' was not declared in this scope 30 | stirng a,b,c;cin>>a>>b>>c; | ^
s068799154
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; char x; x = a.at(7); string A, C cout << A + x + C << endl; }
a.cc: In function 'int main()': a.cc:10:3: error: expected initializer before 'cout' 10 | cout << A + x + C << endl; | ^~~~
s968137547
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; char x; x = a.at(7); cout << A + x + C << endl; }
a.cc: In function 'int main()': a.cc:9:11: error: 'A' was not declared in this scope 9 | cout << A + x + C << endl; | ^ a.cc:9:19: error: 'C' was not declared in this scope 9 | cout << A + x + C << endl; | ^
s027813102
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; x = a.at(7); cout << A + x + C << endl; }
a.cc: In function 'int main()': a.cc:7:3: error: 'x' was not declared in this scope 7 | x = a.at(7); | ^ a.cc:8:11: error: 'A' was not declared in this scope 8 | cout << A + x + C << endl; | ^ a.cc:8:19: error: 'C' was not declared in this scope 8 | cout << A + x + C << endl; | ^
s916518951
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { str a; cin >> a; x = a.at(7); cout << A + x + C << endl; }
a.cc: In function 'int main()': a.cc:5:3: error: 'str' was not declared in this scope; did you mean 'std'? 5 | str a; | ^~~ | std a.cc:6:10: error: 'a' was not declared in this scope 6 | cin >> a; | ^ a.cc:7:3: error: 'x' was not declared in this scope 7 | x = a.at(7); | ^ a.cc:8:11: error: 'A' was not declared in this scope 8 | cout << A + x + C << endl; | ^ a.cc:8:19: error: 'C' was not declared in this scope 8 | cout << A + x + C << endl; | ^
s253532108
p03860
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) int main(){ string s; cin>>s; cout<<'A'<<s[0]<<'C' return 0; }
a.cc: In function 'int main()': a.cc:7:25: error: expected ';' before 'return' 7 | cout<<'A'<<s[0]<<'C' | ^ | ; 8 | return 0; | ~~~~~~
s842400413
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string C; cin >> C; char c = C.at(8); cout << "A" + c + "C" <<endl; }
a.cc: In function 'int main()': a.cc:10:19: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 10 | cout << "A" + c + "C" <<endl; | ~~~~~~~ ^ ~~~ | | | | | const char [2] | const char*
s354232355
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string C; cin >> C; char c = C.at(9); cout << "A" + c + "C" <<endl; }
a.cc: In function 'int main()': a.cc:10:19: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 10 | cout << "A" + c + "C" <<endl; | ~~~~~~~ ^ ~~~ | | | | | const char [2] | const char*