submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s470644187 | p00015 | C | #include <stdio.h>
#include <string.h>
int main(void)
{
int n, i, j, fa, fb, carry, ans[100];
char a[101], b[101];
scnaf("%d", &n);
while(n--){
scnaf("%s", a);
scnaf("%s", b);
if(strlen(a) > 80 || strlen(b) > 80){
printf("overflow\n");
continue;
}
fa = strlen(a);
fb = strl... | main.c: In function 'main':
main.c:9:3: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scnaf("%d", &n);
| ^~~~~
| scanf
|
s083942748 | p00015 | C | #include<stdio.h>
int main(void){
int sum, N, i;
long a, b;
scanf("%d", &N);
for ( i = 0; i < N, i++ ) {
scanf("%d %d", a, b);
if( a >= 10 * 80 || b = 10 * 8 || ( a + b ) >= 10 * 8) printf("overflow");
else printf("%d", a + b);
}
return 0;
} | main.c: In function 'main':
main.c:6:27: error: expected ';' before ')' token
6 | for ( i = 0; i < N, i++ ) {
| ^~
| ;
main.c:8:29: error: lvalue required as left operand of assignment
8 | if( a >= 10 * 80 || b = 10 * 8 || ( a + b ) >= 10 ... |
s205274465 | p00015 | C | //½{·Ìa
#include<stdio.h>
#define N 10000
void mpStr2Num(char *str,int *num)//ñð½{·®É
{
char *ss;
int *nn;
int k;
int x;
while (*str == ' ' || *str == '\t') str++;
while (*str == '0') str++;
ss = str;
while (*ss >= '0' && *ss <= '9') ss++;
if (ss == str) {
... | main.c: In function 'main':
main.c:100:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
100 | gets(aa);
| ^~~~
| fgets
|
s526936240 | p00015 | C | //½{·Ìa
#include<stdio.h>
#include<string.h>
#define N 10000
void mpStr2Num(char *str,int *num)//ñð½{·®É
{
char *ss;
int *nn;
int k;
int x;
while (*str == ' ' || *str == '\t') str++;
while (*str == '0') str++;
ss = str;
while (*ss >= '0' && *ss <= '9') ss++;
i... | main.c: In function 'main':
main.c:108:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
108 | gets(aa);
| ^~~~
| fgets
|
s067998119 | p00015 | C | //½{·Ìa
#include<stdio.h>
#include<string.h>
#define N 10000
void mpStr2Num(char *str,int *num)//ñð½{·®É
{
char *ss;
int *nn;
int k;
int x;
while (*str == ' ' || *str == '\t') str++;
while (*str == '0') str++;
ss = str;
while (*ss >= '0' && *ss <= '9') ss++;
i... | main.c: In function 'main':
main.c:108:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
108 | gets(aa);
| ^~~~
| fgets
|
s253377946 | p00015 | C |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int atoiLonger(char a[],long num[]){
int length;
int i,j,k=0;
char temp[10];
for(i=0;i<9;i++){/*--*/
temp[i]=0;
}
temp[9]='\0';
length=strlen(a);
for(j=0;j<9;j++){
temp[j]='0';
}
j=8;
for(i=length-1;i>=0;i--){
temp[j]=a[i];
if(j==0){
num... | main.c: In function 'scan':
main.c:73:17: error: 'irane' undeclared (first use in this function)
73 | irane[i]=0;
| ^~~~~
main.c:73:17: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:75:2: error: expected ident... |
s736402975 | p00015 | C | #include<stdio.h>
int main(){
int c,d;
__int64 a,b;
while(scanf("%d",&c)!=EOF){
for(d=0;d<c;d++){
scanf("%I64d",&a);
scanf("%I64d",&b);
printf("%I64d\n",a+b);
}
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: unknown type name '__int64'; did you mean '__int64_t'?
5 | __int64 a,b;
| ^~~~~~~
| __int64_t
|
s607901402 | p00015 | C | #include<stdio.h>
#include <stdlib.h>
int main(){
int c,d;
__int64 *a,*b;
while(scanf("%d",&c)!=EOF){
a=(__int64*)malloc(sizeof(int)*(c+1));
b=(__int64*)malloc(sizeof(int)*(c+1));
for(d=0;d<c;d++){
scanf("%I64d",&a[d]);
scanf("%I64d",&b[d]);
}
for(d=0;d<c;d++){
printf("%I64d\n",a[d]+b[d]);
}
... | main.c: In function 'main':
main.c:6:9: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 *a,*b;
| ^~~~~~~
| __int64_t
main.c:9:20: error: '__int64' undeclared (first use in this function); did you mean '__int64_t'?
9 | a=(__int64*)mall... |
s173368306 | p00015 | C | #incllude<stdio.h>
int Input(int *keta){
int x,y,buf;
for(x=0;x<80;x++){
buf=getchar();
if(buf=='\n')break;
for(y=0;y<80;y++){
if(y!=0||y!=79){
keta[y]=keta[y+1];
}
keta[79]=buf;
}
}
return 0;
}
int Plus(int *a,int *b,int *ans){
int c;
for(c=79;c>=0;c--){
ans[c]+=(a[c]+b[c]);
if(ans[c]>9... | main.c:1:2: error: invalid preprocessing directive #incllude; did you mean #include?
1 | #incllude<stdio.h>
| ^~~~~~~~
| include
main.c: In function 'Input':
main.c:5:21: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
5 | buf=getchar();
| ... |
s127579810 | p00015 | C | #include<stdio.h>
#include<string.h>
#define Max 80
using namespace std;
int main(){
int n, i, j;
scanf("%d",&n);
while(n--){
char str[100];
int ar[3][100], leng[3], ovf=0;
for(i=0; i<100; i++) ar[0][i]=ar[1][i]=ar[2][i]=0;
for(i=0; i<2; i++){
scanf(" %s",str);
leng[i]=strlen(str);
if... | main.c:6:1: error: unknown type name 'using'
6 | using namespace std;
| ^~~~~
main.c:6:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
6 | using namespace std;
| ^~~
|
s008069850 | p00015 | C | //runtime error
#include <stdio.h>
#define SIZE 1<<8
char a[SIZE];
char b[SIZE];
char sum[SIZE + 1];
int main(void)
{
  int n;
  int i, j;
  int alen, blen;
  char ch;
  int carry;
  
  scanf("%d", &n);
  ch = getchar();
  for (i = 0; i < n; i++){
  ... | main.c: In function 'main':
main.c:17:2: error: stray '#' in program
17 |   int n;
| ^
main.c:17:1: error: lvalue required as unary '&' operand
17 |   int n;
| ^
main.c:18:2: error: stray '#' in program
18 |   int i, j;
| ^
main.c:18:1: error: lvalue required as unary '&' ope... |
s319203214 | p00015 | C | #include <stdio.h>
#include <string.h>
#include <ctype.h>
int main()
{
char s1[125];
char s2[125];
char s3[125];
int i, j, n, leap = 0;
int ans;
scanf("%d", &n);
for (i = 0; i < n; i++) {
memset(s1, '0', 124); s1[124] = '\0';
memset(s2, '0', 124); s2[124] = '\0';
memset(s3, '0', 124); s3[124] = '\0';
s... | main.c: In function 'main':
main.c:25:17: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
25 | strrev(s1);
| ^~~~~~
| strsep
|
s611864006 | p00015 | C | #include <stdio.h>
#include <string.h>
#include <ctype.h>
int main()
{
char s1[125];
char s2[125];
char s3[125];
int i, j, n, leap = 0;
int ans;
scanf("%d", &n);
for (i = 0; i < n; i++) {
memset(s1, '0', 124); s1[124] = '\0';
memset(s2, '0', 124); s2[124] = '\0';
memset(s3, '0', 124); s3[124] = '\0';
s... | main.c: In function 'main':
main.c:25:17: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
25 | strrev(s1);
| ^~~~~~
| strsep
|
s507088102 | p00015 | C | #include <stdio.h>
#include <string.h>
#include <ctype.h>
int main()
{
char s1[125];
char s2[125];
char s3[125];
int i, j, n, leap = 0;
int ans;
scanf("%d", &n);
for (i = 0; i < n; i++) {
memset(s1, '0', 124); s1[124] = '\0';
memset(s2, '0', 124); s2[124] = '\0';
memset(s3, '0', 124); s3[124] = '\0';
s... | main.c: In function 'main':
main.c:25:17: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
25 | strrev(s1);
| ^~~~~~
| strsep
|
s809088724 | p00015 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(){
int i,j,k,n,tmp,flag,length;
int yosan[20];
char str[81],str2[1024],ans[5];
scanf("%d",&n);
for(i = 0;i < n;i++){
memset(yosan,0,sizeof(yosan));
flag = 0;
for(j = 0;j < 2;j++){
scanf("%s",str2);
length = strlen(str2);
if(!flag... | main.c: In function 'main':
main.c:56:25: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
56 | itoa(yosan[tmp],ans,10);
| ^~~~
|
s060576148 | p00015 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(){
int i,j,k,n,tmp,flag,length;
int yosan[20];
char str[81],str2[1024],ans[5];
scanf("%d",&n);
for(i = 0;i < n;i++){
memset(yosan,0,sizeof(yosan));
flag = 0;
for(j = 0;j < 2;j++){
scanf("%s",str2);
length = strlen(str2);
if(!flag... | main.c: In function 'main':
main.c:56:25: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
56 | itoa(yosan[tmp],ans,10);
| ^~~~
|
s054333683 | p00015 | C | #include<stdio.h>
int main(){
int i,n,j,k,l,F,S,e,sf,ss,st;
char f[256],s[256],t[256]={};
scanf("%d%*c",&n);
for(i=0;i<n;i++)
{
j=1;
f[0] = '0';
while(1)
{
f[j]=getchar();
if(f[j] == '\n'){break;}
else{j++;}
}
k=1;
s[0] = '0';
while(1)
{
s[k]=getchar(... | main.c: In function 'main':
main.c:80:1: error: expected declaration or statement at end of input
80 | }
| ^
|
s305915901 | p00015 | C | #include<stdio.h>
int main(){
int i,n,j,k,l,F,S,e,sf,ss,st;
char f[256],s[256],t[256]={};
scanf("%d%*c",&n);
for(i=0;i<n;i++)
{
j=1;
f[0] = '0';
while(1)
{
f[j]=getchar();
if(f[j] == '\n'){break;}
else{j++;}
}
k=1;
s[0] = '0';
while(1)
{
s[k]=getchar(... | main.c:101:4: error: expected identifier or '(' before 'return'
101 | return 0;
| ^~~~~~
main.c:102:1: error: expected identifier or '(' before '}' token
102 | }
| ^
|
s929091654 | p00015 | C | #include <stdio.h>
#include <string.h>
int main(void) {
char a[91],b[91];
int ca,i,n,m;
scanf("%d",&n);
while(scanf("%s",a)!=EOF){
scanf("%s",b)
}
return 0;
} | main.c: In function 'main':
main.c:11:22: error: expected ';' before '}' token
11 | scanf("%s",b)
| ^
| ;
12 | }
| ~
|
s450344144 | p00015 | C | #include <stdio.h>
#include <string.h>
int main(void) {
char a[91],b[91];
int n;
scanf("%d",&n);
scanf("%s",a);
scanf("%s",b);
scanf("%s",a);
scanf("%s",b);
scanf("%s",a);
scanf("%s",b);
scanf("%s",a);
scanf("%s",b);
}
return 0;
} | main.c:20:9: error: expected identifier or '(' before 'return'
20 | return 0;
| ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
21 | }
| ^
|
s715511546 | p00015 | C | #include <stdio.h>
int main(void)
{
__int64 a, b, sum;
int keta;
int n;
int i;
scanf("%d", &n);
for (i = 0; i < n; i++){
scanf("%I64u", &a);
scanf("%I64u", &b);
sum = a + b;
keta = 1;
while (sum / 10 > 0){
keta++;
sum /= 10;
}
if (keta > 80){
printf("overflow\n");
}
else {
s... | main.c: In function 'main':
main.c:5:9: error: unknown type name '__int64'; did you mean '__int64_t'?
5 | __int64 a, b, sum;
| ^~~~~~~
| __int64_t
|
s000525606 | p00015 | C | #include <stdio.h>
int main(void)
{
__int64 a, b, sum;
int keta;
int n;
int i;
scanf("%d", &n);
for (i = 0; i < n; i++){
scanf("%I64u", &a);
scanf("%I64u", &b);
sum = a + b;
keta = 1;
while (sum / 10 > 0){
keta++;
sum /= 10;
}
if (keta > 80){
printf("overflow\n");
}
else {
s... | main.c: In function 'main':
main.c:5:9: error: unknown type name '__int64'; did you mean '__int64_t'?
5 | __int64 a, b, sum;
| ^~~~~~~
| __int64_t
|
s158370121 | p00015 | C | #include <stdio.h>
int main(void){
int n; long long int a,b;
scanf("%d",&n);
while(n){
scanf("%d %d",&a,&B);
printf("%d",a+b);
n--;
}
return 0;
} | main.c: In function 'main':
main.c:7:32: error: 'B' undeclared (first use in this function)
7 | scanf("%d %d",&a,&B);
| ^
main.c:7:32: note: each undeclared identifier is reported only once for each function it appears in
|
s672145648 | p00015 | C | #include <stdio.h>
int main(){
int i, I;
int n;
scanf("%d", n);
for(i=0;i<n;i++)
{
long long int a[100]={},b[100]={};
scanf("%lld %lld", &a[i], &b[i]);
}
for(I=0;I<i;I++)
{
printf("%lld\n", a[i]+b[i]);
}
return 0;
} | main.c: In function 'main':
main.c:14:34: error: 'a' undeclared (first use in this function)
14 | printf("%lld\n", a[i]+b[i]);
| ^
main.c:14:34: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:39: error: 'b' undec... |
s851481336 | p00015 | C | #include <stdio.h>
#include <string.h>
int main(void){
int n,ap,bp,cp,t;
char a[81],b[81],c[81];
scanf("%d",&n);
while(~scanf("%s%s",&a,&b)){
ap=strlen(a);
bp=strlen(b);
cp=sizeof(c)-1;
c[cp]='\0';
t=0;
while((t||ap||bp)&&cp>0){
t+=(ap?a[--ap]-... | main.c: In function 'main':
main.c:19:14: error: too many arguments to function 'puts'
19 | else puts("%s",&c[cp]);
| ^~~~
In file included from main.c:1:
/usr/include/stdio.h:714:12: note: declared here
714 | extern int puts (const char *__s);
| ^~~~
|
s844903502 | p00015 | C | #include<stdio.h>
int main(void)
{
char a[82]={0},b[82]={0};
int i,k,N;
scanf("%d",&N);
for(i=0;i<N;i++){
for(k=0;k<82;k++)
a[k]=b[k]=0:
scanf("%82s",a);
scanf("%82s",b);
if(a[81]!=0||b[81]!=0){
printf("overflow\n");
}
else{
for(k=0;k<82;k++)
a[k]+=b[k]-'0';
for(k=0;k<82;k++){
i... | main.c: In function 'main':
main.c:11:36: error: expected ';' before ':' token
11 | a[k]=b[k]=0:
| ^
| ;
|
s198877565 | p00015 | C | #include <stdio.h>
#include <string.h>
void FuncReverseString(char str, int len);
int main(void)
{
char data1[1000], data2[1000], ans[1000];
int i, j, k, n, a;
int p1, p2, flag;
scanf("%d", &n);
getchar(); /* 改行文字の削除 */
for(k = 0; k < n; k++){
/* 変数の初期化 */
p1 = p2 = flag = a = 0;
/* 文字列の初期化 */
f... | main.c: In function 'main':
main.c:53:35: error: passing argument 1 of 'FuncReverseString' makes integer from pointer without a cast [-Wint-conversion]
53 | FuncReverseString(data1, p1);
| ^~~~~
| |
| ... |
s931637747 | p00015 | C | int main( void ) {
int n, i, j, p, q, r, temp, carry, c[81];
scanf( "%d", &n );
for ( i = 0; i < n; i++ ) {
scanf( "%s", a );
scanf( "%s", b );
p = strlen( a );
q = strlen( b );
if ( p > 80 || q > 80 ) {
printf( "overflow\n" );
} else {
r = 0; carry = 0;
while ( 1 ) {
if ( r >= 80... | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf( "%d", &n );
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main( void ) {
main.c:5:9: w... |
s310204311 | p00015 | C | #include<stdio.h>
#include<string.h>
int a[1005],b[1005];
int reverse(int *a,int l,int r)
{
int i,t;
for(i=l;i<=r/2;i++)
{
t=a[i];
a[i]=a[l+r-i];
a[l+r-i]=t;
}
return 0;
}
int main()
{
int n,i,la,lb,lmax,c,tmp;
char t;
scanf("%d%*c",&n); //霎灘?扈?焚?悟帥謗牙屓霓ヲ隨ヲ
while(n--) //隶。邂? {
la=0; //貂?峺
lb... | main.c: In function 'main':
main.c:41:33: error: break statement not within loop or switch
41 | break;
| ^~~~~
main.c: At top level:
main.c:45:17: error: expected identifier or '(' before 'while'
45 | while(1)
| ... |
s423625737 | p00015 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int c[100];
void add(char*a, char*b) //鮟倩ョ、a豈巴髟ソ
{
fill(c,c+100,0); //蜥檎噪蜷?ス咲スョ髮カ
int la=strlen(a), lb=strlen(b);
for(int i=la,j=lb;i>la-lb&&j>0;i--,j--) // 菫晉蕗c豈泌刈謨ー譛?柄荳イ螟壻ク?ス? {
c[i]+=a[i-1]-'0'+b[j-... | a.cc: In function 'void add(char*, char*)':
a.cc:14:18: error: 'i' was not declared in this scope
14 | if(c[i]>9)
| ^
a.cc: At global scope:
a.cc:20:9: error: expected unqualified-id before 'for'
20 | for(int i=la-lb;i>0;i--)
| ^~~
a.cc:20:25: error: 'i' do... |
s668294483 | p00015 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int c[100];
void add(char*a, char*b) //鮟倩ョ、a豈巴髟ソ
{
fill(c,c+100,0); //蜥檎噪蜷?ス咲スョ髮カ
int la=strlen(a), lb=strlen(b);
int i,j;
for( i=la,j=lb;i>la-lb&&j>0;i--,j--) // 菫晉蕗c豈泌刈謨ー譛?柄荳イ螟壻ク?ス? {
c[i]+=a[i-1]-'0'+b[... | a.cc:21:9: error: expected unqualified-id before 'for'
21 | for( i=la-lb;i>0;i--)
| ^~~
a.cc:21:22: error: 'i' does not name a type
21 | for( i=la-lb;i>0;i--)
| ^
a.cc:21:26: error: 'i' does not name a type
21 | for( i=la-lb;i>0;i--)
| ... |
s175288335 | p00015 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
void add(char*a, char*b, char*c) //鮟倩ョ、a豈巴髟ソ
{
fill(c,c+100,0); //蜥檎噪蜷?ス咲スョ髮カ
int la=strlen(a), lb=strlen(b);
int i,j;
for( i=la,j=lb;i>la-lb&&j>0;i--,j--) // 菫晉蕗c豈泌刈謨ー譛?柄荳イ螟壻ク?ス? {
c[i]+=a[i-1]-'0'+b[j-1... | a.cc:21:5: error: expected unqualified-id before 'for'
21 | for( i=la-lb;i>0;i--)
| ^~~
a.cc:21:18: error: 'i' does not name a type
21 | for( i=la-lb;i>0;i--)
| ^
a.cc:21:22: error: 'i' does not name a type
21 | for( i=la-lb;i>0;i--)
| ^
a... |
s054002170 | p00015 | C++ | #include<iostream>
int main(){
int n;
cin>>n;
while(n--){
long long int a,b;
cin>>a>>b;
cout<<a+b<<endl;
}
} | a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin>>n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard in... |
s335751967 | p00015 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
#define MAX_ORDER 80
void alignOrder(std::string& input1, std::string& input2);
int myAtoi(const char c);
void addTwoInputs(const std::string& input1, const std::string& input2, std::string& output);
bool overflowCheck(const std::string&... | a.cc: In function 'void addTwoInputs(const std::string&, const std::string&, std::string&)':
a.cc:73:5: error: 'itoa' was not declared in this scope
73 | itoa(sum, sumStr, 10);
| ^~~~
|
s084121499 | p00015 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <stdlib.h>
using namespace std;
#define MAX_ORDER 80
void alignOrder(std::string& input1, std::string& input2);
int myAtoi(const char c);
void addTwoInputs(const std::string& input1, const std::string& input2, std::string& output);
bool overflowChec... | a.cc: In function 'void addTwoInputs(const std::string&, const std::string&, std::string&)':
a.cc:74:5: error: 'itoa' was not declared in this scope
74 | itoa(sum, sumStr, 10);
| ^~~~
|
s236055141 | p00015 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int T;
cin >> T;
while(T--){
//char s[100] = "abc";
string a,b;
cin >> a >> b;
if(a==0&&b==0){cout<<0<<endl;continue;}
reverse(a.begin(),a.end());
reverse(b.begin(),b.end());
while( a.size() < 100 ) a += "0";... | a.cc: In function 'int main()':
a.cc:13:21: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
13 | if(a==0&&b==0){cout<<0<<endl;continue;}
| ~^~~
| | |
| | ... |
s150778579 | p00015 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
int N;
cin >> N;
for (; N > 0; --N) {
int a[80] = {}, b[80] = {}, sum[80] = {};
bool co = false;
string s, t;
cin >> s >> t;
for (int i = 0; i < s.length(); ++i) a[i] = (int)(s[i] - '0');
for (int i = 0; i < t.length(); ++i) b[i] = (int)(t[i] - '0... | a.cc: In function 'int main()':
a.cc:24:22: error: 'i' was not declared in this scope
24 | if (!fz) cout << sum[i];
| ^
|
s615522677 | p00015 | C++ | #include<stdio.h>
#define STR_MAX 80
#define ASCII_BIAS 48
char h_adder(char n1, char n2, char *n3, char carry)
{
char result = n1 + n2 + carry;
if(result<10){ *n3 = result + ASCII_BIAS; return 0; }
else{ *n3 = result-10+ASCII_BIAS; return 1; }
}
int main(void)
{
int i, j;
int dataset;
char in[2][STR_... | a.cc: In function 'int main()':
a.cc:27:17: error: 'strlen' was not declared in this scope
27 | len_in[0] = strlen(in[0])-1; len_in[1] = strlen(in[1])-1;
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #incl... |
s675895113 | p00015 | C++ | #include <iostream>
#include <string>
#include <fstream>
using namespace std;
#define MAX_INT_LENGTH 80
//large integer upto 80 digits
struct largeInt{
int vals[MAX_INT_LENGTH]; // MAX_INT_LENGTH digits
};
void toLargeInt(string str, largeInt &lv){
int start = MAX_INT_LENGTH-str.length();
for (int i = 0... | a.cc: In function 'int main()':
a.cc:53:17: error: 'struct largeInt' has no member named 'length'
53 | if (lv1.length()>MAX_INT_LENGTH || lv2.length()>MAX_INT_LENGTH){
| ^~~~~~
a.cc:53:48: error: 'struct largeInt' has no member named 'length'
53 | if (lv1.length()>MAX_INT_LEN... |
s364901472 | p00015 | C++ | #include <iostream>
#include <string>
#include <sstraem>
#include <fstream>
using namespace std;
#define MAX_INT_LENGTH 80
//large integer upto 80 digits
struct largeInt{
int vals[MAX_INT_LENGTH]; // MAX_INT_LENGTH digits
};
void toLargeInt(string str, largeInt &lv){
int start = MAX_INT_LENGTH-str.length();... | a.cc:3:10: fatal error: sstraem: No such file or directory
3 | #include <sstraem>
| ^~~~~~~~~
compilation terminated.
|
s715953376 | p00015 | C++ | #include <iostream>
#include <string>
#include <sstraem>
#include <fstream>
using namespace std;
#define MAX_INT_LENGTH 80
//large integer upto 80 digits
struct largeInt{
int vals[MAX_INT_LENGTH]; // MAX_INT_LENGTH digits
};
void toLargeInt(string str, largeInt &lv){
int start = MAX_INT_LENGTH-str.length();... | a.cc:3:10: fatal error: sstraem: No such file or directory
3 | #include <sstraem>
| ^~~~~~~~~
compilation terminated.
|
s537940500 | p00015 | C++ | #include <iostream>
#include <string>
#include <sstraem>
#include <fstream>
using namespace std;
#define MAX_INT_LENGTH 80
//large integer upto 80 digits
struct largeInt{
int vals[MAX_INT_LENGTH]; // MAX_INT_LENGTH digits
};
void toLargeInt(string str, largeInt &lv){
int start = MAX_INT_LENGTH-str.length();... | a.cc:3:10: fatal error: sstraem: No such file or directory
3 | #include <sstraem>
| ^~~~~~~~~
compilation terminated.
|
s741188097 | p00015 | C++ |
int main(){
int n;
cin>>n;
rep(j,n){
int x[100]={},y[100]={};
string a,b;
cin>>a>>b;
if(a.size()>80 || b.size()>80){cout<<"overflow"<<endl;return 0;}
else{
for(int i=a.size()-1;i>=0;i--){
x[a.size()-1-i]=a[i]-'0';
}
for(int i... | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin>>n;
| ^~~
a.cc:7:9: error: 'j' was not declared in this scope
7 | rep(j,n){
| ^
a.cc:7:5: error: 'rep' was not declared in this scope
7 | rep(j,n){
| ^~~
|
s458424727 | p00015 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
int n;
string s1,s2,ans;
cin >> n;
for(int i=0; i<n; i++){
cin >> s1;
cin >> s2;
int m = max(s1.size(),s2.size());
while(m>s1.size()) '0' + s1;
while(m>s2.size()) '0' + s2;
int carry = 0;
... | a.cc:29:33: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
29 | if(ans.size() > 80) cout << 'overflow' << endl;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:15:30: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _T... |
s390276552 | p00015 | C++ | import sys
n = int(input())
for i in range(n):
a = int(input())
b = int(input())
if a + b >= 10**80:
print ("overflow")
else:
print(a + b) | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s664286918 | p00015 | C++ | #include <iostream>
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
int main()
{
unsigned int a;
cpp_int b, c;
std::cin >> a;
for (unsigned int i = 0; i < a * 2; ++i) {
if (i % 2 == 0) {
std::cin >> b;
} else {
std::cin >> c;
std::cout << b + c << s... | a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
2 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s700188172 | p00015 | C++ | #include <iostream>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
int main()
{
unsigned int a;
cpp_int b, c;
std::cin >> a;
for (unsigned int i = 0; i < a * 2; ++i) {
if (i % 2 == 0) {
std::cin >> b;
} else {
std::cin >> c;
std::cout << b + c <<... | a.cc:4:17: error: 'boost' has not been declared
4 | using namespace boost::multiprecision;
| ^~~~~
a.cc:4:24: error: 'multiprecision' is not a namespace-name
4 | using namespace boost::multiprecision;
| ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:3: e... |
s524479881 | p00015 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
string a,b,c;
int n;
cin>>n;
for(int fjal=0;fjal<n;fjal++){
cin>>a>>b;
c.clear();
if(a.size()<b.size())swap(a,b);
int as=a.size();]
while(as!=b.size())b="0"+b;
//cout<<a<<" "<<b;
bool kuri=false;
for(int i=as-1;i>=0;i--... | a.cc: In function 'int main()':
a.cc:13:25: error: expected primary-expression before ']' token
13 | int as=a.size();]
| ^
|
s885280258 | p00015 | C++ |
import java.util.Scanner;
public class Main {
int SIZE = 80;
int[] ans;
void run() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int l = 0; l < n; l++) {
// 80ケタの数字は扱えないので文字列に
char[] a = sc.next().toCharArray();
char[] b = sc.next().toCharArray();
// 入力が80ケタを超える
if (a.... | a.cc:3:1: error: 'import' does not name a type
3 | import java.util.Scanner;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
5 | public class Main {
| ^~~~~~
|
s766913020 | p00015 | C++ | #include<iostream>
#include<cstring>
#include<cstdlib>
using namespace std;
int main()
{
int N,j;
cin >> N;
for(int i=0 ; i<N ; i++){
int ans[81]={0};
ans[0]=11111;
char strA[100],strB[100];
cin >> strA >> strB;
if(strlen(strA)>80||strlen(strB)>80){
cout ... | a.cc: In function 'int main()':
a.cc:58:13: error: 'itoa' was not declared in this scope
58 | itoa(ans[i],c,10);
| ^~~~
|
s677854651 | p00015 | C++ | #include<iostream>
#include<cstring>
#include<stdlib.h>
using namespace std;
int main()
{
int N,j;
cin >> N;
for(int i=0 ; i<N ; i++){
int ans[81]={0};
ans[0]=11111;
char strA[100],strB[100];
cin >> strA >> strB;
if(strlen(strA)>80||strlen(strB)>80){
cout... | a.cc: In function 'int main()':
a.cc:58:13: error: 'itoa' was not declared in this scope
58 | itoa(ans[i],c,10);
| ^~~~
|
s297410375 | p00015 | C++ | #include <iostream>
#include <string>
??
using namespace std;
??
int main()
{
????????int num;
??
????????cin >> num;
????????for (int i = 0; i < num; i++) {
????????????????string s1, s2;
??
????????????????cin >> s1 >> s2;
????????????????if (s1.size() > 80 || s2.size() > 80)
????????????????????????cout << "overflow... | a.cc:3:1: error: expected unqualified-id before '?' token
3 | ??
| ^
a.cc:5:1: error: expected unqualified-id before '?' token
5 | ??
| ^
|
s133164901 | p00015 | C++ | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner... | a.cc:3:1: error: 'import' does not name a type
3 | import java.util.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.lang.*;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1... |
s008327865 | p00015 | C++ | #include<iostream>
#include<string>
#include<cstring>
using namespace std;
int main(){
string s1,s2;
int num;
cin>>num;
for(int j=0;j<num;j++){
cin>>s1;
cin>>s2;
int size1=s1.size();
int size2=s2.size();
if(size1>80 || size2>80){
cout<<"overflow"<<endl;
continue;
}
if(size1>size2){
for(int a... | a.cc: In function 'int main()':
a.cc:46:31: error: 'overflow' was not declared in this scope
46 | cout<<overflow<<endl;
| ^~~~~~~~
|
s264206264 | p00015 | C++ | n = int(raw_input())
while n:
n -= 1
a = long(raw_input())
b = long(raw_input())
c = str(a + b)
if len(c) > 80:
print "overflow"
else:
print c | a.cc:1:1: error: 'n' does not name a type
1 | n = int(raw_input())
| ^
|
s105298104 | p00015 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main(){
int n;
cin >> n;
for(int j=0;j<n;j++){
char a[81],b[81],c[81];
int ka = 0;
int kb = 0;
int kc = 0;
bool ovf = false;
cin >> a[ka];
ka++;
while(1){
scanf("%c",&a[ka]);
if(ka==80 and a[ka]!='\n') ovf = true... | a.cc: In function 'int main()':
a.cc:43:25: error: 'itoa' was not declared in this scope; did you mean 'ia'?
43 | itoa(s,&c[i],10);
| ^~~~
| ia
|
s851619259 | p00015 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main(){
int n;
cin >> n;
for(int j=0;j<n;j++){
char a[81],b[81],c[81];
int ka = 0;
int kb = 0;
int kc = 0;
bool ovf = false;
cin >> a[ka];
ka++;
while(1){
scanf("%c",&a[ka]);
if(ka==80 and a[ka]!='\n') ovf = true... | a.cc: In function 'int main()':
a.cc:43:25: error: 'itoa' was not declared in this scope; did you mean 'ia'?
43 | itoa(s,&c[i],10);
| ^~~~
| ia
|
s131967697 | p00015 | C++ | #include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
int main(){
string inp[2];
int output[81],n;
cin >> n;
while(n--){
cin >> inp[0] >> inp[1];
if(inp[0].size()>80||inp[0].size()>80) cout << "overflow" << endl;
else{
fill(o... | a.cc: In function 'int main()':
a.cc:17:13: error: 'reverse' was not declared in this scope
17 | reverse(inp[0].begin(),inp[0].end());
| ^~~~~~~
|
s573239404 | p00015 | C++ | #include <iostream>
#include <algorithm>
namespace boost {template <class T>struct integer_iterator {T a;bool operator != (integer_iterator const & it) const { return a != it.a; }T operator * () const { return a; }integer_iterator & operator ++ () { ++ a; return *this; }integer_iterator operator ++ (int) { return { a +... | a.cc: In function 'int main()':
a.cc:23:28: error: 'cpp_int' was not declared in this scope; did you mean 'boost::multiprecision::cpp_int'?
23 | string c = cpp_int(cpp_int(a) + cpp_int(b)).str();
| ^~~~~~~
| boost::multiprecision::cpp_int
a.cc... |
s675308543 | p00015 | C++ | n = gets.to_i
n.times do
x = gets.to_i + gets.to_i
puts x < 10**80 ? x : "overflow"
end | a.cc:1:1: error: 'n' does not name a type
1 | n = gets.to_i
| ^
|
s170407266 | p00015 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
using namespace std;
int main(){
int n;
cin>>n;
while(n-- > 0){
vector<int> ans;
vector<int> a;
vector<... | a.cc:64:1: error: unterminated comment
64 | /*
| ^
|
s232402230 | p00015 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
using namespace std;
int main(){
int n;
cin>>n;
while(n-- > 0){
vector<int> ans;
vector<int> a;
vector<... | a.cc:64:1: error: unterminated comment
64 | /*
| ^
|
s278454556 | p00015 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
using namespace std;
int main(){
int n;
cin>>n;
while(n-- > 0){
vector<int> ans;
vector<int> a;
... | a.cc:64:1: error: unterminated comment
64 | /*
| ^
|
s343166658 | p00015 | C++ | #include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;
int main(){
int n,g;
int k,l;
bool check;
... | a.cc: In function 'int main()':
a.cc:37:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
37 | ans[j]+= i1[j] + i2[j];
| ^~~
| abs
a.cc:37:22: error: 'i1' was not declared in this scope
37 | ans[j]+= i1[j] + i2[j];
| ... |
s257859340 | p00015 | C++ | #include <stdio.h>
#include <string.h>
int main(void)
{
unsigned char num1[100],num2[100];
int ia,ib,i,j,k,l,num,ex,large,small;
int size1,size2;
int sum[100];
scanf("%d",&num);//????????????????????°
for (l = 0; l < num; ++l)
{
scanf("%s",num1);
scanf("%s",num2);
... | a.cc: In function 'int main()':
a.cc:18:24: error: invalid conversion from 'unsigned char*' to 'const char*' [-fpermissive]
18 | size1 = strlen(num1);
| ^~~~
| |
| unsigned char*
In file included from a.cc:2:
/usr/include/... |
s397491188 | p00015 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
const int MAX_SIZE = 90;
#define toI(x) (x-'0')
using namespace std;
class Z
{
private:
int size;
char d[MAX_SIZE];
public:
Z(char *s)
{
size = strlen(s);
for(int i=0;i<MAX_SIZE - size;i++)
d[i] = 0;
for(int i=0,j=MAX_SIZE - size;j ... | a.cc:87:3: error: expected unqualified-id before 'return'
87 | return 0;
| ^~~~~~
a.cc:88:1: error: expected declaration before '}' token
88 | }
| ^
|
s039314214 | p00015 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#define MAX_SIZE 90;
#define toI(x) (x-'0')
using namespace std;
class Z
{
private:
int size;
char d[MAX_SIZE];
public:
Z(char *s)
{
size = strlen(s);
for(int i=0;i<MAX_SIZE - size;i++)
d[i] = 0;
for(int i=0,j=MAX_SIZE - size;j < MA... | a.cc:5:20: error: expected ']' before ';' token
5 | #define MAX_SIZE 90;
| ^
a.cc:15:10: note: in expansion of macro 'MAX_SIZE'
15 | char d[MAX_SIZE];
| ^~~~~~~~
a.cc:15:18: error: expected unqualified-id before ']' token
15 | char d[MAX_SIZE];
| ... |
s758459398 | p00015 | C++ | #include <iostream>
#include <vector>
#include<string>
#include<sstream>
#define CAPACITY 9
namespace stoi{
int stoi(std::string str){
int ret;
std:: stringstream ss;
ss << str;
ss >> ret;
return ret;
}
}
class OverDigit
{
public:
int num_a[CAPACITY];
int ... | a.cc: In member function 'void OverDigit::ChangeDigit(std::string, int*)':
a.cc:38:1: error: 'td' has not been declared
38 | td::vector <int> num_str(CAPACITY, 0);
| ^~
a.cc:38:13: error: expected primary-expression before 'int'
38 | td::vector <int> num_str(CAPACITY, 0);
| ^~~
a.cc:48:9: ... |
s940903952 | p00015 | C++ | #include <iostream>
#include <vector>
#include<string>
#include<sstream>
#define CAPACITY 9
namespace stoi{
int stoi(std::string str){
int ret;
std:: stringstream ss;
ss << str;
ss >> ret;
return ret;
}
}
class OverDigit
{
public:
int num_a[CAPACITY];
int ... | a.cc:150:5: error: redefinition of 'int main()'
150 | int main()
| ^~~~
a.cc:118:5: note: 'int main()' previously defined here
118 | int main(){
| ^~~~
|
s789883923 | p00015 | C++ | import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
void main(){
int n;
readf("%d\n",&n);
for(int i=0;i<n;i++){
string s1,s2,res;
s1 = chomp(readln());
s2 = chomp(readln());
res = "";
int x = to!int(s1.length-1);
int y = to!int(s2.length-1);
if( y > x) {
swap(s1,s2);
... | a.cc:1:1: error: 'import' does not name a type
1 | import std.stdio;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import std.string;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: e... |
s356296716 | p00015 | C++ | import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
void main(){
int n;
readf("%d\n",&n);
for(int i=0;i<n;i++){
string s1,s2,res;
s1 = chomp(readln());
s2 = chomp(readln());
res = "";
int x = to!int(s1.length-1);
int y = to!int(s2.length-1);
if( y > x) {
swap(s1,s2);
... | a.cc:1:1: error: 'import' does not name a type
1 | import std.stdio;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import std.string;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: e... |
s057987270 | p00015 | C++ | n = int(input())
for i in range(n):
a = int(input())
b = int(input())
print(a + b) | a.cc:1:1: error: 'n' does not name a type
1 | n = int(input())
| ^
|
s610345788 | p00015 | C++ | def first_digit(n)
n[0]
end
def digit(n)
n.size
end
def overflow?(a, b)
if digit(a) > 80 || digit(b) > 80
puts 'overflow'
return true
end
if digit(a) == 80 && digit(b) == 80
if [a, b].map { |e| first_digit(e).to_i }.inject(:+) >= 10
puts 'overflow'
return true
end
end
false... | a.cc:11:10: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
11 | puts 'overflow'
| ^~~~~~~~~~
a.cc:17:12: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
17 | puts 'overflow'
| ^~~~~~~~~~
a.cc:1:1: error: '... |
s963897171 | p00015 | C++ | #include <string>
using namespace std;
int main(){
int n,i,j;
string a,b;
int sum[110]={};
int up = 0;
cin >> n;
for(i=0;i<n;i++){
cin >> a >> b;
int sa=a.size(),sb=b.size();
int flag=0;
if(sa>=80||sb>=80) flag =1;
for(j=0;j<max(sa,sb);j++){
if(sa>j&&sb>j){
sum[j] = (a[sa-j-1]-'... | a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
10 | cin >> n;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <string>
+++ |+#include <iostream>
2 | using namespace st... |
s005341459 | p00015 | C++ | include <iostream>
#include <cmath>
#include <vector>
using namespace std;
int main(){
int num;
cin >> num;
vector<int> LONGINT(num, 0);
long long int larger; // 8?????????
long long int smaller; // 8????????? ... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/cmath:45,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
1... |
s449460009 | p00015 | C++ | #include <stdio.h>
#include <string.h>
int chomp(char *str){
int len = strlen(str);
if(str[len-1]=='\n'){
str[len-1] = '\0';
len--;
}
return len;
}
int main(){
int n;
int i,j;
int s1,s2,la,sm;
char a1[103],a2[103],*pla,*psm,dummy[2];
int carry,r;
scanf("%d",&n);... | a.cc: In function 'int main()':
a.cc:28:13: error: 'next' was not declared in this scope
28 | next;
| ^~~~
a.cc:55:17: error: 'next' was not declared in this scope
55 | next;
| ^~~~
|
s060626981 | p00015 | C++ | #include<iostream>
using namespace std;
int main(){
int cnt, m;
cin >> cnt;
string s1, s2, ans;
for(int i = 0; i < cnt; i++){
cin >> s1 >> s2;
ans = "";
m = max(s1.size(), ans.size());
while( s1.size() < m )
s1 = '0' + s1;
while( s2.size() < m )
s2 = '0' + s2;
int c = 0;
for(int i = m-1; i >... | a.cc: In function 'int main()':
a.cc:23:17: error: 'reverse' was not declared in this scope
23 | reverse(ans.begin(), ans.end());
| ^~~~~~~
|
s714066160 | p00015 | C++ | #include "bits/stdc++.h"
#define debug(x) cout<<#x<<": "<<x<<endl
#define rep(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for (int i=(a);i<=(b);i++)
#define all(a) (a).begin(),(a).end()
using namespace std;
typedef vector<int> VI;
typedef vector<vector<int>> VVI;
typedef long long ll;
ll gcd(ll a, ll b) {
ll c;
... | a.cc: In function 'void solve()':
a.cc:30:83: error: no matching function for call to 'min(unsigned int, std::__cxx11::basic_string<char>::size_type)'
30 | if (s1.size() > 10 * j) v1[j] = stoi(s1.substr(10 * j, min(10u, s1.size() - 10 * j)));
| ... |
s880489104 | p00015 | C++ | #include<iostream>
using namespace std;
string solve(string s1, string s2){
while(s1.size()<85){
s1 = '0' + s1;
}
while(s2.size()<85){
s2 = '0' + s2;
}
string ret = "";
int kuri = 0;
for(int i=0;i<80;i++){
int r = (int)(s1[s1.size()-1-i]-'0' + s2[s2.size()-1-i]-'0') + kuri;
kuri = r/10;
r = r%10;
ret = ((char)('0'+... | a.cc: In function 'int main()':
a.cc:28:13: error: invalid operands of types '__complex__ int' and 'int' to binary 'operator<'
28 | for(int i=0i<N;i++){
a.cc:28:19: error: expected ';' before ')' token
28 | for(int i=0i<N;i++){
| ^
| ;
|
s298961713 | p00015 | C++ | #include<bits/stdc++.h>
using namespace std;
string solve(string s1, string s2){
while(s1.size()<85){
s1 = '0' + s1;
}
while(s2.size()<85){
s2 = '0' + s2;
}
string ret = "";
int kuri = 0;
for(int i=0;i<80;i++){
int r = (int)(s1[s1.size()-1-i]-'0' + s2[s2.size()-1-i]-'0') + kuri;
kuri = r/10;
r = r%10;
ret = ((char)(... | a.cc: In function 'int main()':
a.cc:27:13: error: no match for 'operator<' (operand types are 'std::complex<double>' and 'int')
27 | for(int i=0i<N;i++){
| ~~^~
| | |
| | int
| std::complex<double>
In file included from /usr/include/c++/14/regex:68,
... |
s343810378 | p00015 | C++ | #include<algorithm>
#include<iostream>
#include<cstdio>
#include<stdio.h>
#include<string>
#include<string.h>
#include"stdafx.h"
using namespace std;
int main()
{
char a1,a2 ;
long long a, b,c;
int kaisu = 0;
cin >> kaisu;
for (int i = 0; i < kaisu; i++)
{
cin >> a;
cin >> b;
a1 = GetDigit(a);
a2 = Get... | a.cc:7:9: fatal error: stdafx.h: No such file or directory
7 | #include"stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s086560363 | p00015 | C++ | #include<algorithm>
#include<iostream>
#include<cstdio>
#include<stdio.h>
#include<string>
#include<string.h>
//#include"stdafx.h"
using namespace std;
int main()
{
char a1,a2 ;
long long a, b,c;
int kaisu = 0;
cin >> kaisu;
for (int i = 0; i < kaisu; i++)
{
cin >> a;
cin >> b;
a1 = GetDigit(a);
a2 = G... | a.cc: In function 'int main()':
a.cc:20:23: error: 'GetDigit' was not declared in this scope
20 | a1 = GetDigit(a);
| ^~~~~~~~
|
s320502276 | p00015 | C++ | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#define MAX_LEN 101
using namespace std;
void q15() {
int N;
scanf("%d\n", &N);
for (int n = 0; n < N; n++) {
string a, b;
getline(cin, a);
getline(cin, b);
if (a.length() < b.length()) {
string tmp = a;
a = b;
b = tmp;
... | a.cc: In function 'void q15()':
a.cc:23:17: error: 'reverse' was not declared in this scope
23 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s356947117 | p00015 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
string plus(string,string);
void turn(string &);
int main(){
int n;
cin>>n;
for(int i=0;i<n;++i){
string str,sts;
cin>>str>>sts;
cout<<plus(str,sts)<<endl;
}
return 0;
}
string plus(string str,string sts){
turn(str);
turn(sts);
... | a.cc: In function 'int main()':
a.cc:14:23: error: reference to 'plus' is ambiguous
14 | cout<<plus(str,sts)<<endl;
| ^~~~
In file included from /usr/include/c++/14/string:49,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/in... |
s077650666 | p00015 | C++ | #include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int i;
int num, pos;
int len1, len2;
char temp;
char f1[101] = { 0 }, f2[101] = { 0 };
int up[100] = { 0 };
int sum[101] = { 0 };
cin >> num;
while (num--) {
cin >> f1;
cin >> f2;
len1 = strlen(f1);
len2 = strlen(f2);
i... | a.cc: In function 'int main(int, char**)':
a.cc:20:24: error: 'strlen' was not declared in this scope
20 | len1 = strlen(f1);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iost... |
s163625839 | p00015 | C++ | #include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int i;
int num, pos;
int len1, len2;
int sum[101] = { 0 };
char temp;
char f1[101] = { 0 }, f2[101] = { 0 };
cin >> num;
while (num--) {
cin >> f1;
cin >> f2;
len1 = strlen(f1);
len2 = strlen(f2);
if (len1 > 80 || len2 > ... | a.cc: In function 'int main(int, char**)':
a.cc:19:24: error: 'strlen' was not declared in this scope
19 | len1 = strlen(f1);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iost... |
s983138835 | p00015 | C++ | #include<iostream>
#include<cstdlib>
#include<string>
char iota(int n){
switch (n) {
case 0: return '0';
case 1: return '1';
case 2: return '2';
case 3: return '3';
case 4: return '4';
case 5: return '5';
case 6: return '6';
case 7: return '7';
case 8: return '8';
case 9: retu... | a.cc: In function 'int main()':
a.cc:36:10: error: 'reverse' is not a member of 'std'
36 | std::reverse(num1.begin(),num1.end());
| ^~~~~~~
a.cc:37:10: error: 'reverse' is not a member of 'std'
37 | std::reverse(num2.begin(),num2.end());
| ^~~~~~~
a.cc:74:10: error: 'reverse'... |
s193479346 | p00015 | C++ | #include<iostream>
#include<string>
char iota(int n){
switch (n) {
case 0: return '0';
case 1: return '1';
case 2: return '2';
case 3: return '3';
case 4: return '4';
case 5: return '5';
case 6: return '6';
case 7: return '7';
case 8: return '8';
case 9: return '9';
}
retu... | a.cc: In function 'int main()':
a.cc:35:10: error: 'reverse' is not a member of 'std'
35 | std::reverse(num1.begin(),num1.end());
| ^~~~~~~
a.cc:36:10: error: 'reverse' is not a member of 'std'
36 | std::reverse(num2.begin(),num2.end());
| ^~~~~~~
a.cc:73:10: error: 'reverse'... |
s993255069 | p00015 | C++ | #include<iostream>
#include<string>
char iota(int n){
switch (n) {
case 0: return '0';
case 1: return '1';
case 2: return '2';
case 3: return '3';
case 4: return '4';
case 5: return '5';
case 6: return '6';
case 7: return '7';
case 8: return '8';
case 9: return '9';
}
retu... | a.cc: In function 'int main()':
a.cc:35:10: error: 'reverse' is not a member of 'std'
35 | std::reverse(num1.begin(),num1.end());
| ^~~~~~~
a.cc:36:10: error: 'reverse' is not a member of 'std'
36 | std::reverse(num2.begin(),num2.end());
| ^~~~~~~
a.cc:73:5: error: 'reverse' ... |
s362986900 | p00015 | C++ | #include<iostream>
#include<string>
char iota(int n){
switch (n) {
case 0: return '0';
case 1: return '1';
case 2: return '2';
case 3: return '3';
case 4: return '4';
case 5: return '5';
case 6: return '6';
case 7: return '7';
case 8: return '8';
case 9: return '9';
}
retu... | a.cc: In function 'int main()':
a.cc:35:10: error: 'reverse' is not a member of 'std'
35 | std::reverse(num1.begin(),num1.end());
| ^~~~~~~
a.cc:36:10: error: 'reverse' is not a member of 'std'
36 | std::reverse(num2.begin(),num2.end());
| ^~~~~~~
a.cc:73:5: error: 'reverse' ... |
s084421578 | p00015 | C++ | #include<iostream>
#include<string>
int main(){
std::string as;
std::string bs;
int a[102]={0};
int b[102]={0};
int sum[102]={0};
int a_size,b_size,sum_size,n,i,j,flag=0;
char num;
std::cin >> n;
for(i=0;i<n;i++){
std::cin >> as >> bs;
a_size = as.size();
b_size = bs.size();
for(j=... | a.cc: In function 'int main()':
a.cc:40:9: error: 'overflow' was not declared in this scope
40 | overflow = 1;
| ^~~~~~~~
a.cc:48:8: error: 'overflow' was not declared in this scope
48 | if(overflow){ //??????
| ^~~~~~~~
|
s464441474 | p00015 | C++ | #include<iostream>
#include<string>
char iota(int n){
switch (n) {
case 0: return '0';
case 1: return '1';
case 2: return '2';
case 3: return '3';
case 4: return '4';
case 5: return '5';
case 6: return '6';
case 7: return '7';
case 8: return '8';
case 9: return '9';
}
retu... | a.cc: In function 'int main()':
a.cc:23:19: error: expected initializer before ':' token
23 | std::string num2: //("990000");
| ^
a.cc:30:5: error: 'sum' was not declared in this scope
30 | sum[i]='\0';
| ^~~
a.cc:34:25: error: 'num2' was not declared in this scope; did y... |
s530567436 | p00015 | C++ | #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// typedef std::vector<char> TLongInt;
// TLongInt Decode(const std::string& Code)
// {
// std::vector<char> Value(100, 0);
// for(int i = 0; i < Code.size(); ++i){
// Value[i] = Code[Code.size() -1 -i] - '0';
// }
// ... | a.cc: In function 'char* add(const char*, const char*)':
a.cc:57:15: error: invalid conversion from 'void*' to 'char*' [-fpermissive]
57 | x = malloc(sizeX);
| ~~~~~~^~~~~~~
| |
| void*
a.cc:72:19: error: invalid conversion from 'void*' to 'char*' [-fpermissi... |
s627474768 | p00015 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int n,k=0;
for(cin>>n;n--;){
string a,b;
cin >> a;
cin >> b;
if(a.size < b.size()) swap(a,b);//????????????a>b?????????
while(b.size() < a.size()) b += '0';//????????????a==b?????????
for(int i=a... | a.cc: In function 'int main()':
a.cc:10:14: 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... |
s044171280 | p00015 | C++ | #include<iostream>
#include<string>
using namespace std;
ios::sync_with_stdio(false);
int main(){
int n;
for(cin>>n;n--;){
int k=0;
string a,b;
cin >> a;
cin >> b;
if(a.size() < b.size()) swap(a,b);//????????????a>b?????????
while(b.size() < a.size()) b = '0' + b... | a.cc:4:1: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax
4 | ios::sync_with_stdio(false);
| ^~~
|
s532439119 | p00015 | C++ | #include <stdio.h>
#include <string.h>
int max(int a, int b) {
return a > b ? a : b;
}
int main(void) {
int i, ans = 0, j, n;
char a[110], b[110];
scanf("%d", &n);
for(i = 0; i < n; ++i) {
scanf("%s\n%s", a, b);
if(strlen(a) > 80 || strlen(b) > 80) {
printf("overflow\n");
continue;
... | a.cc:68:6: error: stray '#' in program
68 | Case # Verdict CPU Time Memory In Out Case Name
| ^
a.cc:69:6: error: stray '#' in program
69 | Case #1 : Accepted 00:00 2596 0 0 judge_data
| ^
a.cc:73:13: error: stray '#' in program
73 | Judge Input # ... |
s464657696 | p00015 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
typedef vector <int> VI;
VI string_to_vi( string number )
{
VI converted( number.size() );
for ( int i = 0; i < number.size(); i++ ) converted[i] = (int)( number[i] - '0' );
return converted;
}
VI add( VI left, VI right )
{
VI result;
r... | a.cc: In function 'VI add(VI, VI)':
a.cc:17:9: error: 'reverse' was not declared in this scope
17 | reverse( left.begin(), left.end() );
| ^~~~~~~
|
s426130263 | p00015 | C++ | import java.util.Scanner;
import java.math.BigInteger;
public class Main{
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
for (int i = 0; i < N; i++) {
String a = scanner.nextString(), b = scanner.nextString();
BigInteger sum = BigInteger(a... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.math.BigInteger;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodul... |
s451204457 | p00015 | C++ | import java.util.Scanner;
import java.math.BigInteger;
public class Main{
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
for (int i = 0; i < N; i++) {
String a = scanner.next(), b = scanner.next();
BigInteger sum = new BigInteger(a), A = n... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.math.BigInteger;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodul... |
s589558237 | p00015 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<cfloat>
#define f first
#define s second
#define mp make_pair
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define ... | a.cc: In constructor 'BigInteger::BigInteger(std::vector<char>, char)':
a.cc:60:5: error: 'assert' was not declared in this scope
60 | assert(s == 1 || s == -1);
| ^~~~~~
a.cc:13:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
12 | #include... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.