submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s967231648 | p03759 | C++ | #include "bits\stdc++.h"
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c;
if (b - a == c - b)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include "bits\stdc++.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s471119338 | p03759 | C++ | #include<iostream>
using namespace std;
int main()
{
long long a,b,c;
cin>>a>>b>>c;
if(b-a==c-b)
cout<<"YES"<<endl;
else
cout<<"NO"
return 0;
} | a.cc: In function 'int main()':
a.cc:10:11: error: expected ';' before 'return'
10 | cout<<"NO"
| ^
| ;
11 | return 0;
| ~~~~~~
|
s840459934 | p03760 | C++ | #include <bits/stdc++.h>
#defint int long long
using namespace std;
int main() {
int A, B;
cin >> A >> B;
if (A > B) {cout << "GREATER" << endl;}
else if (A < B) {cout << "LESS" << endl;}
else {cout << "EQUAL" << endl;}
} | a.cc:2:2: error: invalid preprocessing directive #defint; did you mean #define?
2 | #defint int long long
| ^~~~~~
| define
|
s456783856 | p03760 | C++ | atcoderbeginnercontest
atcoderregularcontest | a.cc:1:1: error: 'atcoderbeginnercontest' does not name a type
1 | atcoderbeginnercontest
| ^~~~~~~~~~~~~~~~~~~~~~
|
s073311306 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s,t;
cin >> s >> t;
for(int i=0;i<t.size();++i)
{
cout << s.at(i) << t.at(i);
}
if(t.size<s.size()) cout << s.at(s.size()-1);
return 0;} | a.cc: In function 'int main()':
a.cc:11:8: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
11 | if(t.size<s.size()) cout << s.at(s.size()-1);
| ~~^~~~
| ()
|
s064506886 | p03760 | C++ | #include<stdio.h>
using namespace std;
int main()
{
string s,t;
cin >> s >> t;
for(int i=0;i<t.size();++i)
{
cout << s.at(i) << t.at(i);
}
if(t.size<s.size()) cout << s.at(s.size()-1);
return 0;} | a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
5 | string s,t;
| ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
1 | #include<stdio.h>
+++ |+#include <string>
2 | using namespace std;
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> s >> t;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<stdio.h>
+++ |+#include <iostream>
2 | using namespace std;
a.cc:6:10: error: 's' was not declared in this scope
6 | cin >> s >> t;
| ^
a.cc:6:15: error: 't' was not declared in this scope
6 | cin >> s >> t;
| ^
a.cc:9:3: error: 'cout' was not declared in this scope
9 | cout << s.at(i) << t.at(i);
| ^~~~
a.cc:9:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:23: error: 'cout' was not declared in this scope
11 | if(t.size<s.size()) cout << s.at(s.size()-1);
| ^~~~
a.cc:11:23: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s605987845 | p03760 | C++ | #include<stdio.h>
using namespace std;
int main()
{
string s,t;
cin >> s >> t;
for(i=0;i<t.size();++i)
{
cout << s.at(i) << t.at(i);
}
if(t.size<s.size()) cout << s.at(s.size()-1);
return 0;} | a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
5 | string s,t;
| ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
1 | #include<stdio.h>
+++ |+#include <string>
2 | using namespace std;
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> s >> t;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<stdio.h>
+++ |+#include <iostream>
2 | using namespace std;
a.cc:6:10: error: 's' was not declared in this scope
6 | cin >> s >> t;
| ^
a.cc:6:15: error: 't' was not declared in this scope
6 | cin >> s >> t;
| ^
a.cc:7:7: error: 'i' was not declared in this scope
7 | for(i=0;i<t.size();++i)
| ^
a.cc:9:3: error: 'cout' was not declared in this scope
9 | cout << s.at(i) << t.at(i);
| ^~~~
a.cc:9:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:23: error: 'cout' was not declared in this scope
11 | if(t.size<s.size()) cout << s.at(s.size()-1);
| ^~~~
a.cc:11:23: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s217868098 | p03760 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(v) v.begin(),v.end()
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int INF=1e9;
const int di[] = {-1,0,1,0};
const int dj[] = {0,-1,0,1};
int main() {
string o,e;
cin>>o>>e;
string ans;
if(o.length()-e.length()==0){
rep(i,o.length()){
ans+=o[i];
ans+=e[i];
}
if(o.length()-e.length()==1){
rep(i,o.length()-1){
ans+=o[i];
ans+=e[i];
}
ans+=o[o.length()-1];
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
28 | }
| ^
a.cc:11:12: note: to match this '{'
11 | int main() {
| ^
|
s710480976 | p03760 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(v) v.begin(),v.end()
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int INF=1e9;
const int di[] = {-1,0,1,0};
const int dj[] = {0,-1,0,1};
int main() {
string o,e;
cin>>o>>e;
string ans;
if(o.length()-e.length()==0){
rep(i,o.length()){
ans+=o[i];
ans+=e[i];
}
if(o.length()-e.length()==1){
rep(i,o.length()-1){
ans+=o[i];
ans+=e[i];
}
ans+=o[o.length()-1];
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
28 | }
| ^
a.cc:11:12: note: to match this '{'
11 | int main() {
| ^
|
s664888443 | p03760 | C++ | #include <bits/stdc++.h>
#define arep(a,i,n) for(ll i=(a);i<(n);i++)
#define rep(i,n) for(ll i=0;i<(n);i++)
#define cinf(x,n) for(ll i=0;i<(n);i++)cin>>x[i];
#define coutf(x,n) for(ll i=0;i<(n);i++)cout<<x[i]<<endl;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using namespace std;
int main(){
string o,e;
cin >> o;
cin >> e;
if(o.length()==e.length()){
rep(i,o.length()){
cout<<o[i]<<e[i];
}
cout << endl;
}else{
rep(i,e.length()){
cout<<o[i]<<e[i];
}
cout<<o[o.length()-1]<<endla;
}
} | a.cc: In function 'int main()':
a.cc:25:40: error: 'endla' was not declared in this scope
25 | cout<<o[o.length()-1]<<endla;
| ^~~~~
|
s469239632 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string o,e;
cin>>o;
cin>>e;
string ans="";//コノジテンデハ、ハイレツノオオキサハ0デアル
int ln=o.size()+e.size();
//ans.resize(ln);
for(int i=0;i<ln;i++){
if(i%2==0) ans.push_back(i)=o.at(i/2);
if(i%2==1) ans.push_back(i)=e.at(i/2);
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:11:33: error: invalid use of 'void'
11 | if(i%2==0) ans.push_back(i)=o.at(i/2);
| ~~~~~~~~~~~~~^~~
a.cc:12:33: error: invalid use of 'void'
12 | if(i%2==1) ans.push_back(i)=e.at(i/2);
| ~~~~~~~~~~~~~^~~
|
s231277133 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b;
cin >> a >> b;
for ( int i=0 ; i< b.size() ; i++){
cout << a.at(i) << b.at(i) ;
}
if ( a.size() > b.size()){
cout << a.at(a.size()-1) ;
}
cout << endl;
}
| a.cc:7:9: error: extended character is not valid in an identifier
7 | for ( int i=0 ; i< b.size() ; i++){
| ^
a.cc: In function 'int main()':
a.cc:7:9: error: '\U00003000int' was not declared in this scope
7 | for ( int i=0 ; i< b.size() ; i++){
| ^~~~~
a.cc:7:21: error: 'i' was not declared in this scope
7 | for ( int i=0 ; i< b.size() ; i++){
| ^
|
s912082757 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s,t;
cin >> s >> t;
if(s.size() > t.size()){
for(int i = 0; i < t.size(); i++){
cou << s[i] << t[i];
}
cout << s[s.size() - 1] << endl;
return 0;
}else{
for(int i = 0; i < t.size(); i++){
cout << s[i] << t[i];
}
cout << endl;
return 0;
}
} | a.cc: In function 'int main()':
a.cc:9:7: error: 'cou' was not declared in this scope; did you mean 'cos'?
9 | cou << s[i] << t[i];
| ^~~
| cos
|
s562150010 | p03760 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
string s,t;cin>>s>>t;
int m = s.size();
int n = t.size();
rep(i,m){
cout<<s[i]
if(i<n)cout<<t[i];
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:15: error: expected ';' before 'if'
11 | cout<<s[i]
| ^
| ;
12 | if(i<n)cout<<t[i];
| ~~
|
s845748247 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S,N;
cin >> S >> N;
for(int i = 0;i < 50;i++){
cout << S[i] << N[i];
}
| a.cc: In function 'int main()':
a.cc:9:2: error: expected '}' at end of input
9 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s120906657 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
bool comp(pair<long long int,long long int>a,pair<long long int,long long int>b)
{
if(a.first==b.first)
{
if(a.second<=b.second)
return true;
else
return false;
}
if(a.first>b.first)
return true;
else return false;
}
long long int gcd(long long int bdda,long long int chota)
{
if(chota==0)
return bdda;
return gcd(chota,bdda%chota);
}
void solve()
{
string s,t;
cin>>s>>t;
for(int i=0;i<s.size();i++)cout<<s[i]<<t[i]''
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
t=1;
//cin>>t;
while(t--)
{
solve();
}
}
| a.cc:26:48: error: empty character constant
26 | for(int i=0;i<s.size();i++)cout<<s[i]<<t[i]''
| ^~
a.cc: In function 'void solve()':
a.cc:26:48: error: expected ';' before '\x0'
26 | for(int i=0;i<s.size();i++)cout<<s[i]<<t[i]''
| ^~
| ;
|
s077566863 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
int k=a.size(),l=b.size();
string s="";
if(k>=l){
for(int i=0;i<k-1;i++){
s+=k[i]+l[i];
}
s +=a[k-1];
cout << s <<endl;
}
else{
for(int i=0;i<k-1;i++){
s+=l[i]+k[i];
}
s +=b[k-1];
cout << s <<endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:7: error: invalid types 'int[int]' for array subscript
11 | s+=k[i]+l[i];
| ^
a.cc:11:12: error: invalid types 'int[int]' for array subscript
11 | s+=k[i]+l[i];
| ^
a.cc:18:7: error: invalid types 'int[int]' for array subscript
18 | s+=l[i]+k[i];
| ^
a.cc:18:12: error: invalid types 'int[int]' for array subscript
18 | s+=l[i]+k[i];
| ^
|
s199345184 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
int k=a.size(),l=b.size();
string s;
if(k>=l){
for(int i=0;i<k-1;i++){
s+=k[i]+l[i];
}
s +=a[k-1];
cout << s <<endl;
}
else{
for(int i=0;i<k-1;i++){
s+=l[i]+k[i];
}
s +=b[k-1];
cout << s <<endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:7: error: invalid types 'int[int]' for array subscript
11 | s+=k[i]+l[i];
| ^
a.cc:11:12: error: invalid types 'int[int]' for array subscript
11 | s+=k[i]+l[i];
| ^
a.cc:18:7: error: invalid types 'int[int]' for array subscript
18 | s+=l[i]+k[i];
| ^
a.cc:18:12: error: invalid types 'int[int]' for array subscript
18 | s+=l[i]+k[i];
| ^
|
s066270638 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
int k=a.size(),l=b.size();
string s;
if(k>=l){
for(int i=0;i<k-1;i++){
s+=k[i]+l[i];
}
s +=a[k-1];
cout << s <<endl;
}
else(l>k){
for(int i=0;i<k-1;i++){
s+=l[i]+k[i];
}
s +=b[k-1];
cout << s <<endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:7: error: invalid types 'int[int]' for array subscript
11 | s+=k[i]+l[i];
| ^
a.cc:11:12: error: invalid types 'int[int]' for array subscript
11 | s+=k[i]+l[i];
| ^
a.cc:16:12: error: expected ';' before '{' token
16 | else(l>k){
| ^
| ;
|
s551710323 | p03760 | C++ | #include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
using namespace std;
#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int main(){
string S,T;
cin>>S>>T;
vector<char> X(S.size()+T.size());
for(int i=0;i<S.size();i++) X.at(2*i)=S[i];
for(int i=0;i<T.size();i++) X.at(2*i+1)=T[i];
cout<<X;
return 0;} | a.cc: In function 'int main()':
a.cc:54:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
54 | cout<<X;
| ~~~~^~~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::vector<char>' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::vector<char>' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::vector<char>' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::vector<char>' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::vector<char>' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::vector<char>' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::vector<char>' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::vector<char>' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]'
306 | operator<<(nullptr_t)
| ^~~~~~~~
/usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::nullptr_t'
306 | operator<<(nullptr_t)
| ^~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:124:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type |
s609436712 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a,b,i;
cin>>a>>b;
if(a.size()==b.size())
{
for(i=0; i<a.size(); i++)
{
cout<<a[i]<<b[i];
}
}
else
if(a.size()>b.size())
{
for(i=0; i<b.size(); i++)
{
cout<<a[i]<<b[i];
}
cout<<a[i];
}
else
{
for(i=0; i<a.size(); i++)
{
cout<<a[i]<<b[i];
}
cout<<b[i];
}
}
| a.cc: In function 'int main()':
a.cc:9:11: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
9 | for(i=0; i<a.size(); i++)
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h: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)
| ^~~~~~~~
a.cc:9:15: error: no match for 'operator<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
9 | for(i=0; i<a.size(); i++)
| ~^~~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::size_type {aka long unsigned int}
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
9 | for(i=0; i<a.size(); i++)
| ^
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
9 | for(i=0; i<a.size(); i++)
| ^
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
9 | for(i=0; i<a.size(); i++)
| ^
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
9 | for(i=0; i<a.size(); i++)
| ^
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
9 | for(i=0; i<a.size(); i++)
| ^
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
9 | for(i=0; i<a.size(); i++)
| ^
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
9 | for(i=0; i<a.size(); i++)
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
9 | for(i=0; i<a.size(); i++)
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
9 | for(i=0; i<a.size(); i++)
| ^
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
9 | for(i=0; i<a.size(); i++)
| ^
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
9 | for(i=0; i<a.size(); i++)
| ^
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:9:23: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
9 | for(i=0; i<a.size(); i++)
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | opera |
s905467388 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S; string T;
cin>>S>>T;
int L=S.size(); int R=T.size();
if(S.size()==T.size()){
for(int i=0; i<L; i++){
cout<<S.at(i)<<T<<at(i);
}
}
else{
for(int i=0; i<R; i++){
cout<<S.at(i)<<T.at(i);
}
cout<<S.at(S.size()-1);
}
}
| a.cc: In function 'int main()':
a.cc:9:23: error: 'at' was not declared in this scope
9 | cout<<S.at(i)<<T<<at(i);
| ^~
|
s714492645 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S; string T;
cin>>S>>T;
if(S.size()==T.size()){
for(int i=0; i<S.size(); i++){
cout<<S.at(i)<<T<<at(i);
}
}
else{
for(int i=0; i<T.size(); i++){
cout<<S.at(i)<<T.at(i);
}
cout<<S.at(S.size()-1);
}
}
| a.cc: In function 'int main()':
a.cc:8:23: error: 'at' was not declared in this scope
8 | cout<<S.at(i)<<T<<at(i);
| ^~
|
s869272152 | p03760 | C++ | #include<bits/stdc+;.h>
using namespace std;
int main(){
string S; string T;
cin>>S>>T;
if(S.size()==T.size()){
for(int i=0; i<S.size(); i++){
cout<<S.at(i)<<T<<at(i);
}
}
else{
for(int i=0; i<T.size(); i++){
cout<<S.at(i)<<T.at(i);
}
cout<<S.at(S.size()-1);
}
} | a.cc:1:9: fatal error: bits/stdc+;.h: No such file or directory
1 | #include<bits/stdc+;.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s458382416 | p03760 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;
int main()
{
string s, t;
cin >> s >> t;
string ans = "";
rep(i, t.size()) {
ans += s[i];
ans += t[i];
}
if(s.size() > t.size()) an s+= s[s.size() - 1];
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:17:27: error: 'an' was not declared in this scope; did you mean 'ans'?
17 | if(s.size() > t.size()) an s+= s[s.size() - 1];
| ^~
| ans
|
s504430495 | p03760 | C++ | s=input()
t=input()
k=[]
for i in range(len(t)):
k.append(s[i])
k.append(t[i])
if len(s)>len(t):
t.append(s[len(s)-1])
print(k)
| a.cc:1:1: error: 's' does not name a type
1 | s=input()
| ^
|
s402780962 | p03760 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
#define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
#define rrep(i,j,n) for(ll i = (ll)(j); i < (ll)(n); i++)
#define mrep(i,n) for (ll i = (ll)(n); i > 0; i--)
#define be(v) (v).begin(), (v).end()
#define dcout cout << fixed << setprecision(20)
ll INF = 1LL << 60;
ll mod = 1e9 + 7;
int main() {
string a,b;
cin >> a >> b;
if(a.size()==b.size()){
rep(i,a.size()) {
cout << a[i] << b[i];
}
}
else {
rep(i,b.sise()) {
cout << a[i] << b[i];
}
cout << a[a.size()-1];
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:23:25: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sise'; did you mean 'size'?
23 | rep(i,b.sise()) {
| ^~~~
a.cc:6:42: note: in definition of macro 'rep'
6 | #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
| ^
|
s104874447 | p03760 | C | #include<stdio.h>
#include<string.h>
int main(){
char s[50],t[50];
scanf("%s%s",s,t);
for(int i=0;i<strlen(s);i++){
printf("%c%c",s[i],t[i]);
}
| main.c: In function 'main':
main.c:8:3: error: expected declaration or statement at end of input
8 | }
| ^
|
s177674213 | p03760 | C | #include<stdio.h>
#include<string.h>
int main(){
char s[50],t[50];
scanf("%s%s",s,t);
for(int i=0;i<strlen(s);i++){
printf("%s%s",s[i],t[i]);
}
| main.c: In function 'main':
main.c:8:3: error: expected declaration or statement at end of input
8 | }
| ^
|
s231335181 | p03760 | C | #include<stdio.h>
#include<string.h>
int main(){
char s[50],t[50];
scanf("%s%s",s,t);
for(int i=0;i<strlen(a);i++){
printf("%s%s",s[i],t[i]);
} | main.c: In function 'main':
main.c:6:24: error: 'a' undeclared (first use in this function)
6 | for(int i=0;i<strlen(a);i++){
| ^
main.c:6:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:3: error: expected declaration or statement at end of input
8 | }
| ^
|
s034580156 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O,E,P,S;
cin>>O>>E;
S=0+E;
int N=S.size();
for(int i=0;i<N;i++){
if (i % 2 == 0){
P = P + O.at(i/2);
} else{
P = P + E.at(i/2);
}
}
cout<<P<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:6: error: no match for 'operator+' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
7 | S=0+E;
| ~^~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| int
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)'
627 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
7 | S=0+E;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)'
1798 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
7 | S=0+E;
| ^
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:
/usr/include/c++/14/bits/basic_string.h:3598:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3598 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3598:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3616:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3616 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3616:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'const _CharT*' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3635:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3635 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3635:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: deduced conflicting types for parameter '_CharT' ('int' and 'char')
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3652:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3652 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3652:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3670:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
3670 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3670:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3682:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3682 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3682:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3689:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3689 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3689:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3696:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3696 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3696:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3719:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3719 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3719:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'const _CharT*' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3726:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3726 | operator+(_CharT __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3726:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: deduced conflicting types for parameter '_CharT' ('int' and 'char')
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3733:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const _CharT*)'
3733 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3733:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/bits/basic_string.h:3740:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, _CharT)'
3740 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3740:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
7 | S=0+E;
| ^
In file included from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/complex:340:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator+(const complex<_Tp>&, const complex<_Tp>&)'
340 | operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:340:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'const std::complex<_Tp>' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/complex:349:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator+(const complex<_Tp>&, const _Tp&)'
349 | operator+(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:349:5: note: template argument deduction/substitution failed:
a.cc:7:7: note: mismatched types 'const std::complex<_Tp>' and 'int'
7 | S=0+E;
| ^
/usr/include/c++/14/complex:358:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator+(const _Tp&, const complex<_Tp>&)'
358 | operator+(const _Tp& __x, const complex<_Tp>& __y)
| |
s741481541 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
striing s, t;
cin >> s >> t;
if(s.size() > t.size()){
for(int i = 0; i < t.size();++i){
cout << s.at(i) << t.at(i);
}
cout << s.at(s.size()-1) << endl;
} else if(s.size() < t.size()){
for(int i = 0; i < s.size(); ++i){
cout << s.at(i) << t.at(i);
}
cout << t.at(t.size()) << endl;
} else {
for(int i = 0; i < s.size(); ++i){
cout << s.at(i) << t.at(i);
}
cout << endl;
}
}
| a.cc: In function 'int main()':
a.cc:5:3: error: 'striing' was not declared in this scope
5 | striing s, t;
| ^~~~~~~
a.cc:6:10: error: 's' was not declared in this scope
6 | cin >> s >> t;
| ^
a.cc:6:15: error: 't' was not declared in this scope; did you mean 'tm'?
6 | cin >> s >> t;
| ^
| tm
|
s282007641 | p03760 | C | #include<stdio.h>
int main()
{
char o[55],e[55];
scanf("%s%s",o,e);
for(i=0;o[i];i++){
putchar(o[i]);
if(e[i])
putchar(e[i]);
}
return 0;
} | main.c: In function 'main':
main.c:8:13: error: 'i' undeclared (first use in this function)
8 | for(i=0;o[i];i++){
| ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
|
s308964898 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O,E;
cin >> O >> E;
reverse(O.begin(),O.end());
reverse(E.begin(),E.end());
for (int i = 1; !O.empty() || E.empty(); i++) {
if (i%2) {
cout << O.back();
O.pop_back();'
} else {
cout << E.back();
E.pop_back();
}
}
} | a.cc:11:20: warning: missing terminating ' character
11 | O.pop_back();'
| ^
a.cc:11:20: error: missing terminating ' character
|
s214929479 | p03760 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
char[] o=sc.next().toCharArray(),e=sc.next().toCharArray();
String s="";
for(int i=0;i<o.length;i++){
if(i=e.length){
s+=o[i];
}else{
s+=o[i];
s+=e[i];
}
}
System.out.println(s);
}
}
| Main.java:10: error: incompatible types: int cannot be converted to boolean
if(i=e.length){
^
1 error
|
s135229750 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,E;cin>>O>>E;
for(int i=0;i<O.size();i++){
cout << O.at(i)<<(i<E.size()?E.at(i):"");
}
cout<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:33: error: operands to '?:' have different types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char*'
6 | cout << O.at(i)<<(i<E.size()?E.at(i):"");
| ~~~~~~~~~~^~~~~~~~~~~
|
s590393411 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,E;cin>>O>>E;
for(int i=0;i<O.size();i++){
cout << O.at(i)<<(i<E.size()?E.at(i):'');
}
cout<<endl;
} | a.cc:6:42: error: empty character constant
6 | cout << O.at(i)<<(i<E.size()?E.at(i):'');
| ^~
|
s834556056 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,E;cin>>O>>E;
for(int i=0;i<O.size();i++){
cout << O.at(i)<<(i<E.size()?E.at(i):endl;);
}
} | a.cc: In function 'int main()':
a.cc:6:42: error: overloaded function with no contextual type information
6 | cout << O.at(i)<<(i<E.size()?E.at(i):endl;);
| ^~~~
a.cc:6:46: error: expected ')' before ';' token
6 | cout << O.at(i)<<(i<E.size()?E.at(i):endl;);
| ~ ^
| )
a.cc:6:47: error: expected primary-expression before ')' token
6 | cout << O.at(i)<<(i<E.size()?E.at(i):endl;);
| ^
|
s062800044 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,E;cin>>O>>E;
for(int i=0;i<O.size();i++){
cout << O.at(i)<<(i<E.size()?E.at(i):endl);
}
}
| a.cc: In function 'int main()':
a.cc:6:42: error: overloaded function with no contextual type information
6 | cout << O.at(i)<<(i<E.size()?E.at(i):endl);
| ^~~~
|
s876535040 | p03760 | C++ | #include <bits.stdc++.h>
using namespace std;
int main(){
string O,E;cin>>O>>E;
for(int i=0;i<O.size();i++){
cout << O.at(i)<<(i<E.size()?E.at(i):endl);
}
} | a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory
1 | #include <bits.stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s398385355 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string o;
string e;
cin >> o >> e;
string s;
for(int i=0; i<e.size.(); i++){
s += o.at(i);
s += e.at(i);
}
if(o.size() != e.size()){
s += o.at(o.size()-1);
}
cout << s << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
10 | for(int i=0; i<e.size.(); i++){
| ~~^~~~
| ()
|
s218649682 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string o;
string e;
cin >> o >> e;
string s;
for(int i=0; i<e.size.(); i++){
s += o.at(i);
s += e.at(i);
}
if(o.size() != e.size()){
s += o.at(o.size()-1)
}
cout << s << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
10 | for(int i=0; i<e.size.(); i++){
| ~~^~~~
| ()
a.cc:16:26: error: expected ';' before '}' token
16 | s += o.at(o.size()-1)
| ^
| ;
17 | }
| ~
|
s287491495 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s,t;
cin>>s>>t;
for(int i=0;i<s.size();i++){
cout<<s[i];
if(i<t.size()){
cout<<t[i];
}
}
| a.cc: In function 'int main()':
a.cc:12:4: error: expected '}' at end of input
12 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s991899312 | p03760 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string o, e;
string ans = "";
cin >> o >> e;
for(int i = 0; i < min(o.size(), e.size()); i++)
{
ans = o[i] + e[i] + ans;
}
if(o.size() > e.size())
ans = ans + o[o.size() - 1];
else
if(o.size() < e.size())
ans = ans + e[e.size() - 1];
cout << ans;
} | a.cc: In function 'int main()':
a.cc:11:23: error: no match for 'operator+' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
11 | ans = o[i] + e[i] + ans;
| ^ ~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)'
627 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)'
1798 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
11 | ans = o[i] + e[i] + ans;
| ^~~
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:3598:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3598 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3598:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3616:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3616 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3616:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: mismatched types 'const _CharT*' and 'int'
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3635:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3635 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3635:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: deduced conflicting types for parameter '_CharT' ('int' and 'char')
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3652:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3652 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3652:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3670:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
3670 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3670:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3682:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3682 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3682:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3689:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3689 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3689:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3696:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3696 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3696:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3719:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3719 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3719:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: mismatched types 'const _CharT*' and 'int'
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3726:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3726 | operator+(_CharT __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3726:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: deduced conflicting types for parameter '_CharT' ('int' and 'char')
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3733:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const _CharT*)'
3733 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3733:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
11 | ans = o[i] + e[i] + ans;
| ^~~
/usr/include/c++/14/bits/basic_string.h:3740:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, _CharT)'
3740 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3740:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
11 | ans = o[i] + e[i] + ans;
| ^~~
|
s681639271 | p03760 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string o, e;
cin >> o >> e;
for(int i = 0; i < min(o.size(), e.size()); i++)
{
ans = o[i] + e[i] + ans;
}
if(o.size() > e.size())
ans = ans + o[o.size() - 1];
else
if(o.size() < e.size())
ans = ans + e[e.size() - 1];
cout << ans;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
10 | ans = o[i] + e[i] + ans;
| ^~~
| abs
a.cc:13:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
13 | ans = ans + o[o.size() - 1];
| ^~~
| abs
a.cc:16:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
16 | ans = ans + e[e.size() - 1];
| ^~~
| abs
a.cc:17:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
17 | cout << ans;
| ^~~
| abs
|
s209467029 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O,E;
cin >> O >> E;
for (int i=0; i<O.size()+E.size(); i++) {
if (i%==0) cout << O.at(i/2);
else cout << E.at(i/2);
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:8:14: error: expected primary-expression before '=' token
8 | if (i%==0) cout << O.at(i/2);
| ^
|
s905822591 | p03760 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
int main() {
string O,E; cin>>O>>E;
for(int i=0;;i++){
if(O.size()==E.size()){
cout << O[i] << E[i];
if(i >= O.size()-1){
cout << endl;
break;
}
}
else{
cout << O[i] << E[i];
if(i >= E.size()-1){
cout << O[i+1] << endl;
break;
}
}
}
| a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:7:12: note: to match this '{'
7 | int main() {
| ^
|
s631585858 | p03760 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
int main() {
string O,E; cin>>O>>E;
for(int i=0;;i++){
if(O.size()==E.size()){
cout << O[i] << E[i];
if(i >= O.size()-1){
cout << endl;
break;
}
}
else{
cout << O[i] << E[i];
if(i >= E.size()-1){
cout << O[i+] << endl;
break;
}
}
}
| a.cc: In function 'int main()':
a.cc:20:21: error: expected primary-expression before ']' token
20 | cout << O[i+] << endl;
| ^
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:7:12: note: to match this '{'
7 | int main() {
| ^
|
s504759404 | p03760 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
int k = 0;
string O, E, s = "";
string p[100];
cin >> O >> E;
if(O.size() >= E.size())
{
a = O.size();
b = E.size();
}
else
{
a = E.size();
b = O.size();
}
for(int i = 1; i <= 2 * a; i++)
{
if(i % 2 == 1)
p[i - 1] = O[k];
k++;
cout << p[i] << " ";
}
cout << endl;
k = 0;
for(int i = 1; i <= 2 * a; i++)
{
if(i % 2 == 0)
p[i - 1] = E[k];
k++;
}
for(int i = 1; i <= 2 * a; i++)
{
s = s + p[i - 1];
}
for(int i = a; i <= b; i++)
{
p[i] = max()
}
cout << s;
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:9: error: 'a' was not declared in this scope
13 | a = O.size();
| ^
a.cc:14:9: error: 'b' was not declared in this scope
14 | b = E.size();
| ^
a.cc:18:9: error: 'a' was not declared in this scope
18 | a = E.size();
| ^
a.cc:19:9: error: 'b' was not declared in this scope
19 | b = O.size();
| ^
a.cc:21:29: error: 'a' was not declared in this scope
21 | for(int i = 1; i <= 2 * a; i++)
| ^
a.cc:31:29: error: 'a' was not declared in this scope
31 | for(int i = 1; i <= 2 * a; i++)
| ^
a.cc:37:29: error: 'a' was not declared in this scope
37 | for(int i = 1; i <= 2 * a; i++)
| ^
a.cc:41:17: error: 'a' was not declared in this scope
41 | for(int i = a; i <= b; i++)
| ^
a.cc:41:25: error: 'b' was not declared in this scope
41 | for(int i = a; i <= b; i++)
| ^
a.cc:43:19: error: no matching function for call to 'max()'
43 | p[i] = max()
| ~~~^~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 0 provided
|
s377034004 | p03760 | C++ | #include<bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main(){
string O, E;
cin >>O >> E;
rep(i, E.size()){
cout << O[i] << E[i];
}
if(O.size() > E.size()){
cout << O[O.size()-1];
}
cout << endl;
}
}
| a.cc:26:1: error: expected declaration before '}' token
26 | }
| ^
|
s867734924 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O, E;
cin>>O>>E;
int Z=O.size()+E.size();
for(int i=0; i<Z; i++){
if(i%2==0) cout<<O.at(i/2);
else(i%2==1) cout<<E.at((i-1)/2);
}
}
| a.cc: In function 'int main()':
a.cc:10:17: error: expected ';' before 'cout'
10 | else(i%2==1) cout<<E.at((i-1)/2);
| ^~~~~
| ;
|
s554282511 | p03760 | C++ | #incluce <string>
#include <iostream>
using namespace std;
int main(){
string a,b; cin >> a >> b;
string ans;
for(int i=0;i<b.length();i++){
ans += a[i]+b[i];
}
if(a.length()!=b.length()) ans+=a[a.length()-1];
cout << ans << endl;
} | a.cc:1:2: error: invalid preprocessing directive #incluce; did you mean #include?
1 | #incluce <string>
| ^~~~~~~
| include
|
s204738252 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s,t;
cin >> s >> t;
for (int i = 0; i < size(); i++){
cout << s[i] << t[i];
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:7:29: error: no matching function for call to 'size()'
7 | for (int i = 0; i < size(); i++){
| ~~~~^~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidate expects 1 argument, 0 provided
|
s077359836 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
ll a,b,p;
string s,ss;
vector<string>v;
cin>>s>>ss;
//a=s.size(); b=ss.size();
sss=s+ss;
p=sss.size();
for(ll i=0;i<p;i++)
{
cout<<s[i]; cout<<ss[i];
}
}
| a.cc: In function 'int main()':
a.cc:11:5: error: 'sss' was not declared in this scope; did you mean 'ss'?
11 | sss=s+ss;
| ^~~
| ss
|
s534874516 | p03760 | C | #include<stdio.h>
#include<string.h>
int main()
{
char a[10000],b[10000];
gets(a);
gets(b);
int i,j,len1,len2;
len1=strlen(a);
len2=strlen(b);
for(i=0,j=0;i<len1,j<len2;i=i+1,j=j+1)
{
printf("%c",a[i]);
printf("%c",b[i]);
if(i==len-1)
printf("\n");
}
return 0;
}
| main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
6 | gets(a);
| ^~~~
| fgets
main.c:15:23: error: 'len' undeclared (first use in this function); did you mean 'len2'?
15 | if(i==len-1)
| ^~~
| len2
main.c:15:23: note: each undeclared identifier is reported only once for each function it appears in
|
s932042320 | p03760 | C++ | //#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const int INF= 1e9+5;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000000007LL;
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main(){
ll string a,b;cin>>a>>b;
rep(i,a.size())cout<<a[i]<<b[i];
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:18:13: error: expected initializer before 'a'
18 | ll string a,b;cin>>a>>b;
| ^
a.cc:18:22: error: 'a' was not declared in this scope
18 | ll string a,b;cin>>a>>b;
| ^
a.cc:18:25: error: 'b' was not declared in this scope
18 | ll string a,b;cin>>a>>b;
| ^
|
s207764084 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string o,e;
cin >> o >> e;
int e = o.size();
for(int i = 0; i < l; i++){
cout<<o.at(i)<<e.at(i);
}
if(l<o.size())cout<<o.at(l);
cout<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:7: error: conflicting declaration 'int e'
7 | int e = o.size();
| ^
a.cc:5:12: note: previous declaration as 'std::string e'
5 | string o,e;
| ^
a.cc:8:22: error: 'l' was not declared in this scope
8 | for(int i = 0; i < l; i++){
| ^
a.cc:11:6: error: 'l' was not declared in this scope
11 | if(l<o.size())cout<<o.at(l);
| ^
|
s431771295 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char a[100],b[100];
int num1=0;
int num2=0;
cin>>a;
cin>>b;
for(int i=0;i<(a.size()+b.size());i++)
{
if(i%2)
cout<<b[num1++];
else
cout<<a[num2++];
}
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:23: error: request for member 'size' in 'a', which is of non-class type 'char [100]'
10 | for(int i=0;i<(a.size()+b.size());i++)
| ^~~~
a.cc:10:32: error: request for member 'size' in 'b', which is of non-class type 'char [100]'
10 | for(int i=0;i<(a.size()+b.size());i++)
| ^~~~
|
s565885547 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
string s1,s2,s3;
int main()
{
int num1=0;
int num2=0;
cin>>s1;
cin>>s2;
for(int i=0;i<s1.size()+s2.size();i++)
{
if(i%2)
{
cout<<s2[num1++];
}
else
{
cout<<s1[num2++];
} | a.cc: In function 'int main()':
a.cc:20:9: error: expected '}' at end of input
20 | }
| ^
a.cc:12:6: note: to match this '{'
12 | {
| ^
a.cc:20:9: error: expected '}' at end of input
20 | }
| ^
a.cc:6:3: note: to match this '{'
6 | {
| ^
|
s301558650 | p03760 | C++ | #include<bits/stdc++.h>
typedef long long ll;
string s1,s2,s3;
int main()
{
int num1=0;
int num2=0;
cin>>s1;
cin>>s2;
for(int i=0;i<s1.size()+s2.size();i++)
{
if(i%2)
{
cout<<s2[num1++];
}
else
{
cout<<s1[num2++];
}
}
cout<<endl;
return 0;
}
| a.cc:3:3: error: 'string' does not name a type; did you mean 'stdin'?
3 | string s1,s2,s3;
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:8:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin>>s1;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:12: error: 's1' was not declared in this scope; did you mean 'y1'?
8 | cin>>s1;
| ^~
| y1
a.cc:9:11: error: 's2' was not declared in this scope
9 | cin>>s2;
| ^~
a.cc:14:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout<<s2[num1++];
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:18:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
18 | cout<<s1[num2++];
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:21:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
21 | cout<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:21:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
21 | cout<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s251996637 | p03760 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
char O[51], E[51], password[101];
cin>>O>>E;
char *o = O;
char *e = E;
char *p = password;
for(int i = 0; i < strlen(O) + strlen(E); i++){
*p++ = *o++;
*p++ = *e++;
*p = '\0';
}
cout<<password;
} | a.cc: In function 'int main()':
a.cc:11:24: error: 'strlen' was not declared in this scope
11 | for(int i = 0; i < strlen(O) + strlen(E); i++){
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>
2 | #include<string>
|
s134476607 | p03760 | C++ | #include<iostream>
using namespace std;
int main(){
char O[51], E[51], password[101];
cin>>O>>E;
char *o = O;
char *e = E;
char *p = password;
for(int i = 0; i < strlen(O) + strlen(E); i++){
*p++ = *o++;
*p++ = *e++;
*p = '\0';
}
cout<<password;
} | a.cc: In function 'int main()':
a.cc:10:24: error: 'strlen' was not declared in this scope
10 | for(int i = 0; i < strlen(O) + strlen(E); i++){
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>
2 | using namespace std;
|
s564770068 | p03760 | C | #include<stdio.h>
#include<string.h>
int main()
{
string a[100], b[100], c[100];
int i, j, m,n,t;
getline(cin,a);
getline(cin,b);
m=strlen(a);
n=strlen(b);
if(m=n)
t=2*n;
else
t=m+n;
for(i=0;i<t;i++)
{
if((i+1)%2==0)
c[i]=a[i];
else
c[i]=b[i];
}
c[t]='\0';
puts(c);
return 0;
} | main.c: In function 'main':
main.c:5:1: error: unknown type name 'string'; did you mean 'stdin'?
5 | string a[100], b[100], c[100];
| ^~~~~~
| stdin
main.c:7:9: error: 'cin' undeclared (first use in this function)
7 | getline(cin,a);
| ^~~
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:13: error: passing argument 2 of 'getline' from incompatible pointer type [-Wincompatible-pointer-types]
7 | getline(cin,a);
| ^
| |
| int *
In file included from main.c:1:
/usr/include/stdio.h:698:46: note: expected 'size_t * restrict' {aka 'long unsigned int * restrict'} but argument is of type 'int *'
698 | size_t *__restrict __n,
| ~~~~~~~~~~~~~~~~~~~^~~
main.c:7:1: error: too few arguments to function 'getline'
7 | getline(cin,a);
| ^~~~~~~
/usr/include/stdio.h:697:18: note: declared here
697 | extern __ssize_t getline (char **__restrict __lineptr,
| ^~~~~~~
main.c:8:13: error: passing argument 2 of 'getline' from incompatible pointer type [-Wincompatible-pointer-types]
8 | getline(cin,b);
| ^
| |
| int *
/usr/include/stdio.h:698:46: note: expected 'size_t * restrict' {aka 'long unsigned int * restrict'} but argument is of type 'int *'
698 | size_t *__restrict __n,
| ~~~~~~~~~~~~~~~~~~~^~~
main.c:8:1: error: too few arguments to function 'getline'
8 | getline(cin,b);
| ^~~~~~~
/usr/include/stdio.h:697:18: note: declared here
697 | extern __ssize_t getline (char **__restrict __lineptr,
| ^~~~~~~
main.c:9:10: error: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
9 | m=strlen(a);
| ^
| |
| int *
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int *'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
main.c:10:10: error: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
10 | n=strlen(b);
| ^
| |
| int *
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int *'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
main.c:23:6: error: passing argument 1 of 'puts' from incompatible pointer type [-Wincompatible-pointer-types]
23 | puts(c);
| ^
| |
| int *
/usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'int *'
714 | extern int puts (const char *__s);
| ~~~~~~~~~~~~^~~
|
s078562206 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char a[100], b[100], c[100];
int i, j, m,n,t;
getline(cin,a);
getline(cin,b);
m=strlen(a);
n=strlen(b);
if(m=n)
t=2n;
else
t=m+n;
for(i=0;i<t;i++)
{
if((i+1)%2==0)
c[i]=a[i];
else
c[i]=b[i];
}
c[t]='\0';
return 0;
} | a.cc: In function 'int main()':
a.cc:7:8: error: no matching function for call to 'getline(std::istream&, char [100])'
7 | getline(cin,a);
| ~~~~~~~^~~~~~~
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,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
907 | getline(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4117 | getline(basic_istream<_CharT, _Traits>& __is,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4117:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char [100]'
7 | getline(cin,a);
| ~~~~~~~^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
4125 | getline(basic_istream<_CharT, _Traits>&& __is,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4132 | getline(basic_istream<_CharT, _Traits>&& __is,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4132:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char [100]'
7 | getline(cin,a);
| ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c++/14/ext/string_conversions.h:45,
from /usr/include/c++/14/bits/basic_string.h:4154:
/usr/include/stdio.h:697:18: note: candidate: '__ssize_t getline(char**, size_t*, FILE*)'
697 | extern __ssize_t getline (char **__restrict __lineptr,
| ^~~~~~~
/usr/include/stdio.h:697:18: note: candidate expects 3 arguments, 2 provided
a.cc:8:8: error: no matching function for call to 'getline(std::istream&, char [100])'
8 | getline(cin,b);
| ~~~~~~~^~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
907 | getline(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:907:5: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4117 | getline(basic_istream<_CharT, _Traits>& __is,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4117:5: note: template argument deduction/substitution failed:
a.cc:8:8: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char [100]'
8 | getline(cin,b);
| ~~~~~~~^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
4125 | getline(basic_istream<_CharT, _Traits>&& __is,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4132 | getline(basic_istream<_CharT, _Traits>&& __is,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4132:5: note: template argument deduction/substitution failed:
a.cc:8:8: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char [100]'
8 | getline(cin,b);
| ~~~~~~~^~~~~~~
/usr/include/stdio.h:697:18: note: candidate: '__ssize_t getline(char**, size_t*, FILE*)'
697 | extern __ssize_t getline (char **__restrict __lineptr,
| ^~~~~~~
/usr/include/stdio.h:697:18: note: candidate expects 3 arguments, 2 provided
a.cc:12:3: error: unable to find numeric literal operator 'operator""n'
12 | t=2n;
| ^~
|
s951918801 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
void password(char o[],char e[])
{
char p[100];
int l=0,m=0;
l=strlen(o);
m=strlen(e);
for(int i=0,j=0,k=0;i<l+m;i++)
{
if(i%2==0)
{
p[i]=o[j];
j++;
}
else
{
p[i]=e[k];
k++;
}
}
p[l+m]='\0';
cout<<p;
}
int main()
{
char o[50],e[50];
gets(o);
gets(e);
password(o,e);
return 0;
} | a.cc: In function 'int main()':
a.cc:28:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
28 | gets(o);
| ^~~~
| getw
|
s655154592 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char a[100], b[100], c[100];
int i, j, m,n,t;
gets(a);
gets(b);
m=strlen(a);
n=strlen(b);
if(m=n)
t=2n;
else
t=m+n;
for(i=0;i<t;i++)
{
if((i+1)%2==0)
c[i]=a[i];
else
c[i]=b[i];
}
c[t]='\0';
return 0;
} | a.cc: In function 'int main()':
a.cc:7:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(a);
| ^~~~
| getw
a.cc:12:3: error: unable to find numeric literal operator 'operator""n'
12 | t=2n;
| ^~
|
s574157760 | p03760 | C++ | #include<bits/stdc++.c>
using namespace std;
int main()
{
char a[100], b[100], c[100];
int i, j, m,n,t;
gets(a);
gets(b);
m=strlen(a);
n=strlen(b);
if(m=n)
t=2n;
else
t=m+n;
for(i=0;i<t;i++)
{
if((i+1)%2==0)
c[i]=a[i];
else
c[i]=b[i];
}
c[t]='\0';
return 0;
} | a.cc:1:9: fatal error: bits/stdc++.c: No such file or directory
1 | #include<bits/stdc++.c>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s547670005 | p03760 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string a,b,s;
cin>>a;
cin>>b;
int i=0,j=0;
while(i<a.length() || j<b.length())
{
s+=a[i];
s+=b[j];
i=i+1;
j=j+1;
}
cout<<s;
return s;
}
| a.cc: In function 'int main()':
a.cc:22:8: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in return
22 | return s;
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
|
s101071027 | p03760 | C++ | #include<string>
using namespace std;
int main()
{
int main()
{
string a,b,s;
cin>>a;
cin>>b;
int i=0,j=0;
while(i<a.length() || j<b.length())
{
s+=a[i];
s+=b[j];
i=i+1;
j=j+1;
}
cout<<s;
return s;
}
| a.cc: In function 'int main()':
a.cc:5:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
5 | int main()
| ^~
a.cc:5:9: note: remove parentheses to default-initialize a variable
5 | int main()
| ^~
| --
a.cc:5:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:6:1: error: a function-definition is not allowed here before '{' token
6 | {
| ^
a.cc:23:2: error: expected '}' at end of input
23 | }
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s992322968 | p03760 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
long int l1,l2;
string o,e;
cin>>o>>e;
long int l = min(o.size(), e.size());
long int i=0
for(i=0;i<l;i++){
cout<<o[i]<<e[i];
}
if(o.size()>l)
cout<<o[i];
else if(e.size()>l)
cout<<e[i];
return 0;
} | a.cc: In function 'int main()':
a.cc:12:2: error: expected ',' or ';' before 'for'
12 | for(i=0;i<l;i++){
| ^~~
a.cc:12:17: error: expected ';' before ')' token
12 | for(i=0;i<l;i++){
| ^
| ;
|
s966388919 | p03760 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
long int l1,l2;
string o,e;
cin>>o>>e;
long int l = min(o.size(), e.size());
for(long int i=0;i<l;i++){
cout<<o[i]<<e[i];
}
if(o.size()>l)
cout<<o[i];
else if(e.size()>l)
cout<<e[i];
return 0;
} | a.cc: In function 'int main()':
a.cc:15:13: error: 'i' was not declared in this scope
15 | cout<<o[i];
| ^
a.cc:17:13: error: 'i' was not declared in this scope
17 | cout<<e[i];
| ^
|
s820589260 | p03760 | C++ | *******************************************************************************/
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
long int l1,l2;
string o,e;
cin>>o>>e;
long int l = min(o.size(), e.size());
for(long int i=0;i<l;i++){
cout<<o[i]<<e[i];
}
if(o.size()>l)
cout<<o[i];
else if(e.size()>l)
cout<<e[i];
return 0;
} | a.cc:1:80: error: expected unqualified-id before '/' token
1 | *******************************************************************************/
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:164:72: error: expected primary-expression before 'const'
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared
171 | void operator delete(void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared
173 | void operator delete[](void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| |
s634958447 | p03760 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string a,b,s;
cin>>a;
cin>>b;
int i=0,j=0;
while(i<a.length() && j<b.length())
{
s+=a[i];
s+=b[j];
i=i+1;
j=j+1;
}
cout<<s;
return s;
} | a.cc: In function 'int main()':
a.cc:21:8: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in return
21 | return s;
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
|
s188955852 | p03760 | C++ | #include<iostream>
#include<string>
int main()
{
string a,b,s;
cin>>a;
cin>>b;
int i=0,j=0;
while(i<a.length() && j<b.length())
{
s+=a[i];
s+=b[j];
i=i+1;
j=j+1;
}
cout<<s;
return s;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
5 | string a,b,s;
| ^~~~~~
a.cc:5:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:14: error: 'a' was not declared in this scope
7 | cin>>a;
| ^
a.cc:8:6: error: 'b' was not declared in this scope
8 | cin>>b;
| ^
a.cc:13:9: error: 's' was not declared in this scope
13 | s+=a[i];
| ^
a.cc:19:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
19 | cout<<s;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:19:7: error: 's' was not declared in this scope
19 | cout<<s;
| ^
|
s775386778 | p03760 | C++ | #include<iostream>
int main()
{
string a,b,s;
cin>>a;
cin>>b;
int i=0,j=0;
while(i<a.length() && j<b.length())
{
s+=a[i];
s+=b[j];
i=i+1;
j=j+1;
}
cout<<s;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
4 | string a,b,s;
| ^~~~~~
a.cc:4:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:14: error: 'a' was not declared in this scope
6 | cin>>a;
| ^
a.cc:7:6: error: 'b' was not declared in this scope
7 | cin>>b;
| ^
a.cc:12:9: error: 's' was not declared in this scope
12 | s+=a[i];
| ^
a.cc:18:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
18 | cout<<s;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:18:7: error: 's' was not declared in this scope
18 | cout<<s;
| ^
|
s714688441 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string o,e;
cin >> o >> e;
os = o.size();
es = e.size();
string ans = "";
for (int i = 0; i < os + es; i++) {
if (i % 2 == 1) ans += e[i / 2];
else ans += o[i / 2];
}
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'os' was not declared in this scope; did you mean 'o'?
6 | os = o.size();
| ^~
| o
a.cc:7:3: error: 'es' was not declared in this scope; did you mean 'e'?
7 | es = e.size();
| ^~
| e
|
s811599128 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;
int main(){
string s, t;
in2(s, t);
ll a = 0;
ll d;
rep(i, s.size() + t.size());
d = i;
if(a == 0){
out(s[d / 2]);
a++;
}
else{
out(t[d / 2]);
a--;
}
memi;
}
| a.cc: In function 'int main()':
a.cc:23:7: error: 'i' was not declared in this scope
23 | d = i;
| ^
|
s528894494 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;
int main(){
string s, t;
in2(s, t);
ll a = 0;
rep(i, s.size() + t.size());
if(a == 0){
out(s[i / 2]);
a++;
}
else{
out(t[i / 2]);
a--;
}
memi;
} | a.cc: In function 'int main()':
a.cc:23:11: error: 'i' was not declared in this scope
23 | out(s[i / 2]);
| ^
a.cc:14:24: note: in definition of macro 'out'
14 | #define out(n) cout << n
| ^
a.cc:27:11: error: 'i' was not declared in this scope
27 | out(t[i / 2]);
| ^
a.cc:14:24: note: in definition of macro 'out'
14 | #define out(n) cout << n
| ^
|
s193008316 | p03760 | C++ | atcoderbeginnercontest
atcoderregularcontest | a.cc:1:1: error: 'atcoderbeginnercontest' does not name a type
1 | atcoderbeginnercontest
| ^~~~~~~~~~~~~~~~~~~~~~
|
s821381579 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string o,e;
cin >> o >> e;
if(o.size()==e.soze()){
for(int i=0;i<o.size();i++){
cout << o.at(i) << e.at(i);
}
cout << endl;
}
else{
for(int i=0;i<e.size();i++){
cout << o.at(i) << e.at(i);
}
cout << o.at(o.size()-1) << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:20: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'soze'; did you mean 'size'?
7 | if(o.size()==e.soze()){
| ^~~~
| size
|
s730640260 | p03760 | C++ | #include <bits/stdc++.h>
std::string o, e;
int main(){
std::cin >> o >> e;
std::vector<char> answer(o.size()+e.size());
for(int i = 0; i <o.size()+e.size(); ++i){
if(i%2){
answer[i] = o[i/2];
}
else{
answer[i] = e[i/2];
}
}
for(int i = 0; i < o.size()+e.size(); ++i){
if(i == o.size()+e.size()-1){
cout << answer[i] << endl;
}
else{
cout << answer[i];
}
}
}
| a.cc: In function 'int main()':
a.cc:18:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
18 | cout << answer[i] << endl;
| ^~~~
| std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:18:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
18 | cout << answer[i] << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:21:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
21 | cout << answer[i];
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s193327083 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O, E;
cin >> O >> E;
int o, e;
o = O.size();
e = E.size();
for (int i = 0; i < e, i++) {
cout << O.at(i) << E.at(i);
}
if (o - e == 1) {
cout << O.at(o - 1);
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before ')' token
10 | for (int i = 0; i < e, i++) {
| ^
| ;
|
s729198149 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string O,E;
cin >> O >> E;
for(int i = 0;i < O.size();i ++){
cout << O[i];
if(i < E.size(i)){
cout << E[i];
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:18: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int&)'
14 | if(i < E.size(i)){
| ~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
1076 | size() const _GLIBCXX_NOEXCEPT
| ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate expects 0 arguments, 1 provided
|
s988162903 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string O,E;
cin >> O >> E;
for(int i = 0;i < O.size();i ++){
cout << O.at(i);
if(i < E.size(i)){
cout << E.at(i);
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:18: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int&)'
14 | if(i < E.size(i)){
| ~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
1076 | size() const _GLIBCXX_NOEXCEPT
| ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate expects 0 arguments, 1 provided
|
s924288643 | p03760 | C++ | #include<bits/sdtc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(0); cout.tie(0); cin.tie(0);
string o, e;
cin >> o >> e;
int a = 0, b = 0;
for(int i = 0; i < o.size()+e.size(); i++)
{
if(i&1)
cout << e[a++];
else
cout << o[b++];
}
cout << endl;
return 0;
}
| a.cc:1:9: fatal error: bits/sdtc++.h: No such file or directory
1 | #include<bits/sdtc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s461625055 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string s,x;
cin>>s>>x;
if(s.size()==x.size())
{
for(int i=0;i<s.size();i++)
{
cout<<s[i]<<x[i];
}
return 0;
}
else
{
for(int i=0;i<x.size();i++)
{
cout<<s[i]<<x[i];
}
cout<<s.at(s.size()-1);
return 0;
}
| a.cc: In function 'int main()':
a.cc:26:6: error: expected '}' at end of input
26 | }
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s577809145 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main (){
string O,E;
cin >> O >> E;
if(O.size() == E.size()){
for(int i=0;i<O.size();i++){
cout << O.at(i) << E.at(i) ;
}
cout << endl;
return 0;
}
else {
for(int i=0;i<E.size();i++){
cout << O.at(i) << E.at(i);
}
cout << O.end() << endl;
return 0;
}
} | a.cc: In function 'int main()':
a.cc:18:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::__cxx11::basic_string<char>::iterator')
18 | cout << O.end() << endl;
| ~~~~ ^~ ~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::iterator
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'st |
s518191675 | p03760 | C | #include <iostream>
#include <string>
using namespace std;
int main() {
char o[50], e[50];
char s[100];
cin >> o;
cin >> e;
int i = 0, j = 0, k = 0;
while (i < 100) {
if (i % 2 == 0) {
s[i] = o[j];
j++;
}
else {
s[i] = e[k];
k++;
}
i++;
}
cout << s << endl;
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s322460790 | p03760 | C++ | #include<stdio.h>
int main () {
char o[51];
char e[51];
scanf("%s",o);
scanf("%s",e);
int i ;
for(i=0,i<50,i++){
printf("%s",o[i]);
printf("%s",e[i]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before ')' token
8 | for(i=0,i<50,i++){
| ^
| ;
a.cc:12:3: error: expected primary-expression before 'return'
12 | return 0;
| ^~~~~~
a.cc:11:4: error: expected ';' before 'return'
11 | }
| ^
| ;
12 | return 0;
| ~~~~~~
a.cc:12:3: error: expected primary-expression before 'return'
12 | return 0;
| ^~~~~~
a.cc:11:4: error: expected ')' before 'return'
11 | }
| ^
| )
12 | return 0;
| ~~~~~~
a.cc:8:6: note: to match this '('
8 | for(i=0,i<50,i++){
| ^
|
s812278349 | p03760 | C++ | #include<stdio.h>
int main () {
char o[51];
char e[51];
scanf("%s",o);
scanf("%s",e);
for(i=0,i<50,i++){
printf("%s",o[i]);
printf("%s",e[i]);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
7 | for(i=0,i<50,i++){
| ^
a.cc:11:3: error: expected primary-expression before 'return'
11 | return 0;
| ^~~~~~
a.cc:10:4: error: expected ';' before 'return'
10 | }
| ^
| ;
11 | return 0;
| ~~~~~~
a.cc:11:3: error: expected primary-expression before 'return'
11 | return 0;
| ^~~~~~
a.cc:10:4: error: expected ')' before 'return'
10 | }
| ^
| )
11 | return 0;
| ~~~~~~
a.cc:7:6: note: to match this '('
7 | for(i=0,i<50,i++){
| ^
|
s085695383 | p03760 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)n; i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long int ll;
typedef vector<int > vecint;
typedef vector<string > vecstr;
int main()
{
string o, e;
cin >> o >> e;
REP(i,e.size()){
cout << o[i] << e[i];
}
if(o.size != e.size()){
cout << o[o.size() - 1] << endl;
}else{
cout << endl;
}
}
| a.cc: In function 'int main()':
a.cc:15:8: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
15 | if(o.size != e.size()){
| ~~^~~~
| ()
|
s301489007 | p03760 | C++ | #include <iostream>
#include <cstdio>
#include <minmax.h>
using namespace std;
string s1, s2;
int main()
{
cin >> s1 >> s2;
cout << s1[0];
for (int i = 0; i < s1.length() + s2.length(); i++)
if (i % 2 == 0) cout << s2[i / 2];
else cout << s1[i / 2 + 1];
cout << endl;
return 0;
} | a.cc:3:10: fatal error: minmax.h: No such file or directory
3 | #include <minmax.h>
| ^~~~~~~~~~
compilation terminated.
|
s153463229 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string N,M;
cin>>N>>M;
for(int i=0; i<N.Length();i++)
{cout<<N.at(i)<<M.at(i);}
if(N.length()>M.length()){cout<<N.at(N.Length()-1);}
cout<<endl;
}
| a.cc: In function 'int main()':
a.cc:8:26: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Length'; did you mean 'length'?
8 | for(int i=0; i<N.Length();i++)
| ^~~~~~
| length
a.cc:10:42: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Length'; did you mean 'length'?
10 | if(N.length()>M.length()){cout<<N.at(N.Length()-1);}
| ^~~~~~
| length
|
s341026944 | p03760 | C++ | #include<iostream>
using namespace std;
int main()
{
char a[51],b[51];
gets(a);
gets(b);
for(int i=0;i<=strlen(a)-1;i++)
cout<<a[i]<<b[i];
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(a);
| ^~~~
| getw
a.cc:8:24: error: 'strlen' was not declared in this scope
8 | for(int i=0;i<=strlen(a)-1;i++)
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>
2 | using namespace std;
|
s225048931 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O,E;
cin >> O >> E;
for(int i=0;i<O.size();i++)
{
cout << O.at(i);
if(i<E.at(i))
{
cout << E.at(i):
}
}
}
| a.cc: In function 'int main()':
a.cc:13:22: error: expected ';' before ':' token
13 | cout << E.at(i):
| ^
| ;
|
s338607267 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O,E;
cin >> O >> E;
if(O.size()==E.size())
{
for(int i=0;i<O.size();i++)
{
cout << O.at(i) << E.at(i);
}
}
else
{
for(int i=0;i<E.size();i++)
{
cout << O.at(i) << E.at(i);
}
cout << O.at(O.size());
}
}
} | a.cc:30:1: error: expected declaration before '}' token
30 | }
| ^
|
s867202380 | p03760 | C++ | #include <bits/stdc++.h>
typedef long long ll;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define all(v) v.begin(), v.end()
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
const int INF = 1 << 30;
const ll INFll = 1ll << 60;
template <typename T>
bool chmax(T& a, const T& b) {
if (a < b) {
a = b; // aをbで更新
return true;
}
return false;
}
template <typename T>
bool chmin(T& a, const T& b) {
if (a > b) {
a = b; // aをbで更新
return true;
}
return false;
}
int main() {
string O, E;
cin >> O >> E;
int len = O.length + E.length;
int o = 0, e = 0;
rep(i, len) {
if (i % 2 == 0) {
cout << O[o];
o++;
} else {
cout << E[e];
e++;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:31:15: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
31 | int len = O.length + E.length;
| ~~^~~~~~
| ()
a.cc:31:26: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
31 | int len = O.length + E.length;
| ~~^~~~~~
| ()
|
s238350073 | p03760 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
char[] a = sc.next().toCharArray();
char[] b = sc.next().toCharArray();
StringBuilder ans = new StringBuilder();
for(int i=0;i<b.length;i++)
{
ans.append(a[i]);
ans.append(b[i]);
}
if(a.length!=b.length) ans.append(a[a.length-1]);
System.out.println(ans.toString);
}
} | Main.java:16: error: cannot find symbol
System.out.println(ans.toString);
^
symbol: variable toString
location: variable ans of type StringBuilder
1 error
|
s739065822 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll,ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
#define M 1000000007
#define all(a) (a).begin(),(a).end()
#define rep(i,n) reps(i,0,n)
#define reps(i,m,n) for(int i=(m);i<(n);i++)
int main(){
string s,t;
cin>>s>>t;
rep(i,min((int)s.size(),(int)t.size())cout<<s[i]<<t[i];
if(s.size()>t.size())cout<<s[s.size()-1];
} | a.cc:15:2: error: unterminated argument list invoking macro "rep"
15 | }
| ^
a.cc: In function 'int main()':
a.cc:13:3: error: 'rep' was not declared in this scope
13 | rep(i,min((int)s.size(),(int)t.size())cout<<s[i]<<t[i];
| ^~~
a.cc:13:6: error: expected '}' at end of input
13 | rep(i,min((int)s.size(),(int)t.size())cout<<s[i]<<t[i];
| ^
a.cc:10:11: note: to match this '{'
10 | int main(){
| ^
|
s842723101 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll,ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
#define M 1000000007
#define all(a) (a).begin(),(a).end()
#define rep(i,n) reps(i,0,n)
#define reps(i,m,n) for(int i=(m);i<(n);i++)
int main(){
string s,t;
cin>>s>>t;
rep(i,min(s.size(),t.size())cout<<s[i]<<t[i];
if(s.size()>t.size())cout<<s[s.size()-1];
} | a.cc:15:2: error: unterminated argument list invoking macro "rep"
15 | }
| ^
a.cc: In function 'int main()':
a.cc:13:3: error: 'rep' was not declared in this scope
13 | rep(i,min(s.size(),t.size())cout<<s[i]<<t[i];
| ^~~
a.cc:13:6: error: expected '}' at end of input
13 | rep(i,min(s.size(),t.size())cout<<s[i]<<t[i];
| ^
a.cc:10:11: note: to match this '{'
10 | int main(){
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.