submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s570055204 | p03760 | C++ | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int d... | a.cc:45:30: error: empty character constant
45 | cout << (O[i] == '\0' ? '' : O[i]);
| ^~
a.cc:46:30: error: empty character constant
46 | cout << (E[i] == '\0' ? '' : E[i])
| ^~
a.cc: In function 'int main()':
a.cc:46:40: error: expe... |
s218292923 | p03760 | C++ | #include <stdio.h>
int main()
{
char a[50],b[50],c[100],m,k,i,s;
scanf("%s",a);
scanf("%s",b);
k=strlen(a);
m=strlen(b);
s = k > m ? k : m;
printf("%c%c",a[0],b[0]);
for(i=1;i<=s;i++)
{
c[2*i-1]=a[i];
c[2*i]=b[i];
}
for(i=1;i<=2*s;i++)
printf("%c",c[i]... | a.cc: In function 'int main()':
a.cc:7:7: error: 'strlen' was not declared in this scope
7 | k=strlen(a);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <stdio.h>
+++ |+#include <cstring>
2 | int main... |
s630108333 | p03760 | C++ | #include <stdio.h>
int main()
{
char a[50],b[50],c[100],m,k,i,s;
scanf("%s%s",a,b);
k=strlen(a);
m=strlen(b);
s = k > m ? k : m;
printf("%c%c",a[0],b[0]);
for(i=1;i<=s;i++)
{
c[2*i-1]=a[i];
c[2*i]=b[i];
}
for(i=1;i<=2*s;i++)
printf("%c",c[i]);
return 0... | a.cc: In function 'int main()':
a.cc:6:7: error: 'strlen' was not declared in this scope
6 | k=strlen(a);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <stdio.h>
+++ |+#include <cstring>
2 | int main... |
s533901452 | p03760 | C++ | // BEGINNING WITH THE NAME OF ALMIGHTY GOD ALLAH
// AUTHOR:: MOHAMMAD FAISAL
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
string s;
cin >> s;
string t;
cin >> t;
int lenS = s.length();
int lenT - t.length();
fo... | a.cc: In function 'int main()':
a.cc:16:12: error: expected initializer before '-' token
16 | int lenT - t.length();
| ^
a.cc:18:26: error: 'lenT' was not declared in this scope; did you mean 'lenS'?
18 | for(int i=0;i<min(lenS,lenT);i++)
| ^~~~
| ... |
s571421692 | p03760 | C | #include <stdio.h>
#include <string.h>
int main(void){
char O[51],E[51];
int i,size;
scanf("%s",O);
scanf("%s",E);
size = strlen(O) + strlen(E);
char ans[size];
if(strlen(O) - strlen(E) == 0){
for(i=0;i<strlen(E);i++){
printf("%c",O[i]);
printf("%c",E[i]);
... | main.c: In function 'main':
main.c:17:28: error: expected ';' before ':' token
17 | for(i=0;i<strlen(E):i++){
| ^
| ;
main.c:21:21: error: 'o' undeclared (first use in this function)
21 | printf("%c",o[strlen(O) - 1]);
| ... |
s443568022 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) pu... | a.cc: In function 'int main()':
a.cc:205:9: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
205 | for(i=0; i<b.size(); i++){
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14... |
s298994518 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
int main() {
string a,b,c;
cin >> a >> b;
for(int i=0; i<b.size(); i++){
c.pb (a.at(i));
c.pb(b.at(i));
}
if(a.size() != b.size()) c.pb(a.at(i+1));
cout << c << endl;
}
| a.cc: In function 'int main()':
a.cc:11:38: error: 'i' was not declared in this scope
11 | if(a.size() != b.size()) c.pb(a.at(i+1));
| ^
|
s391771732 | 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(s.at(i)>t.at(i)) cout<<s.at(s.size())<<endl;
} | a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
8 | if(s.at(i)>t.at(i)) cout<<s.at(s.size())<<endl;
| ^
|
s435628245 | p03760 | C++ | #include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
char O[50];
char E[50];
char temp[100];
gets(O);
gets(E);
int lo=strlen(O),i,j,c;
int le=strlen(E);
c=lo+le;
for(i=0,j=0; i<c; i++,j++){
temp[i]=O[j];
temp[i+1]=E[j];
i++... | a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(O);
| ^~~~
| getw
|
s429627535 | p03760 | C++ | #include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
char O[50];
char E[50];
char temp[100];
gets(O);
gets(E);
int lo=strlen(O),i,j,c;
int le=strlen(E);
c=lo+le;
for(i=0,j=0; i<c; i++,j++){
temp[i]=O[j];
temp[i+1]=E[j];
i++;
}
temp[i]... | a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(O);
| ^~~~
| getw
|
s769909934 | p03760 | C++ | #include<stdio.h>
int main()
{
char A[50], B[50],c[100];
int i,j;
gets(A);
gets(B);
for(i=0,j=0;j<50 i++,j++)
{
c[i] = A[j];
c[i+1] = B[j];
i++;
}
puts(c);
}
| a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(A);
| ^~~~
| getw
a.cc:10:21: error: expected ';' before 'i'
10 | for(i=0,j=0;j<50 i++,j++)
| ^~
| ;
|
s598610766 | p03760 | C | #include<stdio.h>
int main()
{
char A[50], B[50],c[100];
int i,j;
gets(A);
gets(B);
for(i=0,j=0;j<50 i++,j++)
{
c[i] = A[j];
c[i+1] = B[j];
i++;
}
puts(c);
}
| main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
7 | gets(A);
| ^~~~
| fgets
main.c:10:21: error: expected ';' before 'i'
10 | for(i=0,j=0;j<50 i++,j++)
| ^~
... |
s311181429 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int i,x,y,z=2,sum=0;
char a[50],b[50];
gets(a);
gets(b);
x=strlen(a);
y=strlen(b);
for(i=0;i<x+y;i++)
{
if(z%2==0)
{
if(sum<x)
{
cout<<a[sum];
}
else
{
cout<<a[sum-x];
}
}
else
{
if(sum<y)
{
cout<<b[sum];
... | a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(a);
| ^~~~
| getw
|
s246374252 | p03760 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int64_t minn(int64_t a,int64_t b){
if(a >= b) return b;
else return a;
}
int main(){
string O,E;
cin >> O>>E;
for(int i = 0;i < (O.size()+E.size()+1)/2;i++){
if(E.size() = O.size() - 1 && i == (O.size()+E.size()+1)/2 -1 ){
... | a.cc: In function 'int main()':
a.cc:12:17: error: lvalue required as left operand of assignment
12 | if(E.size() = O.size() - 1 && i == (O.size()+E.size()+1)/2 -1 ){
| ~~~~~~^~
|
s315349159 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,E;
vector<vector<int>> v(N,vector(2));
cin>>O>>E;
if(O.size()==E.size()){
for(int i=0;i<E.size();i++){
cout<<O[i]<<E[i];
}
}else{
for(int i=0;i<E.size();i++){
cout<<O[i]<<E[i];
}
cout<<O[O.size()-1]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:5:25: error: 'N' was not declared in this scope
5 | vector<vector<int>> v(N,vector(2));
| ^
a.cc:5:35: error: class template argument deduction failed:
5 | vector<vector<int>> v(N,vector(2));
| ^
a.cc:... |
s010761162 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int O,E;
vector<vector<int>> v(N,vector(2));
cin>>O>>E;
if(O.size()==E.size()){
for(int i=0;i<E.size();i++){
cout<<O[i]<<E[i];
}
}else{
for(int i=0;i<E.size();i++){
cout<<O[i]<<E[i];
}
cout<<O[O.size()-1]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:5:25: error: 'N' was not declared in this scope
5 | vector<vector<int>> v(N,vector(2));
| ^
a.cc:5:35: error: class template argument deduction failed:
5 | vector<vector<int>> v(N,vector(2));
| ^
a.cc:... |
s846211656 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string o,e;
cin>>o>>e;
for(int i=0;i<e.size();i++){
cout<<o.at(i)<<e.at(i);
}
if(o.size()-e.size()-==1){
int sz=o.size()-1;
cout<<o.at(sz);
}
cout<<endl;
}
| a.cc: In function 'int main()':
a.cc:10:25: error: expected primary-expression before '=' token
10 | if(o.size()-e.size()-==1){
| ^
|
s033100018 | p03760 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
string s,t;
cin>>s>>t;
for(int i=0;i<s.length();i++)
{
cout<<s[i];
if(i<t.length())
cout<<t[i]
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:35: error: expected ';' before '}' token
15 | cout<<t[i]
| ^
| ;
16 | }
| ~
|
s510213004 | p03760 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
string s,t;
cin>>s>>t;
for(int i=0;i<s.length();i++)
{
cout<<s[i];
if(i<t.length())
cout<<t[i]
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:35: error: expected ';' before '}' token
15 | cout<<t[i]
| ^
| ;
16 | }
| ~
|
s090191495 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
string O,E;
cin >> O >> E;
N = O.size();
M = E.size();
if(N > M){
for (int i=0; i < N-1; i++ ){
cout << O.at(i) << E.at(i);
}
cout << E.at(M-1) << endl;
}
if(N < M){
for (int i=0; i < M-1; i++ ){... | a.cc:25:4: error: extended character is not valid in an identifier
25 | }
| ^
a.cc:25:4: error: extended character is not valid in an identifier
a.cc:25:4: error: extended character is not valid in an identifier
a.cc: In function 'int main()':
a.cc:25:4: error: '\U00003000\U00003000\U00003000' w... |
s782415143 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
string O,E;
cin >> O >> E;
N = O.size();
M = E.size();
if(N > M){
for (int i=0; i < N-1; i++ ){
cout << O.at(i) << E.at(i);
}
cout << E.at(M-1) << endl;
}
if(N < M){
for (int i=0; i < M-1; i++ ){... | a.cc:25:4: error: extended character is not valid in an identifier
25 | }
| ^
a.cc:25:4: error: extended character is not valid in an identifier
a.cc:25:4: error: extended character is not valid in an identifier
a.cc: In function 'int main()':
a.cc:25:4: error: '\U00003000\U00003000\U00003000' w... |
s923240116 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string O;
cin >> O;
string E;
cin >> E;
int A=O.size()
int B=E.size()
if(A>B){
for(int i=0; i<B; i++){
cout << O.at(i) << E.at(i);
}
cout<<O.at(A);
}
else{
for(int i=0; i<B; i++){
cout << O.at(i) << E... | a.cc: In function 'int main()':
a.cc:11:5: error: expected ',' or ';' before 'int'
11 | int B=E.size()
| ^~~
a.cc:20:1: error: 'else' without a previous 'if'
20 | else{
| ^~~~
a.cc:21:20: error: 'B' was not declared in this scope
21 | for(int i=0; i<B; i++){
| ^... |
s318170417 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
string O,E;
cin >> O >> E;
O.size() = N;
E.size() = M;
for (int i=0; i < N; i++ ){
for(int j=0; i < M; j++){
cout << O.at(i) << E.at(j);
}
}
} | a.cc: In function 'int main()':
a.cc:8:9: error: lvalue required as left operand of assignment
8 | O.size() = N;
| ~~~~~~^~
a.cc:9:9: error: lvalue required as left operand of assignment
9 | E.size() = M;
| ~~~~~~^~
|
s360161213 | p03760 | C++ | #include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
signed main(){
string a,b;
cin>>a>>b;
if(a.size()==b.size()){
rep(i,a.size())
cout<<a.at(i)<<b.at(i);
}
... | a.cc: In function 'int main()':
a.cc:18:18: 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 unsig... |
s406200710 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b;
cin >> a >> b;
for (i=0;i<b.size();i++){
cout << a[i] << b[i];
}
if (a.size()>b.size()){
cout << a[a.size()-1];
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:7:8: error: 'i' was not declared in this scope
7 | for (i=0;i<b.size();i++){
| ^
|
s750312366 | p03760 | C++ | #include<cstdio>
#include<isotream>
#include<cstring>
using namespace std;
int a[60],b[60];
int main ()
{
scanf("%s",&a);
scanf("%s",&b);
for(int i=0;i<=50;i++){
if(a[i]!=0)cout<<a[i];
if(b[i]!=0)cout<<b[i];
}
return 0;
} | a.cc:2:9: fatal error: isotream: No such file or directory
2 | #include<isotream>
| ^~~~~~~~~~
compilation terminated.
|
s608124283 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string o,e;
cin>>o>>e;
int oLen=o.size(),eLen=e.size();
if(oLen==eLen) {
for (i=0; i < oLen; i++) {
cout<<o[i]<<e[i];
}
} else {
for (i,i < eLen; i++) {
cout<<o[i]<<e[i];
}
cout<<o[o.size()-1];
}
cout<<endl;
... | a.cc: In function 'int main()':
a.cc:12:10: error: 'i' was not declared in this scope
12 | for (i=0; i < oLen; i++) {
| ^
a.cc:16:10: error: 'i' was not declared in this scope
16 | for (i,i < eLen; i++) {
| ^
a.cc:16:25: error: expected ';' before ')' token
16 | for (i... |
s874563018 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string e;
string o;
int i, mx;
cin >> o:
cin >> e;
if (o.size()==e.size()) {
for (i=0; i < o.size(); i++) {
cout << o[i] << e[i];
}
} else {
i=0;
while (i!=e.size()) {
cout... | a.cc: In function 'int main()':
a.cc:8:13: error: found ':' in nested-name-specifier, expected '::'
8 | cin >> o:
| ^
| ::
a.cc:8:12: error: 'o' is not a class, namespace, or enumeration
8 | cin >> o:
| ^
|
s370671890 | p03760 | C++ | #include<iostream>
#include<cstdio>
#include<string.h>
using namespace std;
int main()
{
char a[51];
char b[51];
gets(a);
gets(b);
int len1=strlen(a);
int len2=strlen(b);
if(len1>len2)
{
for(int i=0;i<len2;i++)
{
cout<<a[i]<<b[i];
}
for(int i=len2;i<len1;i++)
{
cout<<a[i];
}
cout<<endl;
}
... | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(a);
| ^~~~
| getw
|
s797192734 | p03760 | C++ | #include<iostream>
#include<cstdio>
#include<string.h>
using namespace std;
int main()
{
char a[51];
char b[51];
gets(a);
gets(b);
int len1=strlen(a);
int len2=strlen(b);
if(len1>len2)
{
for(int i=0;i<len2;i++)
{
cout<<a[i]<<b[i];
}
for(int i=len2;i<len1;i++)
{
cout<<a[i];
}
cout<<endl;
}
... | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(a);
| ^~~~
| getw
|
s130172884 | p03760 | C++ | #include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
char a[51];
char b[51];
gets(a);
gets(b);
int len1=strlen(a);
int len2=strlen(b);
if(len1>len2)
{
for(int i=0;i<len2;i++)
{
cout<<a[i]<<b[i];
}
for(int i=len2;i<len1;i++)
{
cout<<a[i];
}
cout<<endl;
}
... | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(a);
| ^~~~
| getw
|
s150366867 | p03760 | C++ | #include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
char a[51];
char b[51];
gets(a);
gets(b);
int len1=strlen(a);
int len2=strlen(b);
if(len1>len2)
{
for(int i=0;i<len2;i++)
{
cout<<a[i]<<b[i];
}
for(int i=len2;i<len1;i++)
{
cout<<a[i];
}
cout<<endl;
}
... | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(a);
| ^~~~
| getw
|
s869881214 | p03760 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main()
{
char a[51];
char b[51];
gets(a);
gets(b);
int len1=strlen(a);
int len2=strlen(b);
if(len1>len2)
{
for(int i=0;i<len2;i++)
{
cout<<a[i]<<b[i];
}
for(int i=len2;i<len1;i++)
{
cout<<a[i];
}
cout<<endl;
}
else
{
for(int... | a.cc: In function 'int main()':
a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(a);
| ^~~~
| getw
|
s408652200 | p03760 | C++ | #include<iostream>
#include<string>
string a,b;
int i;
int main()
{
std::cin>a>>b;
for(;i<a.size()+b.size();i++)
if(i%2)puts(a[i/2]);
else puts(b[i/2]);
} | a.cc:4:1: error: 'string' does not name a type; did you mean 'stdin'?
4 | string a,b;
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:9:14: error: 'a' was not declared in this scope
9 | std::cin>a>>b;
| ^
a.cc:9:17: error: 'b' was not declared in this scope
9 | s... |
s373570109 | p03760 | C++ | #include<iostream>
#include<string>
string a,b;
int i;
int main()
{
std::cin>a>>b;
for(;i<a.size()+b.size();i++)
if(i%2)puts(a[i/2]);
else puts(b[i/2]);
} | a.cc:4:1: error: 'string' does not name a type; did you mean 'stdin'?
4 | string a,b;
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:9:14: error: 'a' was not declared in this scope
9 | std::cin>a>>b;
| ^
a.cc:9:17: error: 'b' was not declared in this scope
9 | s... |
s387821198 | p03760 | C++ | #include<iosteam>
#include<string>
string a,b;
int i;
int main()
{
std::cin>a>>b;
for(;i<a.size()+b.size();i++)
if(i%2)puts(a[i/2]);
else puts(b[i/2]);
} | a.cc:1:9: fatal error: iosteam: No such file or directory
1 | #include<iosteam>
| ^~~~~~~~~
compilation terminated.
|
s077962084 | p03760 | C++ | // --https://kenkoooo.com/atcoder/#/table/soma62jp
#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
string O,E;
cin >> O >> E;
for (int i = 0; i < O.length(); i++) {
cout << O[i];
if(E.length()-1 > i){
cout << E[i];
}
}
cout << endl;
return 0;
| a.cc: In function 'int main(int, char**)':
a.cc:20:18: error: expected '}' at end of input
20 | return 0;
| ^
a.cc:5:34: note: to match this '{'
5 | int main(int argc, char* argv[]) {
| ^
|
s380474583 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b;
cin>>a>>b;
for(int i=0;i<a.size();i++)
cout<<a.at(i)<<b.at(i);
if(i==b.size())
cout <<a.at(i);
}
| a.cc: In function 'int main()':
a.cc:9:6: error: 'i' was not declared in this scope
9 | if(i==b.size())
| ^
|
s262318862 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b;
cin>>a>>b;
for(int i=0;i<a.size();i++)
cout<<a.at(i)<<b.at(i);
if(i==b.size())
cout <<a.at(i);
}
| a.cc: In function 'int main()':
a.cc:9:6: error: 'i' was not declared in this scope
9 | if(i==b.size())
| ^
|
s388850445 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b;
cin>>a>>b;
for(int i=0;i<a.size();i++)
cout<<a.at(i)<<b.at(i);
if(a.size()==i+1 && b.size()+1==a.size())
cout <<a.at(i);
}
| a.cc: In function 'int main()':
a.cc:9:16: error: 'i' was not declared in this scope
9 | if(a.size()==i+1 && b.size()+1==a.size())
| ^
|
s670243849 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b;
cin>>a>>b;
for(int i=0;i<a.size();i++)
cout<<a.at(i);
cout<<b.at(i);
if(a.size()==i+1 && b.size()+1==a.size())
cout <<a.at(i);
} | a.cc: In function 'int main()':
a.cc:9:14: error: 'i' was not declared in this scope
9 | cout<<b.at(i);
| ^
|
s493324162 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string o;
string e;
cin >> o >> e;
for (int i = 0; i < o.size(); ++i) {
cout << o[i];
if (i < e.size()) cout << e[i];
}
cout << endl;@
} | a.cc:13:16: error: stray '@' in program
13 | cout << endl;@
| ^
|
s077808929 | p03760 | C | #include<stdio.h>
int main() {
char G[51], K[51];
scanf_s("%s%s", K, G);
for (int i = 0; i < sizeof(K); i++) {
printf("%c%c", K[i], G[i]);
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%s%s", K, G);
| ^~~~~~~
| scanf
|
s254109421 | p03760 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repi(i,a,b) for (int i = (a); i < (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi... | a.cc: In function 'int main()':
a.cc:21:28: error: 'o' was not declared in this scope
21 | if(i<O.size()) cout << o[i];
| ^
|
s993687692 | p03760 | C++ | #include <bits/stdc++.h>
#define ll long long
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define debug(x) cerr<<#x<<": "<<x<<'\n'
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;
int dy[]={0, 0, 1, -1,... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s020215598 | p03760 | C++ | #include<iostream>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<limits>
#include<sstream>
#include<unordered_map>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef int itn;
typedef vec... | a.cc: In function 'int main()':
a.cc:92:5: error: 'xif' was not declared in this scope
92 | xif(sz(o) > sz(e))cout << o[sz(o)-1] << endl;
| ^~~
a.cc:93:5: error: 'else' without a previous 'if'
93 | else cout << endl;
| ^~~~
|
s524023373 | p03760 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,s,e) for (int i=s;i<(e);i++)
#define All(v) (v).begin(),(v).end()
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
using namespace std;
typedef long long llint;
typedef pair<int, int> P;
const int MOD = (int)1e9 + 7;
const int INF ... | a.cc:26:2: error: unterminated argument list invoking macro "REP"
26 | }
| ^
a.cc: In function 'int main()':
a.cc:20:5: error: 'REP' was not declared in this scope
20 | REP(i,max(O.size(),E.size()){
| ^~~
a.cc:20:8: error: expected '}' at end of input
20 | REP(i,max(O.size(),E.size()){... |
s299154788 | p03760 | C++ | #include<iostream>
using std;
int main(){
string o,e;cin>>o>>e;
for(int i=0;i<min(o.size(),e.size());i++){
cout<<o[i]<<e[i];
}
if(o.size()>e.size())cout<<o.back();
cout<<endl;
} | a.cc:2:7: error: expected nested-name-specifier before 'std'
2 | using std;
| ^~~
a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
4 | string o,e;cin>>o>>e;
| ^~~~~~
a.cc:4:9: note: suggested alternatives:
In file included from /usr/inclu... |
s214144896 | p03760 | C++ | import Foundation
let o=readLine()!
let e=readLine()!
var res=""
for i in 0..<max(o.count, e.count){
res+=String(o[o.index(o.startIndex, offsetBy: i)])
if i<e.count{
res+=String(e[e.index(e.startIndex, offsetBy: i)])
}
}
print(res)
| a.cc:8:10: error: too many decimal points in number
8 | for i in 0..<max(o.count, e.count){
| ^~~
a.cc:1:1: error: 'import' does not name a type
1 | import Foundation
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:15:6: error: expected constructor, destructo... |
s641844931 | p03760 | Java | import util.java.*;
public class Main {
static Scanner scanner = new Scanner(System.in);
public static void main(String[]$) {
String[] a = new String[] {scanner.next(), scanner.next()};
int length = a[0].length() + a[1].length();
for (int i = 0; i < length; i++) {
System.out.print(a[(i + 1) % 2].charAt(i ... | Main.java:4: error: cannot find symbol
static Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:1: error: package util.java does not exist
import util.java.*;
^
Main.java:4: error: cannot find symbol
static Scanner scanner = new Scanner(System.in);
... |
s986069630 | p03760 | Java | import util.java.*;
public class Main {
static Scanner scanner = new Scanner(System.in);
public static void main(String[]$) {
String[] a = new String[] {scanner.next(), scanner.next()};
int length = a[0].length() + a[1].length();
for (int i = 0; i < length; i++) {
System.out.print(a[(i + 1) % 2].charAt(i /... | Main.java:4: error: cannot find symbol
static Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:1: error: package util.java does not exist
import util.java.*;
^
Main.java:4: error: cannot find symbol
static Scanner scanner = new Scanner(System.in);
... |
s477790178 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string O,E;
cin>>O;
cin>>E;
int o==0;
int e==0;
for(int i=0;i<O.size()+E.size();i++){
if(i%2==0){
cout<<O.at(o);
o++;
}
else{
cout<<E.at(e);
e++;
}
}
} | a.cc: In function 'int main()':
a.cc:7:8: error: expected initializer before '==' token
7 | int o==0;
| ^~
a.cc:8:8: error: expected initializer before '==' token
8 | int e==0;
| ^~
a.cc:12:18: error: 'o' was not declared in this scope
12 | cout<<O.at(o);
| ... |
s573484247 | p03760 | C++ | using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++i)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define all(v) (v.begin(), v.end())
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC... | a.cc: In function 'int main()':
a.cc:25:15: error: expected initializer before 'a'
25 | string ans='a';
| ^~~
a.cc:46:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
46 | cout<<ans<<endl;
| ^~~
| abs
a.cc:51:2: error: expected '}' at end of i... |
s723825578 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s,t;cin>>s >>t;
vector<char> ans(s.size()+t.size());
for(int i=0;i<2*s.size();i+=2){
ans.at(i)=s[i/2];
}
for(int i=1;i<2*s.size();i+=2){
ans.at(i)=t[i/2];
}
for(int i=0;i<ans.size();i++){
cout<<ans;
return 0;
}
} | a.cc: In function 'int main()':
a.cc:14:9: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>')
14 | cout<<ans;
| ~~~~^~~~~
| | |
| | std::vector<char>
| std::ostream {aka std::basic_ostream<ch... |
s542478371 | p03760 | C++ | #include<iostream>
#include<cstring>
using namespace std;
char a[101],b[101];
int blen;
int main()
{
cin>>a>>b;
blen=strlen(b);
for(int i=0;i<l;i++)cout<<a[i]<<b[i];
if(strlen(a)>strlen(b)) cout<<a[l]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:19: error: 'l' was not declared in this scope
10 | for(int i=0;i<l;i++)cout<<a[i]<<b[i];
| ^
a.cc:11:37: error: 'l' was not declared in this scope
11 | if(strlen(a)>strlen(b)) cout<<a[l]<<endl;
| ^
|
s152287126 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
vector<char> ans[a.size()+b.size()];
for(int i=0;i<a.size();i++){
ans[2*i]=a.at(i);
}
for(int i=0;i<b.size();i++){
ans[2*i+1]=b.at(i);
}
for(int i=0;i<a.size()+b.size();i++){
cout<<ans[i];
}
}
| a.cc: In function 'int main()':
a.cc:8:20: error: no match for 'operator=' (operand types are 'std::vector<char>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
8 | ans[2*i]=a.at(i);
| ^
In file included from /usr/include/c++/14/vector:72,
... |
s392602913 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
vector<char> ans[100];
for(int i=0;i<a.size();i++){
ans[2*i]=a.at(i);
}
for(int i=0;i<b.size();i++){
ans[2*i+1]=b.at(i);
}
for(int i=0;i<a.size()+b.size();i++){
cout<<ans[i];
}
}
| a.cc: In function 'int main()':
a.cc:8:20: error: no match for 'operator=' (operand types are 'std::vector<char>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
8 | ans[2*i]=a.at(i);
| ^
In file included from /usr/include/c++/14/vector:72,
... |
s958319257 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
vector<char> ans[100];
for(int i=0;i<100;i++){
ans[2*i]=a.at(i);
ans[2*i+1]=b.at(i);
}
for(int i=0;i<a.size()+b.size();i++){
cout<<ans[i];
}
}
| a.cc: In function 'int main()':
a.cc:8:20: error: no match for 'operator=' (operand types are 'std::vector<char>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
8 | ans[2*i]=a.at(i);
| ^
In file included from /usr/include/c++/14/vector:72,
... |
s070347318 | p03760 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
vector<char> ans[100];
for(int i=0;i<100;i++){
ans[2*i]=a.at(i);
ans[2*i+1]=b.at(i);
}
for(int i=0;i<a.size()+b.size();i++){
cout<<ans[i];
}
}
| a.cc: In function 'int main()':
a.cc:9:20: error: no match for 'operator=' (operand types are 'std::vector<char>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
9 | ans[2*i]=a.at(i);
| ^
In file included from /usr/include/c++/14/vector:72,
... |
s011287097 | p03760 | C++ | #include<iostream>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
vector<char> ans[100];
for(int i=0;i<100;i++){
ans[2*i]=a.at(i);
ans[2*i+1]=b.at(i);
}
for(int i=0;i<a.size()+b.size();i++){
cout<<ans[i];
}
}
| a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
6 | vector<char> ans[100];
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#include <vector>
2 | us... |
s540103789 | p03760 | C++ | #include <bits/stdc++.h>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define vi vector<int>
#define vl vector<ll>
#define vvi vector< vector<int> >
#define vvl vector< vector<ll> >
#define repd(i, a, b) for (int i=(a);i<(b);i++)
#define rep(i, n) repd(i,0,n)
#define ALL(v) v.begi... | a.cc: In function 'int main()':
a.cc:81:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
81 | cin << O << E;
| ~~~ ^~ ~
| | |
| | std::string {aka std::__cxx11... |
s637309576 | p03760 | C++ | #include <bits/stdc++.h>
#define ld long double
#define ll long long int
#define ull unsigned long long int
#define vi vector<int>
#define vl vector<ll>
#define vvi vector< vector<int> >
#define vvl vector< vector<ll> >
#define repd(i, a, b) for (int i=(a);i<(b);i++)
#define rep(i, n) repd(i,0,n)
#define ALL(v) v.begi... | a.cc: In function 'int main()':
a.cc:81:8: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
81 | cin<<O<<E;
| ~~~^~~
| | |
| | std::string {aka std::__cxx11::basic_st... |
s600014997 | p03760 | C++ | #include <iostream>
using namespace std;
int main(){
string E,O;
cin>>E>>O;
for ( int i = 0; i < E.size(); i++){
cout << E [i];
}
if ( i < O.size()){
cout << O[i];
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:16:10: error: 'i' was not declared in this scope
16 | if ( i < O.size()){
| ^
|
s031844509 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string E,O;
cin>>E>>O;
for ( int i = 0; i < E.size(); i++){
cout << E [i];
if ( i < 0.size() cout << 0[i];
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:15:14: error: unable to find numeric literal operator 'operator""size'
15 | if ( i < 0.size() cout << 0[i];
| ^~~~~~
a.cc:16:10: error: expected primary-expression before '}' token
16 | }
| ^
a.cc:15:36: error: expected ')' before... |
s678880242 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,E;
cin>>O>>E;
std::wstring str1 = LO;
std::wstring str2 = LE;
size_t size1 = str1.length();
size_t size2 = str2.length();
for (int i = 0; i < size1:; i++){
for (int j = 0; j < size2:; j++){
if ( i % 2 = 0 ){
... | a.cc: In function 'int main()':
a.cc:10:23: error: 'LO' was not declared in this scope; did you mean 'O'?
10 | std::wstring str1 = LO;
| ^~
| O
a.cc:12:23: error: 'LE' was not declared in this scope; did you mean 'E'?
12 | std::wstring str2 = LE;
|... |
s713427508 | p03760 | C++ | o=list(input())
e=list(input())+[""]
for x,y in zip(o,e):print(x+y,end="") | a.cc:1:1: error: 'o' does not name a type
1 | o=list(input())
| ^
|
s957228831 | p03760 | C++ | o=list(input())
e=list(input())
for x,y in zip(o,e):print(x+y,end="") | a.cc:1:1: error: 'o' does not name a type
1 | o=list(input())
| ^
|
s804426594 | p03760 | C++ | #include<bits/stdc++>h>
using namespace std;
int main(){
string O,E;cin>>O>>E;
int M=O.size(),N=E.size();
for(int i=0;i<N;i++)cout<<O.at(i)<<E.at(i);
if(M>N)cout<<O.at(M);
cout<<endl;
} | a.cc:1:23: warning: extra tokens at end of #include directive
1 | #include<bits/stdc++>h>
| ^
a.cc:1:9: fatal error: bits/stdc++>: No such file or directory
1 | #include<bits/stdc++>h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s539091770 | p03760 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main() {
int O, M;
cin >> O >> M;
for(int i=0; i<M.size(); i++) {
cout << O[i] << M[i];
}
cout << O[O.size()];
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:20: error: request for member 'size' in 'M', which is of non-class type 'int'
8 | for(int i=0; i<M.size(); i++) {
| ^~~~
a.cc:9:14: error: invalid types 'int[int]' for array subscript
9 | cout << O[i] << M[i];
| ^
a.cc:9:22... |
s398852292 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string O,E;
cin >> O >> E;
int a=O.size,b=E.size;
for(int i=0;i<a;i++){
cout<< O.at(i) << E.at(i);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:11: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
6 | ... |
s583384125 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string o, e;
cin >> o >> e;
for(int i = 0; i < e.size() && i < o.sizse(); i++){
cout << o[i] << e[i];
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:42: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sizse'; did you mean 'size'?
7 | for(int i = 0; i < e.size() && i < o.sizse(); i++){
| ^~~~~
| ... |
s420201891 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a;
string O,E;
cin >> O >> E;
for(int i=0;i<O.size();++i){
cout << O.at(i);
if(i<E.size()){
cout << O.at(i));
}
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:11:24: error: expected ';' before ')' token
11 | cout << O.at(i));
| ^
| ;
|
s704099339 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a;
string O,E;
cin >> O >> E;
for(int i=0;i<O.size();++i){
cout << O.at(i);
}
if(i<E.size()){
cout << O.at(i));
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:11:10: error: 'i' was not declared in this scope
11 | if(i<E.size()){
| ^
|
s373261301 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,E,a;
cin >> O >> E;
a = O.size();
for(int i=0;i<a-1;++i){
cout << O.at(i);
cout << E.at(i);
}
if(O.size()>E.size()){
cout << O.at(a);
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:8:22: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
8 | for(int i=0;i<a-1;++i){
| ~^~
| | |
| | int
| ... |
s058182500 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int j;
string O,E;
cin >> O >> E;
for(int i=0;i<O.size();++i){
if(E.size(i)<E.size()){
cout << O.at(i);
cout << E.at(i);
}
else{
cout <<O.at(i);
}
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:9:17: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int&)'
9 | if(E.size(i)<E.size()){
| ~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
... |
s097822766 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int j;
string O,E;
cin >> O >> E;
for(int i=0;i<O.size();++i){
if(E.size(i)<=E.size()){
cout << O.at(i);
cout << E.at(i);
}
else{
cout <<O.at(i);
}
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:9:17: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int&)'
9 | if(E.size(i)<=E.size()){
| ~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
... |
s335752911 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int j;
string O,S;
cin >> O >> S;
if(O==S){
for(int i=0;i<O.size();++i){
cout << O.at(i);
cout << S.at(i);
}
}
else{
for(int i=0;i=<O.size();++i){
cout << O.at(i);
cout << S.at(i);
j=i;... | a.cc: In function 'int main()':
a.cc:15:21: error: expected primary-expression before '<' token
15 | for(int i=0;i=<O.size();++i){
| ^
|
s025140926 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,S,j;
cin >> O >> S;
if(O==S){
for(int i=0;i<O.size();++i){
cout << O.at(i);
cout << S.at(i);
}
}
else{
for(int i=0;i<O.size()-1;++i){
cout << O.at(i);
cout << S.at(i);
j=i;
... | a.cc: In function 'int main()':
a.cc:19:21: error: no match for 'operator+' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
19 | cout << O.at(j+1);
| ~^~
| | |
| | int
| std:... |
s356136627 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,S;
cin >> O >> S;
if(O==S){
for(int i=0;i<O.size();++i){
cout << O.at(i);
cout << S.at(i);
}
}
else{
for(int i=0;i<O.size()-1;++i){
cout << O.at(i);
cout << S.at(i);
}
cout <... | a.cc: In function 'int main()':
a.cc:18:20: error: 'i' was not declared in this scope
18 | cout << O.at(i+1);
| ^
|
s972018558 | p03760 | C++ | using namespace std;
int main(){
strings O,S;
cin >> O >> S;
for(int i=0;i<O.size();++i){
cout<<O.at(i)+S.at(i);
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:4:5: error: 'strings' was not declared in this scope
4 | strings O,S;
| ^~~~~~~
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin >> O >> S;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable b... |
s742475039 | p03760 | C++ | using namespace std;
int main(){
string O,S;
cin >> O >> S;
for(int i=0;i<O.size();++i){
cout<<O.at(i)+S.at(i);
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:4:5: error: 'string' was not declared in this scope
4 | string O,S;
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
+++ |+#include <string>
1 | using namespace std;
a.cc:5:5: error... |
s756786137 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long MOD = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b) {if (a ... | a.cc: In function 'int main()':
a.cc:19:23: error: 'N' was not declared in this scope
19 | for (int i = 0; i < N; i++)
| ^
|
s021943849 | p03760 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
using namespace std;
string a,b;
int main()
{
cin >> a >> b;
int al = a.length();
int bl = b.length();
for (int i = 0;i < bl;i++)
{
cout << a[i] << b[i];
}
if (a > b) cout << a[l] << endl;
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:16:30: error: 'l' was not declared in this scope; did you mean 'bl'?
16 | if (a > b) cout << a[l] << endl;
| ^
| bl
|
s027066657 | p03760 | C++ | #include <iostream>
using namespace std;
#include <string>
int main() {
string s1, s2;
cin >> s1 >> s2;
int size = s1.size();
string rslt;
for(int i=1;i<=size;i++){
if(i%2==1) rslt += s1.subset(i-1,1);
else if(i%2==0) rslt += s2.subset(i-1,1);
}
cout << rslt;
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:39: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subset'; did you mean 'substr'?
13 | if(i%2==1) rslt += s1.subset(i-1,1);
| ^~~~~~
| ... |
s348216467 | p03760 | C++ | #include <iostream>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
int size = s1.size();
string rslt;
for(int i=1;i<=size;i++){
if(i%2==1) rslt += s1.subset(i-1,1);
else if(i%==0) rslt += s2.subset(i-1,1);
}
cout << rslt;
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:39: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subset'; did you mean 'substr'?
12 | if(i%2==1) rslt += s1.subset(i-1,1);
| ^~~~~~
| ... |
s670333351 | p03760 | C++ | #include <iostream>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
int size = s1.size();
string rslt;
for(i=1;i<=size;i++){
if(i%2==1) rslt += s1.subset(i-1,1);
else if(i%==0) rslt += s2.subset(i-1,1);
}
cout << rslt;
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:13: error: 'i' was not declared in this scope
11 | for(i=1;i<=size;i++){
| ^
a.cc:12:39: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subset'; did you mean 'substr'?
12 | if(i%2==1) rslt +... |
s456748388 | p03760 | C++ | #include <iostream>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
int size = s1.size();
string rslt;
for(i=1;i<=size;i++){
if(i%2==1) rslt += s1.subset(i-1,1);
else if(i%==0) rslt += s2.subset(i-1,1);
}
cout << rslt;
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:13: error: 'i' was not declared in this scope
11 | for(i=1;i<=size;i++){
| ^
a.cc:12:39: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subset'; did you mean 'substr'?
12 | if(i%2==1) rslt +... |
s658445673 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string o, e, ans(o.size() + e.size());
cin >> o >> e;
int i;
for(i = 0; i < o.size(); i++){
ans.at(2 * i) = o.at(i);
}
for(i = 0; i < e.size(); i++){
ans.at(2 * i + 1) = e.at(i);
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:5:39: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(std::__cxx11::basic_string<char>::size_type)'
5 | string o, e, ans(o.size() + e.size());
| ^
In file included from /usr/include/c++/14/stri... |
s564021784 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string o, e, ans;
cin >> o >> e;
ans.size() = o.size() + e.size();
int i;
for(i = 0; i < o.size(); i++){
ans.at(2 * i) = o.at(i);
}
for(i = 0; i < e.size(); i++){
ans.at(2 * i + 1) = e.at(i);
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:8:11: error: lvalue required as left operand of assignment
8 | ans.size() = o.size() + e.size();
| ~~~~~~~~^~
|
s734354636 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string o, e, ans;
cin >> o >> e;
ans.size() = o.size() + e.size()
int i;
for(i = 0; i < o.size(); i++){
ans.at(2 * i) = o.at(i);
}
for(i = 0; i < e.size(); i++){
ans.at(2 * i + 1) = e.at(i);
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:8:11: error: lvalue required as left operand of assignment
8 | ans.size() = o.size() + e.size()
| ~~~~~~~~^~
a.cc:11:7: error: 'i' was not declared in this scope
11 | for(i = 0; i < o.size(); i++){
| ^
a.cc:14:7: error: 'i' was not declared in this sco... |
s425773682 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string O,E,A;
cin >> O >> E;
for (int i;i<O.size()+E.size();i++){
if (i%2=0){
A[i]=O[i/2];
}
else{
A[i]=E[i/2];
}
cout << A;
} | a.cc: In function 'int main()':
a.cc:8:14: error: lvalue required as left operand of assignment
8 | if (i%2=0){
| ~^~
a.cc:15:6: error: expected '}' at end of input
15 | }
| ^
a.cc:4:19: note: to match this '{'
4 | int main(){
| ^
|
s366599537 | p03760 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
int i;
char odd[55],even[55];
gets(odd);
gets(even);
for(i=0;odd[i]!='\0'&&even[i]!='\0';i++){
printf("%c",odd[i]);
printf("%c",even[i]);
}
if(odd[i]!='\0'){
printf("%c",odd[i]);
}
if(even[i]!='\0'){
printf("%c",e... | a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(odd);
| ^~~~
| getw
|
s101200248 | p03760 | C++ | #include<cstdio>
int main(){
int i;
char odd[55],even[55];
gets(odd);
gets(even);
for(i=0;odd[i]!='\0'&&even[i]!='\0';i++){
printf("%c",odd[i]);
printf("%c",even[i]);
}
if(odd[i]!='\0'){
printf("%c",odd[i]);
}
if(even[i]!='\0'){
printf("%c",even[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(odd);
| ^~~~
| getw
|
s924862595 | p03760 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string o,e;
cin >> o >> e;
for(int i=0; i<o.length()+e.length(); i++) {
if(i%2==0) {
cout << o[i/2];
}
else {
cout << e[i/2];
}
}
| a.cc: In function 'int main()':
a.cc:14:2: error: expected '}' at end of input
14 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s980636265 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main () {
string o,e;
cin >> o >> e;
vector<int>ans;
for(int i=0;i<o.size();i++){
ans.push_back(o[i]);
ans.push_back(e[i]);
}
cout << ans;
}
| a.cc: In function 'int main()':
a.cc:13:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<int>')
13 | cout << ans;
| ~~~~ ^~ ~~~
| | |
| | std::vector<int>
| std::ostream {aka std::basic_ostream<char>}... |
s847288528 | p03760 | C++ | #include<bits/stdc++.h>
using namespace std;
int main () {
string o,e;
cin >> o >> e;
stirng ans;
for(int i=0;i<o.size();i++){
ans.push_back(o[i]);
ans.push_back(e[i]);
}
cout << ans;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'stirng' was not declared in this scope
7 | stirng ans;
| ^~~~~~
a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
10 | ans.push_back(o[i]);
| ^~~
| abs
a.cc:13:11: error: 'ans' was not declared in this s... |
s430871036 | p03760 | C | #include<stdio.h>
int main(){
int lenO, lenE;
char o[50], e[50], pas[100];
scanf("%s", o);
scanf("%s", e);
for(lenO=0; o[lenO]!='\0'; lenO++);
for(lenE=0; o[lenE]!='\0'; lenE++);
for(int i=0; i<lenO+lenE; i++){
if(i%2 == 0){
if(o[i/2] !='\0') pas[i] = o[i/2];
... | main.c: In function 'main':
main.c:19:26: error: expected ';' before 'printf'
19 | pas[lenO+lenE] = '\0'
| ^
| ;
20 |
21 | printf("%s",pas);
| ~~~~~~
|
s807440554 | p03760 | C | #include<stdio.h>
int main(){
int lenO, lenE;
char o[50], e[50], pas[100];
scanf("%s", o);
scanf("%s", e);
for(int i=0; i<100; i++){
if(i%2 == 0 && o[i/2] !='\0') pas[i] = o[i/2];
else if(&& e[i/2] !='\0') pas[i] = e[i/2];
}
printf("%s",pas);
return 0;
}
| main.c: In function 'main':
main.c:11:21: error: expected ')' before '[' token
11 | else if(&& e[i/2] !='\0') pas[i] = e[i/2];
| ~ ^
| )
main.c:11:9: error: label 'e' used but not defined
11 | else if(&& e[i/2] !='\0') pas[i] = e[i/2];
| ... |
s634216888 | p03760 | C | #include<stdio.h>
int main(){
int lenO, lenE
char o[50], e[50], pas[100];
scanf("%s", o);
scanf("%s", e);
for(int i=0; i<100; i++){
if(i%2 == 1) pas[i] = o[i/2];
else pas[i] = e[i/2];
}
printf("%s",pas);
return 0;
}
| main.c: In function 'main':
main.c:5:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
5 | char o[50], e[50], pas[100];
| ^~~~
main.c:6:17: error: 'o' undeclared (first use in this function)
6 | scanf("%s", o);
| ^
main.c:6:17: note: each undeclared... |
s182275070 | p03760 | Java | class Main {
public static void main(String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
String str1 = sc.next();
String str2 = sc.next();
int l1 = str1.length();
int l2 = str2.length();
for(int i=0; i<l2; i++){
print(str1.charAt(i));
print(str2.charAt(i));
... | Main.java:18: error: illegal start of expression
static public void print(byte what) { System.out.print(what); System.out.flush(); }
^
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.