submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s461931285 | p00015 | C++ | import java.util.Scanner;
import java.math.BigInteger;
public class a0015{
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 A = new BigInteger(a), B = ne... | 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... |
s669012606 | p00015 | C++ | #include<iostream>
#include<string>
typedef unsigned int u;
using namespace std;
typedef string::iterator s;
u z=100000000;
void p(u*a,u*l,u n){
if(a-l)
p(a+1,l,(n+=*a*10)/z),
*a=n%z;
}
u t(u*a,u*l){
u r=0;
char b[11]={};
if(a-l)
if(!t(a+1,l)){
if(*a)cout<<*a,r=1;
}else
sprintf(b,"%d",*a+z),
cout<<b+1,
... | a.cc:29:1: error: '::main' must return 'int'
29 | u main(){
| ^
|
s526977585 | p00015 | C++ | #include<iostream>
#include<string>
typedef unsigned int u;
using namespace std;
typedef string::iterator s;
u z=100000000;
void p(u*a,u*l,u n){
if(a-l)
p(a+1,l,(n+=*a*10)/z),
*a=n%z;
}
u t(u*a,u*l){
u r=0;
char b[11]={};
if(a-l)
if(!t(a+1,l)){
if(*a)cout<<*a,r=1;
}else
sprintf(b,"%d",*a+z),
cout<<b+1,
... | a.cc:29:1: error: '::main' must return 'int'
29 | u main(){
| ^
|
s248424360 | p00015 | C++ | #include <stdio.h>
int main(void) {
char a[81],b[81],result[81],temp[81];
int ketaagari;
int i,j;
int max;
char in;
int overflow;
int count,kazu;
scanf("%d",&kazu);
while(getchar()!='\n');
for(count=0;count<kazu;count++) {
for(i=0;i<81;i++) {
a[i]=0;b[i]=0;
... | a.cc: In function 'int main()':
a.cc:22:11: error: 'strlen' was not declared in this scope
22 | i=strlen(temp);
| ^~~~~~
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>
... |
s871598635 | p00015 | C++ | import java.io.*;
import java.util.*;
import java.math.*;
class Main{
public static void main(String args[]) throws IOException{
ArrayList<String> inp = new ArrayList<String>();
Scanner scan = new Scanner(System.in);
String str1 = scan.next();
BigInteger big_inp;
String str_c;
int n = Intege... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
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.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: ... |
s644784991 | p00015 | C++ | #include <cstdio>
#include <string>
using namespace std;
int main(void)
{
int n;
bool flag;
scanf("%d", &n);
while (n != 0){
flag = true;
int num1[81] = {0}, num2[81] = {0};
int max_len;
char in[3000];
scanf("%s", in);
// êUlðæ... | a.cc: In function 'int main()':
a.cc:20:24: error: 'strlen' was not declared in this scope
20 | int len = (int)strlen(in);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <string>
+++ |... |
s285710471 | p00015 | C++ | #include <cstdio>
#include <string>
using namespace std;
int main(void)
{
int n;
bool flag;
scanf("%d", &n);
while (n != 0){
flag = true;
int num1[81] = {0};
int num2[81] = {0};
int max_len;
char in[3000];
scanf("%s", in);
/... | a.cc: In function 'int main()':
a.cc:21:24: error: 'strlen' was not declared in this scope
21 | int len = (int)strlen(in);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <string>
+++ |... |
s371778490 | p00015 | C++ | #include <cstdio>
#include <string>
using namespace std;
int main(void)
{
int n;
bool flag;
scanf("%d", &n);
while (n != 0){
flag = true;
int num1[81] = {0};
int num2[81] = {0};
int max_len;
char in[3000];
scanf("%s", in);
/... | a.cc: In function 'int main()':
a.cc:21:24: error: 'strlen' was not declared in this scope
21 | int len = (int)strlen(in);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <string>
+++ |... |
s250348019 | p00015 | C++ | import java.io.BufferedReader;
import java.io.InputStreamReader;
//©Èè¢B[vÉHvÌ]n è
//public class Problem0015_NationalBudget {
public class Main {
public static void main(String[] args) {
try {
// Problem0015_NationalBudget test = new Problem0015_NationalBudget();
Main test = new Main();
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.BufferedReader;
| ^~~~~~
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.io.InputStreamReader;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available wit... |
s023759343 | p00015 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
void tasu(string s1, string s2){
int num[2][max(s1.length(), s2.length())+1];
for(int i = 0; i < sizeof(num[0])/sizeof(int); i++){
if(s1.length() > i){
num[0][i] = (int)s1.at(s1.length()-1-i) - (int)... | a.cc: In function 'void tasu(std::string, std::string)':
a.cc:31:18: error: expected primary-expression before '>' token
31 | if(keta => 80){
| ^
|
s434794032 | p00015 | C++ | import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
BigInteger a, b;
int N = Integer.parseInt(input.nextLine());
while(N > ... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.PrintWriter;
| ^~~~~~
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 '-fmod... |
s896575518 | p00015 | C++ | #include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
for(int i=0;i<t;i++){
string a;
string b;
cin >> a;
cin >> b;
string res;
reverse(a.begin(),a.end());
reverse(b.begin(),b.end())... | a.cc: In function 'int main()':
a.cc:46:52: error: second operand to the conditional operator is of type 'void', but the third operand is neither a throw-expression nor of type 'void'
46 | carry ? res.push_back(carry+'0') : "";
| ^~
|
s202692518 | p00015 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main(){
int n, maxlen;
char a[101], b[101];
cin >> n;
for(int ii = 0 ; ii < n ; ii++){
string ans = "";
scanf("%s%s", a, b);
maxlen = max(strlen(a), strlen(b));
reverse(a, a+strlen(a));
reverse(b, b+st... | a.cc: In function 'int main()':
a.cc:14:18: error: 'strlen' was not declared in this scope
14 | maxlen = max(strlen(a), strlen(b));
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++... |
s367519268 | p00015 | C++ | #include<vector>
#include<iostream>
#include<iomanip>
#include<string>
#include<cstdlib>
typedef std::vector<int> bignum;
const int e9=1000000000;
bignum plus(const bignum& a,const bignum& b);
bignum minus(const bignum& a,const bignum& b);
void input(bignum& num);
void output(const bignum& num);
int compare(const bi... | a.cc: In function 'int main()':
a.cc:22:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
22 | cin>>n;
| ^~~
| std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; /... |
s007760920 | p00015 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int n;
char a[85],b[85],answer[86];
char aa[85],bb[85];
int na=0,nb=0;
int main()
{
scanf("%d",&n);
for(int i=0;i<n;i++)
{
na=0,nb=0;
//配列aa(bb)を'0'で初期化
fill(aa,aa+85,'0');
fill(bb,bb+85,'0');
fill(a,a+85,0);
fill(b,b+85,0);
fill(answer,answer... | a.cc: In function 'int main()':
a.cc:32:17: error: 'memcpy' was not declared in this scope
32 | memcpy(aa+85-na,a,sizeof(char)*na);
| ^~~~~~
a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algori... |
s105109828 | p00015 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
int n;
cin>>n;
cin.ignore();
while(n--){
string a,b;
getline(cin,a);
int as = a.size()-1;
int bs = b.size()-1;
int nmi = min(a.size(),b.size());
int nma = max(a.size(),b.size());
for(int x; i<nma... | a.cc: In function 'int main()':
a.cc:16:16: error: 'i' was not declared in this scope
16 | for(int x; i<nma; i++){
| ^
a.cc:17:21: error: 'tab' was not declared in this scope
17 | if(i<nmi){x = tab+a[as-i]+b[bs-i]-'0'*2;}
| ^~~
a.cc:18:25: error: 'tab' was ... |
s077475407 | p00015 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void){
int n;
scanf("%d",&n);
for(int i=0;i<n;i++){
string a,b,ans;
cin >> a;
cin >> b;
reverse(a.begin(),a.end());
reverse(b.begin(),b.end());
int c=0;
for(int j=0;j<max(a.size(),b.size());j++){
string d;
int e;
e=c;
if(a.s... | a.cc: In function 'int main()':
a.cc:12:17: error: 'reverse' was not declared in this scope
12 | reverse(a.begin(),a.end());
| ^~~~~~~
|
s964500745 | p00015 | C++ | /*****include*****/
#include <iostream>
#include <fstream>
/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/
/*****名前空間*****/
using namespace std;
/*****グローバル変数置き場*****/
/*****その他関数置き場*****/
/*****main関数*****/
int main(){
/*****ファイルオープン*****/
#ifdef DEBUG
ofstream fout("output.txt");
ifstream fin("input.txt"... | a.cc: In function 'int main()':
a.cc:37:9: error: 'memset' was not declared in this scope
37 | memset(number1,'0',sizeof(number1));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <fstream>
+++ |+#inc... |
s316454122 | p00015 | C++ | /*****include*****/
#include <iostream>
#include <fstream>
/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/
/*****名前空間*****/
using namespace std;
/*****グローバル変数置き場*****/
/*****その他関数置き場*****/
/*****main関数*****/
int main(){
/*****ファイルオープン*****/
#ifdef DEBUG
ofstream fout("output.txt");
ifstream fin("input.txt"... | a.cc: In function 'int main()':
a.cc:40:17: error: 'memset' was not declared in this scope
40 | memset(number1,'0',sizeof(number1));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <fstr... |
s334580686 | p00015 | C++ | n = STDIN.gets.to_i
while n > 0
line = STDIN.gets
line =~ /(\d+)/
a = $1.to_i
line = STDIN.gets
line =~ /(\d+)/
b = $1.to_i
puts a+b
n -= 1
end | a.cc:5:19: error: stray '\' in program
5 | line =~ /(\d+)/
| ^
a.cc:8:19: error: stray '\' in program
8 | line =~ /(\d+)/
| ^
a.cc:1:1: error: 'n' does not name a type
1 | n = STDIN.gets.to_i
| ^
|
s215561946 | p00015 | C++ | #include<iostream>
#include<stdio.h>
#include <algorithm>
#include <utility>
using namespace std;
using namespace std;
int main(){
int m;
char in[2][10000];
char ans[100000];
int ie[2];
int ien[2];
bool max10;
int Min;
bool NMin;
scanf("%d",&m);
for(;m--;){
for(int i=0;i<2;i++){
scanf(" %s",&in[i]);... | a.cc: In function 'int main()':
a.cc:34:38: error: invalid types 'int[int]' for array subscript
34 | if((int(ie[0][0])+int(ie[1][0]))>9){
| ^
a.cc:34:52: error: invalid types 'int[int]' for array subscript
34 | if((int(ie[0... |
s731431062 | p00015 | C++ | #include<iostream>
#include<stdio.h>
#include <algorithm>
#include <utility>
using namespace std;
using namespace std;
int main(){
int m;
char in[2][100];
char ans[100];
int ie[2];
int ien[2];
bool max10;
int Min;
bool NMin;
scanf("%d",&m);
for(;m--;){
for(int i=0;i<2;i++){
scanf(" %s",&in[i]);
}
... | a.cc: In function 'int main()':
a.cc:23:23: error: 'strlen' was not declared in this scope
23 | ie[0]=strlen(in[0])-1;
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <utility>
+... |
s683538608 | p00015 | C++ | #include<iostream>
#include<stdio.h>
#include <algorithm>
#include<string>
#include <utility>
using namespace std;
using namespace std;
int main(){
int m;
char in[2][100];
char ans[100];
int ie[2];
int ien[2];
bool max10;
int Min;
bool NMin;
scanf("%d",&m);
for(;m--;){
for(int i=0;i<2;i++){
scanf(" ... | a.cc: In function 'int main()':
a.cc:24:23: error: 'strlen' was not declared in this scope
24 | ie[0]=strlen(in[0])-1;
| ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <utility>
+... |
s767027817 | p00015 | C++ | #include<iostream>
#include<stdio.h>
#include <algorithm>
#include<string>
#include <utility>
using namespace std;
using namespace std;
int main(){
int m;
string in,in2;
int a[90],b[90],ans[90];
int f;
int a_len,b_len,m_len;
cin>>m;
while(m--){
for(int i=0;i<90;i++){
a[i]=b[i]=ans[i]=0;
}
cin>>in;
cin... | a.cc: In function 'int main()':
a.cc:40:44: error: expected ';' before '}' token
40 | printf("%d",ans[0])
| ^
| ;
41 | }
| ~
|
s992973209 | p00015 | C++ | #include<iostream>
#include<stdio.h>
#include <algorithm>
#include<string.h>
#include <utility>
using namespace std;
using namespace std;
int main(){
int m;
string in[90],in2[90];
int a[90],b[90],ans[90];
int f;
int a_len,b_len,m_len;
cin>>m;
while(m--){
for(int i=0;i<90;i++){
a[i]=b[i]=ans[i]=0;
}
cin>... | a.cc: In function 'int main()':
a.cc:19:20: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [90]' {aka 'std::__cxx11::basic_string<char> [90]'})
19 | cin>>in;
| ~~~^~~~
| | |
| ... |
s523673572 | p00015 | C++ | #include<iostream>
#include<stdio.h>
#include <algorithm>
#include<string.h>
#include <utility>
using namespace std;
using namespace std;
int main(){
int m;
string in,in2;
int a[90],b[90],ans[90];
int f;
int alen,blen,mlen;
cin>>m;
while(m--){
for(int i=0;i<90;i++){
a[i]=b[i]=ans[i]=0;
}
cin>>in;
cin>... | a.cc: In function 'int main()':
a.cc:54:2: error: expected '}' at end of input
54 | }
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s398414048 | p00015 | C++ | #include <stdio.h>
#include <string.h>
int main(void)
{
char str[2][1000];
int b, s;
int len[2];
int i, j;
int n;
int flag;
scanf("%d", &n);
while (n){
for (i = 0; i < 1000; i++){
str[0][i] = str[1][i] = 0;
}
s = 1;
b = 0;
for (i = 0; i < 2; i++){
scanf("%s", str[i]);
len[i] = strlen(str... | a.cc: In function 'int main()':
a.cc:27:17: error: 'else' without a previous 'if'
27 | else {
| ^~~~
|
s203192581 | p00015 | C++ | int add(char *retstr, char *str1, char *str2){
int str1len=strlen(str1);
int str2len=strlen(str2);
char ad,i1,i2;
char offset1,offset2;
char c1,c2;
bool carry=false;
if(str1len>str2len){
offset1=0;
offset2=str1len-str2len;
}else{
offset1=str2len-str1len;
offset2=0;
}
for(int i=max(str1len,str2len);... | a.cc: In function 'int add(char*, char*, char*)':
a.cc:3:21: error: 'strlen' was not declared in this scope
3 | int str1len=strlen(str1);
| ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
+++ |+#include <cs... |
s409316927 | p00015 | C++ | int add(char *retstr, char *str1, char *str2){
int str1len=strlen(str1);
int str2len=strlen(str2);
char ad,i1,i2;
char offset1,offset2;
char c1,c2;
bool carry=false;
if(str1len>str2len){
offset1=0;
offset2=str1len-str2len;
}else{
offset1=str2len-str1len;
offset2=0;
}
for(int i=max(str1len,str2len);... | a.cc: In function 'int add(char*, char*, char*)':
a.cc:3:21: error: 'strlen' was not declared in this scope
3 | int str1len=strlen(str1);
| ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
+++ |+#include <cs... |
s380335542 | p00015 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
int y;
scanf("%d",&y);
for(int z = 0;z < y;z++)
{
char suji1[82],suji2[82];
char ans[82] = {0};
for(int i = 0;i<82;i++)
{
suji1[i] = '0';
suji2[i] ='0';
}
int overflow = 0;
scanf("%s",suji1);
scanf("%s",suji2);
int... | a.cc: In function 'int main()':
a.cc:23:30: error: 'strlen' was not declared in this scope
23 | int suji1s = strlen(suji1);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<a... |
s645942711 | p00015 | C++ | #include <cstdlib>
#include <iostream>
#include <string>
#define MAX_DIGITS 80
int main(int argc, const char * argv[])
{
using namespace std;
string num1, num2, result;
int count;
cin >> count;
for (int i = 0; i < count; ++i) {
cin >> num1 >> num2;
if (num1.size() > MAX_DIGITS || n... | a.cc: In function 'int main(int, const char**)':
a.cc:20:13: error: 'reverse' was not declared in this scope
20 | reverse(num1.begin(), num1.end());
| ^~~~~~~
|
s782041934 | p00015 | C++ | #include <iostream>
#include <stdio.h>
#include <stack>
using namespace std;
int main() {
int k,a,b,c,d,i,j,s;
stack<int> st[3];
char n[2][1000];
cin >> d;
for (d;d>0;d--) {
cin >> n[0] >> n[1];
if (strlen(n[0])>80 || strlen(n[1])>80) { cout << "overflow" << endl; continue;}
for (i=0;i<2;i++) for (j=0;n[i][j]!... | a.cc: In function 'int main()':
a.cc:13:13: error: 'strlen' was not declared in this scope
13 | if (strlen(n[0])>80 || strlen(n[1])>80) { cout << "overflow" << endl; continue;}
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <... |
s846435595 | p00015 | C++ | #include <iostream>
#include <stdio.h>
#include <stack>
using namespace std;
int main() {
int k,a,b,c,d,i,j,s;
stack<int> st[3];
char n[2][1000];
cin >> d;
for (d;d>0;d--) {
cin >> n[0] >> n[1];
if (strlen(n[0])>80 || strlen(n[1])>80) { cout << "overflow" << endl; continue;}
for (i=0;i<2;i++) for (j=0;n[i][j]!... | a.cc: In function 'int main()':
a.cc:13:13: error: 'strlen' was not declared in this scope
13 | if (strlen(n[0])>80 || strlen(n[1])>80) { cout << "overflow" << endl; continue;}
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <... |
s573501426 | p00015 | C++ | #include<algorithm>
#include<stdio.h>
#include<iostream>
using namespace std;
int main(){
int n,l,m,c;
char a[90],b[90];
cin >> n;
for(int i=0;i<n;i++){
char s[90] = {0};
scanf("%s%s",a,b);
l = strlen(a);
m = strlen(b);
reverse(a,a+l);
reverse(b,b+m);
c=0;
for(int j=0;j<max(l,m);j++){
int o=c;
... | a.cc: In function 'int main()':
a.cc:13:21: error: 'strlen' was not declared in this scope
13 | l = strlen(a);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<iostream>
+++ |+#incl... |
s959841057 | p00015 | C++ | #include<algorithm>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
using namespace std;
int main(){
int n,l,m,c;
char a[90],b[90],s[90];
cin >> n;
for(int i=0;i<n;i++){
for(int j=0;j<90;j++)s[j]=0;
scanf("%s%s",a,b);
l = strlen(a);
m = strlen(b);
reverse(a,a+l);
reverse(b,b+m);
c=0;
for(in... | a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope
10 | cin >> n;
| ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
4 | #include<string.h>
+++ |+#include <iostream>
5 |
|
s794963573 | p00015 | C++ | test | a.cc:1:1: error: 'test' does not name a type
1 | test
| ^~~~
|
s421988438 | p00015 | C++ | n = gets.to_i
n.times do
a,b = gets.to_i,gets.to_i
str = if (a+b) < 10**80 then (a+b) else "overflow" end
puts str
end | a.cc:1:1: error: 'n' does not name a type
1 | n = gets.to_i
| ^
|
s351854768 | p00015 | C++ | #include <iostream>
using namespace std;
int main()
{
int x,a,b,h;
cin>>x;
for(int i=0; i<x; i++)
{
while(true)
{
cin>>a>>b;
if(a.size()>=80||b.size()>=80) break;
else
{
cout<<a+b<<endl;
}
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:8: error: request for member 'size' in 'a', which is of non-class type 'int'
13 | if(a.size()>=80||b.size()>=80) break;
| ^~~~
a.cc:13:22: error: request for member 'size' in 'b', which is of non-class type 'int'
13 | if(a.size()>=80||b.size()>=80) break;
... |
s960557258 | p00015 | C++ | #include <iostream>
using namespace std;
int main()
{
int x,h;
double a,b;
cin>>x;
for(int i=0; i<x; i++)
{
while(true)
{
cin>>a>>b;
if(a.size()>=80||b.size()>=80) break;
else
{
cout<<a+b<<endl;
}
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:14:8: error: request for member 'size' in 'a', which is of non-class type 'double'
14 | if(a.size()>=80||b.size()>=80) break;
| ^~~~
a.cc:14:22: error: request for member 'size' in 'b', which is of non-class type 'double'
14 | if(a.size()>=80||b.size()>=80) br... |
s864912729 | p00015 | C++ | gets;15.times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)} | a.cc:1:1: error: 'gets' does not name a type
1 | gets;15.times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)}
| ^~~~
a.cc:1:6: error: expected unqualified-id before numeric constant
1 | gets;15.times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)}
| ^~~~~~~~
|
s085994294 | p00015 | C++ | (n=gets.to_i).times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)} | a.cc:1:3: error: expected ')' before '=' token
1 | (n=gets.to_i).times{puts((a=gets.to_i+gets.to_i)>=10**80?"overfllow":a)}
| ~ ^
| )
|
s566372830 | p00015 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <c... | a.cc: In function 'std::string add(std::string, std::string)':
a.cc:88:41: error: expected ';' before 'return'
88 | if(r.size()>80)return "overflow"
| ^
| ;
89 | return r;
| ~~~~~~ ... |
s526513488 | p00015 | C++ | #include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;
const int DIGIT=9;
int main() {
int n;
char buf[81];
int l, x[2], y, z;
char buf_part[DIGIT+1];
int a[2][9];
int b[9];
cin >> n;
while (n--) {
for (int i=0; i<2; i++) {
cin >> buf;
l = strlen(buf);
x[i... | a.cc: In function 'int main()':
a.cc:63:2: error: expected '}' at end of input
63 | }
| ^
a.cc:7:12: note: to match this '{'
7 | int main() {
| ^
|
s188989571 | p00015 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <math.h>
#include <stack>
using namespace std;
int main(){
char d[81];
char e[81];
stack<char> st1;
stack<char> st2;
stack<int> st3;
int n=0;
scanf("%d",&n);
for(int i=0; i<n; i++){
sca... | a.cc: In function 'int main()':
a.cc:25:12: error: 'strlen' was not declared in this scope
25 | if(strlen(d)>80||strlen(e)>80){
| ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <stack>
+++ |+#includ... |
s888392250 | p00015 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <math.h>
#include <stack>
using namespace std;
int main(){
char d[81];
char e[81];
stack<char> st1;
stack<char> st2;
stack<int> st3;
int n=0;
scanf("%d",&n);
for(int i=0; i<n; i++){
sca... | a.cc: In function 'int main()':
a.cc:25:18: error: 'strlen' was not declared in this scope
25 | if((int)(strlen(d))>80||(int)(strlen(e))>80){
| ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <st... |
s001635539 | p00015 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <math.h>
#include <stack>
using namespace std;
int main(){
char d[81];
char e[81];
stack<char> st1;
stack<char> st2;
stack<int> st3;
int n=0;
scanf("%d",&n);
for(int i=0; i<n; i++){
sca... | a.cc: In function 'int main()':
a.cc:28:34: error: 'strlen' was not declared in this scope
28 | for(int j=0; j<(int)(strlen(d)); j++){
| ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 |... |
s314470390 | p00015 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
int n,i,j;
cin >> n;
for(i=0;i<n;i++){
string str1,str2,temp;
int kuriagari=0;
cin >> str1 >> str2;
if (str1.size()<str2.size()){
temp = str1;
str1 = str2;
str2 = temp;
}
int goukei[str1.siz... | a.cc: In function 'int main()':
a.cc:44:9: error: 'str' was not declared in this scope; did you mean 'str2'?
44 | if (str.size()>81)||( (str.size()==80)&&(goukei[0]==1) ){
| ^~~
| str2
a.cc:44:23: error: expected primary-expression before '||' token
44 | if (str.size()>81)||( (... |
s009779054 | 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]-... | a.cc: In function 'int main()':
a.cc:19:18: error: too many arguments to function 'int puts(const char*)'
19 | else puts("%s",&c[cp]);
| ~~~~^~~~~~~~~~~~~
In file included from a.cc:1:
/usr/include/stdio.h:714:12: note: declared here
714 | extern int puts (const char *__s);
| ... |
s247151602 | p00015 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main(){
int j;
int n;
char s1[111];
char tmp[111];
char s2[111];
char ans[111];
int kuri = 0;
cin >> n;
while(n--){
memset(ans,0,sizeof(ans));
memset(s1,0,sizeof(s1));
memset(s2,0,sizeof(s2));
memset(tmp,0,sizeof(tmp));)
cin >... | a.cc: In function 'int main()':
a.cc:18:29: error: expected primary-expression before ')' token
18 | memset(tmp,0,sizeof(tmp));)
| ^
|
s387256799 | p00015 | C++ | #include <stdio.h>
#include <string.h>
int main(){
int n,ans[100],kuri,i,j,ap,bp;
char a[1000],b[1000];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s%s",a,b);
if(strlen(a)>80||strlen(b)>80){
printf("overflow\n");
continue;
}
ap=strlen(a)-1;
bp=strlen(b)-1;
j=0;
kuri=0;
while(ap>=0||bp>=0){
ans[j]=kuri;
if(ap>=0)ans[j]+=... | a.cc: In function 'int main()':
a.cc:28:4: error: 'agari' was not declared in this scope
28 | if(agari==1)ans[j]==1;
| ^~~~~
|
s167919180 | p00015 | C++ | #include <iostream>
#include <string>
// #include <algorithm>
using namespace std;
int main() {
int tcase;
cin >> tcase;
while(tcase--) {
string A, B, C = "";
cin >> A >> B;
unsigned sz = max(A.size(), B.size());
while(A.size()<sz) A = '0' + A;
while(B.size()<sz) B = '0' + B;
int... | a.cc: In function 'int main()':
a.cc:27:5: error: 'reverse' was not declared in this scope
27 | reverse(C.begin(), C.end());
| ^~~~~~~
|
s924016122 | p00015 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#define MAX 1000
//99999999999999999999999999999999999999999999999999999999999999999999999999999999
using namespace std;
int main()
{
int n = 0;
string in[2];
char out[MAX] = {NULL};
cin >> n;
for (int i = 0; i < n; i++){
in[0].resize(0);
in[1].... | a.cc: In function 'int main()':
a.cc:18:30: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
18 | char out[MAX] = {NULL};
| ^
a.cc:52:21: error: redeclaration of 'int i'
52 | int i = 0;
| ^
a.cc:22:18:... |
s120624634 | p00015 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
int n;
cin >> n;
for(int i=0;i<n;i++){
int len,mlen=0;
char val[2][81]={0},tmp[81],crr=0;
for(int j=0;j<2;j++){
cin >> tmp;
len = strlen(tmp);
mlen = mlen>len?mlen:len;
for(int k=0;k<len;k++)
val[j][len-1-k]=tmp[k]-0... | a.cc: In function 'int main()':
a.cc:16:31: error: 'strlen' was not declared in this scope
16 | len = strlen(tmp);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <... |
s514748738 | p00015 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
int n;
cin >> n;
while(n--){
int len,big;
string val[2];
bool crr=false;
for(int j=0;j<2;j++){
cin >> val[j];
reverse(val[j].begin(),val[j].end());
}
big=val[0].size()>=val[1].size()?0:1;
val[1-big].append((len=val[bi... | a.cc: In function 'int main()':
a.cc:17:25: error: 'reverse' was not declared in this scope
17 | reverse(val[j].begin(),val[j].end());
| ^~~~~~~
a.cc:38:25: error: 'reverse' was not declared in this scope
38 | reverse(val[0].begin(),val... |
s858694360 | p00015 | C++ | //Aizu - 0015 : National Budget
#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-... | a.cc: In function 'int main()':
a.cc:42:33: error: break statement not within loop or switch
42 | break;
| ^~~~~
a.cc: At global scope:
a.cc:46:17: error: expected unqualified-id before 'while'
46 | while(1)
| ... |
s221548709 | p00015 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
string s1, s2, temp;
int sum, flag;
int a, b;
vector<int> v;
int T;
cin >> T;
while (T--)
{
cin >> s1 >> s2;
v.clear();
sum = 0;
flag = 0;
reverse(s1.begin(), s1.end());
reverse(s2.begin(), s2.end());
if (s1... | a.cc: In function 'int main()':
a.cc:20:17: error: 'reverse' was not declared in this scope
20 | reverse(s1.begin(), s1.end());
| ^~~~~~~
|
s651967366 | p00015 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#include <cstring>
using namespace std;
int main(){
int n;
cin >> n;
while( n-- > 0 ){
string num1, num2;
cin >> num1 >> num2;
char sum[101];
int degit = 0;
for( int i = 0; i < 101; i++ ) sum[i] = '0';
for( int i = 0; i < num1.size(); i++ ){
sum... | a.cc: In function 'int main()':
a.cc:34:21: error: redeclaration of 'int d'
34 | int d = 3;
| ^
a.cc:19:21: note: 'int d' previously declared here
19 | int d;
| ^
|
s945063361 | p00015 | C++ | #include <cstdio>
2 #include <iostream>
3 #include <vector>
4 #include <cstring>
5 using namespace std;
6
7 int main(){
8 int n;
9 cin >> n;
10 while( n-- > 0 ){
11 string num1, num2;
12 cin >> num1 >> num2;
13 char sum[101];
14 int degit = 0;
15 for( int i = 0; i < 101;... | a.cc:2:5: error: stray '#' in program
2 | 2 #include <iostream>
| ^
a.cc:3:5: error: stray '#' in program
3 | 3 #include <vector>
| ^
a.cc:4:5: error: stray '#' in program
4 | 4 #include <cstring>
| ^
a.cc:2:3: error: expected unqualified-id before numeric constant
2 ... |
s284020159 | p00015 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#include <cstring>
using namespace std;
int main(){
int n;
cin >> n;
while( n-- > 0 ){
string num1, num2;
cin >> num1 >> num2;
char sum[101];
int degit = 0;
for( int i = 0; i < 101; i++ ) sum[i] = '0';
for( int i = 0; i < num1.size(); i++ ){
sum... | a.cc: In function 'int main()':
a.cc:23:114: error: expected ')' before ';' token
23 | now = (int)sum[100-i]-(int)('0') + (int)(num2[num2.size()-i-1]-(int)('0') + degit;
| ~ ... |
s848681377 | p00015 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <sstream>
class BigInteger {
// use 18 digit a element
std::vector<uint64_t> splited_num_;
public:
BigInteger(std::string str) {
set_data(str);
}
BigInteger(std::vector<uint64_t>&& splited_num) ... | a.cc:8:21: error: 'uint64_t' was not declared in this scope
8 | std::vector<uint64_t> splited_num_;
| ^~~~~~~~
a.cc:5:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
4 | #include <sstream>
+++ |+#include <cstdi... |
s167901639 | p00015 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <sstream>
class BigInteger {
// use 18 digit a element
std::vector<uint64_t> splited_num_;
public:
BigInteger(std::string str) {
set_data(str);
}
BigInteger(std::vector<uint64_t>&& splited_num) ... | a.cc:8:21: error: 'uint64_t' was not declared in this scope
8 | std::vector<uint64_t> splited_num_;
| ^~~~~~~~
a.cc:5:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
4 | #include <sstream>
+++ |+#include <cstdi... |
s717923575 | p00015 | C++ | #include <iostream>
#include <iomanip>
#include <cassert>
#include <string>
using namespace std;
typedef long long ll;
const ll BASE = 10000;
const int LogB = 4;
const int MAX_DIGIT = 100;
struct Bigint {
ll digit[MAX_DIGIT];
int size;
Bigint (int sz = 1, ll a = 0) : size(sz) {
memset(digit, 0, sizeof(digit));... | a.cc: In constructor 'Bigint::Bigint(int, ll)':
a.cc:18:17: error: 'memset' was not declared in this scope
18 | memset(digit, 0, sizeof(digit));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #i... |
s123706603 | p00015 | C++ | #include "string.h"
#include "math.h"
#include "stdio.h"
#include <iostream>
using namespace std;
/** Problem0015 : National Budget **/
int main()
{
string a, b, s;
int n, tmp, la, lb;
bool up=false;
cin >> n;
for (int i=0; i<n; i++) {
cin >> a >> b;
s="";
reverse(a.begin(), a.end());
reverse(b.begin... | a.cc: In function 'int main()':
a.cc:19:17: error: 'reverse' was not declared in this scope
19 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s717604455 | p00015 | C++ | #include <string>
#include <iostream>
using namespace std;
/** Problem0015 : National Budget **/
int main()
{
string a, b, s;
int n, tmp, la, lb;
bool up=false;
cin >> n;
for (int i=0; i<n; i++) {
cin >> a >> b;
s="";
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
la=(int)a.length();
l... | a.cc: In function 'int main()':
a.cc:17:17: error: 'reverse' was not declared in this scope
17 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s443687111 | p00015 | C++ | #include <string>
#include <iostream>
using namespace std;
/** Problem0015 : National Budget **/
int main()
{
string a, b, s;
int n, tmp, la, lb;
bool up=false;
cin >> n;
for (int i=0; i<n; i++) {
cin >> a >> b;
s="";
std::reverse(a.begin(), a.end());
std::reverse(b.begin(), b.end());
la=(int)a.len... | a.cc: In function 'int main()':
a.cc:17:22: error: 'reverse' is not a member of 'std'
17 | std::reverse(a.begin(), a.end());
| ^~~~~~~
a.cc:18:22: error: 'reverse' is not a member of 'std'
18 | std::reverse(b.begin(), b.end());
| ... |
s526355130 | p00015 | C++ | using namespace std;
void sum80(int* a, int* b);
int get80(string str, int* num);
int main(void){
string a80, b80;
int a[81], b[81];
int i, N;
cin>>N;
i=0;
while(i<N){
cin>>a80;
cin>>b80;
if(get80(a80, a)<0 || get80(b80, b)<0){
cout<<"overflow"<<endl;
}else{
sum80(a, b);
}
i++;
}
return 0;
}... | a.cc:4:11: error: 'string' was not declared in this scope
4 | int get80(string str, int* num);
| ^~~~~~
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:4:23: error: expec... |
s611485909 | p00015 | C++ | #include <iostream>
#include <string>
using namespace std;
int main () {
int n;
string a, b;
cin >> n;
for(int i=0;i<n;i++){
int x[81]={0}, y[81]={0}, z[81]={0};
cin >> a;
cin >> b;
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());... | a.cc: In function 'int main()':
a.cc:17:9: error: 'reverse' was not declared in this scope
17 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s063682884 | p00016 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
private static final String REGIX_COMMA = ",";
private static final int MAX_ANGLE = 180;
private static final String EOF = "0,0";
public static void main(String[] args) {
try {
... | Main.java:36: error: cannot find symbol
in.close();
^
symbol: variable in
location: class Main
1 error
|
s852881857 | p00016 | Java | import java.util.Scanner;
import java.math.BigDecimal;
class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
double x=0;
double y=0;
double rad=Math.PI/2;
while(sc.hasNext()){
String[] s=sc.next().split(",");
int dis=Integer.parseInt(s[0]);
x+=dis*Math.cos(rad);
y+=dis*Math.sin(rad);
... | Main.java:20: error: cannot find symbol
x=x.setScale(0,ROUND_DOWN);
^
symbol: variable ROUND_DOWN
location: class Main
Main.java:20: error: double cannot be dereferenced
x=x.setScale(0,ROUND_DOWN);
^
Main.java:21: error: cannot find symbol
y=y.setScale(0,ROUND_DOWN);
^
symbol: ... |
s450793031 | p00016 | Java | import java.util.Scanner;
import java.math.BigDecimal;
class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
double x=0;
double y=0;
double rad=Math.PI/2;
while(sc.hasNext()){
String[] s=sc.next().split(",");
int dis=Integer.parseInt(s[0]);
x+=dis*Math.cos(rad);
y+=dis*Math.sin(rad);
... | Main.java:20: error: double cannot be dereferenced
x=x.setScale(0,BigDecimal.ROUND_DOWN);
^
Main.java:21: error: double cannot be dereferenced
y=y.setScale(0,BigDecimal.ROUND_DOWN);
^
Note: Main.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
|
s608532207 | p00016 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class gettrezya {
public static void main(String[] aegs){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int a = 0,c=0;
String t = "";
double counta =0,countb = 0;
double rad = 90.... | Main.java:6: error: class gettrezya is public, should be declared in a file named gettrezya.java
public class gettrezya {
^
1 error
|
s331403452 | p00016 | Java | import java.util.Scanner;
class Main {
private static final Scanner scan = new Scanner(System.in)
.useDelimiter("[ \t\n,]");
public static void main(String[] args){
double x = 0;
double y = 0;
int ang = 90;
for(;;){
int d = scan.nextInt();
int a = scan.nextInt();
... | Main.java:16: error: ')' or ',' expected
x += d * Math.cos(Math.toRadians((double) ang);
^
Main.java:17: error: ')' or ',' expected
y += d * Math.sin(Math.toRadians((double) ang);
^
2 errors
|
s110077376 | p00016 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
int ang = 90;
for(;;){
int d = scan.nextInt();
int a = scan.nextInt();
if(d == 0 && a == 0){
break;
}
double x = (double) d * Math.cos(Math.toRadians((dou... | Main.java:18: error: cannot find symbol
System.out.printf("%d\n", (int) x);
^
symbol: variable x
location: class Main
Main.java:19: error: cannot find symbol
System.out.printf("%d\n", (int) y);
^
symbol: variable y
location: class Main
... |
s704867690 | p00016 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in).useDelimiter("[ \t\n,]);
public static void main(String[] args){
double x = 0;
double y = 0;
int ang = 90;
for(;;){
int d = scan.nextInt();
int a = scan.nextInt();
if(d == 0 && a == 0){
break;
}... | Main.java:4: error: unclosed string literal
private static final Scanner scan = new Scanner(System.in).useDelimiter("[ \t\n,]);
^
1 error
|
s480429658 | p00016 | Java | import java.util.*;
public class Main2{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double x = 0.0;
double y = 0.0;
double angle = 0.0;
while(sc.hasNext()){
String[] line = (sc.next()).split(",");
int step = Integer.parseInt(line[0]);
int dir = Integer.parseIn... | Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2{
^
1 error
|
s566385496 | p00016 | C | #incl ude <stdio.h>
#include <math.h>
#define PI 3.141592
int main(void) {
int angle = 0;
double x = 0, y = 0;
double rad;
int step, rotate;
scanf("%d,%d", &step, &rotate);
while (step != 0 || rotate != 0) {
rad = (double)(angle % 90) * PI / 180.0;
if( angle == 0)
y += (double)step;
else if( angle <... | main.c:1:2: error: invalid preprocessing directive #incl; did you mean #include?
1 | #incl ude <stdio.h>
| ^~~~
| include
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
11 | scanf("%d,%d", &step, &rotate);
| ... |
s822657593 | p00016 | C | #incl ude <stdio.h>
#include <math.h>
#define PI 3.141592
int main(void) {
int angle = 0;
double x = 0, y = 0;
double rad;
int step, rotate;
scanf("%d,%d", &step, &rotate);
while (step != 0 || rotate != 0) {
rad = (double)(angle % 90) * PI / 180.0;
if( angle == 0)
y += (double)step;
else if( angle <... | main.c:1:2: error: invalid preprocessing directive #incl; did you mean #include?
1 | #incl ude <stdio.h>
| ^~~~
| include
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
11 | scanf("%d,%d", &step, &rotate);
| ... |
s502516786 | p00016 | C | #incl ude <stdio.h>
#include <math.h>
#define PI 3.141592
int main(void) {
int angle = 0;
double x = 0.0, y = 0.0;
double rad;
int step, rotate;
scanf("%d,%d", &step, &rotate);
while (step != 0 || rotate != 0) {
rad = (double)(angle % 90) * PI / 180.0;
if( angle == 0)
y += (double)step;
else if( ang... | main.c:1:2: error: invalid preprocessing directive #incl; did you mean #include?
1 | #incl ude <stdio.h>
| ^~~~
| include
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
11 | scanf("%d,%d", &step, &rotate);
| ... |
s961944306 | p00016 | C | #include<stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
int main(void) {
double x = 0, y = 0;
while (1) {
double arg2 = M_PI / 180.0;
int arg1 = 90;
int Arg = 0, Len = 0;
scanf("%d,%d", &Len, &Arg);
if (Len == 0 && Arg == 0) {
break;
}
else {
arg1 -= Arg;
arg2 += (arg1 % 360)*M_PI / 180.... | main.c: In function 'main':
main.c:20:1: error: expected expression before '?' token
20 | ????????????????????????????????????continue;
| ^
|
s061667375 | p00016 | C | #include<stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
int main(void) {
double x = 0, y = 0;
while (1) {
double arg2 = M_PI / 180.0;
int arg1 = 90;
int Arg = 0, Len = 0;
scanf("%d,%d", &Len, &Arg);
if (Len == 0 && Arg == 0) {
break;
}
else {
arg1 -= Arg;
arg2 += (arg1 % 360)*M_PI / 180.... | main.c: In function 'main':
main.c:20:1: error: expected expression before '?' token
20 | ?????????????????????????????????
| ^
|
s051708833 | p00016 | C | #include<stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
int main(void) {
while (1) {
double x = 0, y = 0;
double arg2 = 0;
int arg1 = 90;
int Arg = 0, Len = 0;
scanf("%d,%d", &Len, &Arg);
if (Len == 0 && Arg == 0) {
break;
}
else {
arg1 -= Arg;
arg2 += (arg1 % 360)*M_PI / ... | main.c: In function 'main':
main.c:22:33: error: 'x' undeclared (first use in this function)
22 | printf("%d\n%d\n", (int)x, (int)y);
| ^
main.c:22:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:41: error: 'y' undecla... |
s046210040 | p00016 | C | #include <stdio.h>
#include <math.h>
int main(int argc,char* argv[]){
double x,y;
double rad;
int run;
int shita;
x = y = 0;
rad = m_PI / 2;
for(;;){
scanf("%d,%d",&run,&shita);
if(run == 0 && shita == 0){
break;
}
x += cos(rad) * run;
y += sin(rad) * run;
rad -= shit... | main.c: In function 'main':
main.c:10:9: error: 'm_PI' undeclared (first use in this function); did you mean 'M_PI'?
10 | rad = m_PI / 2;
| ^~~~
| M_PI
main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
|
s771003371 | p00016 | C | #include<iostream>
#include<math.h>
#define PI 3.14159265359
using namespace std;
int main(){
int n,r;
char c;
double nx=0,ny=0;
int nr=90;
while(cin>>n>>c>>r &&n+r){
nx+=cos(nr*PI/180.0)*n;
ny+=sin(nr*PI/180.0)*n;
nr+=-1*r;
}
cout<<(int)nx<<endl<<(int)ny<<e... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s076912952 | p00016 | C | #include<iostream>
#include<math.h>
#define PI 3.14159265359
using namespace std;
int main(){
int n,r;
char c;
double nx=0,ny=0;
int nr=90;
while(cin>>n>>c>>r &&n+r){
nx+=cos(nr*PI/180.0)*n;
ny+=sin(nr*PI/180.0)*n;
nr+=-1*r;
}
cout<<(int)nx<<endl<<(int)ny<<e... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s863671793 | p00016 | C | #include "stdafx.h"
#include <math.h> /* cos */
double last_turn;
#define PI 3.14159265
double walk(double go,double turn,double* x,double* y) {
*x -= go * sin(last_turn* PI / 180.0);
*y += go * cos(last_turn* PI / 180.0);
return -turn;
}
int main(void)
{
double gx = 0,gy = 0,now_x = 0, now_y = 0;
d... | main.c:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s893250837 | p00016 | C | #include "stdafx.h"
#include <math.h> /* cos */
double last_turn;
#define PI 3.14159265
double walk(double go,double turn,double* x,double* y) {
*x -= go * sin(last_turn* PI / 180.0);
*y += go * cos(last_turn* PI / 180.0);
return -turn;
}
int main()
{
double gx = 0,gy = 0,now_x = 0, now_y = 0;
doubl... | main.c:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s602632472 | p00016 | C | #include <stdio.h>
#include <math.h>
#define PI 3.141592653589
int main()
{
double x = 0, y = 0, angle = 90;
double d, a;
while (1) {
scanf("%f,%f", &d, &a);
if (d == 0 && a == 0)
break;
x += cos(angle * PI / 180.0) * d;
y += sin(angle * PI / 180.0) * d;
angle -= a;
}
printf("%... | main.c: In function 'main':
main.c:22:22: error: expected expression before 'int'
22 | printf("%d\n%d\n", int(x), int(y));
| ^~~
|
s708501427 | p00016 | C | #include <stdio.h>
#include <math.h>
int main(void)
{
double x, y, r;
double d, a;
x = y = 0.0;
r = 90.0;
while (true){
scanf("%lf,%lf", &d, &a);
if (d == 0.0 && a == 0.0){
break;
}
x += cos(r / 180 * M_PI) * d;
y += sin(r / 180 * M_PI) * d;
r -= a;
}
printf("%d\n%d\n", (... | main.c: In function 'main':
main.c:11:10: error: 'true' undeclared (first use in this function)
11 | while (true){
| ^~~~
main.c:3:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
2 | #include <math.h>
+++ |+#include <stdbool.h>
... |
s491387768 | p00016 | C | #include<stdio.h>
int main(){
int angle=90,m,n;
double x=0,y=0;
while(scanf("%d,%d",&m,&n),m||n){
x+=m*cos(pai*angle/180);
y+=m*sin(pai*angle/180);
angle=(angle-n)%360;
}
printf("%d\n%d\n",(int)x,(int)y);
return 0;
} | main.c: In function 'main':
main.c:6:6: error: implicit declaration of function 'cos' [-Wimplicit-function-declaration]
6 | x+=m*cos(pai*angle/180);
| ^~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'cos'
1 | #include<stdio.h>
+++ |+#include <math.h>
2 | int main(){
main.c:... |
s567492626 | p00016 | C | d;
double x,y,c;
main(s)
{
for(;~scanf("%d,%d",&s,&d);c+=d*M_PI/180)
x+=s*sin(c),y+=s*cos(c);
exit(!printf("%d\n%d\n",d=x,s=y));
} | main.c:1:1: warning: data definition has no type or storage class
1 | d;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(s)
| ^~~~
main.c: In function 'main':
main.c:3:1: error: type of 's... |
s050510484 | p00016 | C | #include <stdio.h>
int main(void){
float d , r , x = 0 , y = 0 , r_now = 90;
while(1){
scanf("%f,%f" , &d , &r);
if(d==0&&r==0) break;
x += d * cos(r_now * M_PI / 180);
y += d * sin(r_now * M_PI / 180);
r_now -= r;
}
printf("%d\n%d\n" , (int)x , (int)y);
return 0;
} | main.c: In function 'main':
main.c:8:26: error: implicit declaration of function 'cos' [-Wimplicit-function-declaration]
8 | x += d * cos(r_now * M_PI / 180);
| ^~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'cos'
1 | #include <stdio.h>
+++ ... |
s204221593 | p00016 | C | #include <stdio.h>
#include <math.h>
int main(){
int dist, rad;
int rad_amount;
double x, y;
int a, b;
double TRANS=3.14159/180.0;
x=0.0; y=0.0; rad_amount=0;
while(1){
scanf("%d,%d", &dist, &rad);
if(dist==0 && rad==0) break;
x+=(double)dist*sin((double)rad_amount*TRANS);
y+=(double)dis... | main.c: In function 'main':
main.c:21:42: error: stray '\302' in program
21 | printf("%.0lf\n%.0lf\n", x-floor(0.5), <U+0082><U+0099>-floor(0.5));
| ^~~~~~~~
main.c:21:43: error: stray '\302' in program
21 | printf("%.0lf\n%.0lf\n", x-floor(0.5), <U+0082><U+0099>... |
s457708255 | p00016 | C | float x,y,t;d;main(r){for(;~scanf("%d,%d",&r,&d)?y+=r*cos(t),x-=r*sin(t),t-=d/57.3:d=!printf("%d\n%d\n",d=x,d=y););} | main.c:1:13: warning: data definition has no type or storage class
1 | float x,y,t;d;main(r){for(;~scanf("%d,%d",&r,&d)?y+=r*cos(t),x-=r*sin(t),t-=d/57.3:d=!printf("%d\n%d\n",d=x,d=y););}
| ^
main.c:1:13: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:1:15: error: retu... |
s210871546 | p00016 | C | include <stdio.h>
#include <math.h>
#define PI 3.141592
int main(){
int a,b;
double v=.0,x=.0,y=.0;
while(scanf("%d,%d",&a,&b)){
if(a==0 && b==0)break;
x+=sin(v*PI/180)*a;
y+=cos(v*PI/180)*a;
v+=b;
}
printf("%.0f\n%.0f\n",x,y);
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
9 | while(scanf("%d,%d",&a,&b)){
| ^~~~~
main.c:3... |
s466268573 | p00016 | C | #include<stdio.h>
#include<math.h>
#define PI 3.141592
int main()
{
int a,b;
double x=0,y=0,r=90;
while(scanf("%d,%d",&a,&b) && a || b)
{
y+=a*sin((r/180)*PI);
x+=a*cos((r/180)*PI);
r-=b;
}
printf("%.0lf\n%.0lf",x,y);
return 0;
} | main.c: In function 'main':
main.c:15:1: error: stray '\343' in program
15 | <U+3000><U+3000><U+3000><U+3000>return 0;
| ^~~~~~~~
main.c:15:3: error: stray '\343' in program
15 | <U+3000><U+3000><U+3000><U+3000>return 0;
| ^~~~~~~~
main.c:15:5: error: stray '\343' in program
15 | <U+3000><U... |
s406492170 | p00016 | C | #include<stdio.h>
#include<math.h>
#define PAI 3.141592
int main()
{
double hos,x=0.0,y=0.0;
double rad[2]={90.0};
char c;
while(1)
{
scanf("%lf,%lf",&hos,rad+1);
if(hos==0.0 && rad==0.0)
break;
x+=hos*cos(rad[0]*PAI/180.0);
y+=hos*sin(rad[0]*PAI/180.0);
rad[0]-=rad[1];
}
printf("%d\n%d\n",(... | main.c: In function 'main':
main.c:14:35: error: invalid operands to binary == (have 'double *' and 'double')
14 | if(hos==0.0 && rad==0.0)
| ~~ ^~
| |
| double *
|
s678688740 | p00016 | C | #include <stdio.h>
#include <math.h>
int main()
{ int r,p;
double x,y;
scanf("%d,%d",&r,&p);
y=r;
t=p;
while(1){
scanf("%d,%d",&r,&p);
if(r==0&&p==0) break;
y+=r*sin(M_PI_2 - t*M_PI/180);
x+=r*cos(M_PI_2 - t*M_PI/180);
t=p;
}
printf("%d\n%d\n",(int)x,(int)y)
return 0;
} | main.c: In function 'main':
main.c:9:9: error: 't' undeclared (first use in this function)
9 | t=p;
| ^
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:41: error: expected ';' before 'return'
17 | printf("%d\n%d\n",(int)x,... |
s707685353 | p00016 | C | #include <stdio.h>
#include <math.h>
int main(){
int n,m;
int x,y;
x = y = 0;
for(;;){
scanf("%d,%d" ,&n ,&m);
if(n == 0 && m == 0) break;
x += n*cos(m);
y += n*sin(m);
}
printf("%d\n%d\n ,x ,y);
return 0;
}
| main.c: In function 'main':
main.c:19:10: warning: missing terminating " character
19 | printf("%d\n%d\n ,x ,y);
| ^
main.c:19:10: error: missing terminating " character
19 | printf("%d\n%d\n ,x ,y);
| ^~~~~~~~~~~~~~~~~
main.c:21:3: error: expected expression before 'return'
2... |
s577954285 | p00016 | C | #include<stdio.h>
#include<math.h>
int main(void)
{
double a,b,c=0;
double x=0.0,y=0.0;
for(;;){
scanf(''%lf,%lf'',&a,&c);
if(a==0||c==0)
break;
b+=c;
b=b*M_PAI/180;
x+=a*cos(b);
y+=a*sin(b);
}
printf(''%f %f\n'',x,y);
return 0;
} | main.c: In function 'main':
main.c:9:11: error: empty character constant
9 | scanf(''%lf,%lf'',&a,&c);
| ^~
main.c:9:14: error: 'lf' undeclared (first use in this function)
9 | scanf(''%lf,%lf'',&a,&c);
| ^~
main.c:9:14: note: each undeclared identifier is reported onl... |
s722193320 | p00016 | C | #include<stdio.h>
#include<math.h>
int main(void)
{
double a,b,c=0;
double x=0.0,y=0.0;
for(;;){
scanf("%lf,%lf",&a,&c);
if(a==0||c==0)
break;
b+=c;
b=b*M_PAI/180;
x+=a*cos(b);
y+=a*sin(b);
}
printf("%f %f\n",x,y);
return 0;
} | main.c: In function 'main':
main.c:13:9: error: 'M_PAI' undeclared (first use in this function); did you mean 'M_PI'?
13 | b=b*M_PAI/180;
| ^~~~~
| M_PI
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.