submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s448913190 | p00060 | C++ | int main(){
for(int a,b,c;std::cin>>a>>b>>c;){
int x=20-a-b,f=3;
if(x<a)f--;
if(x<b)f--;
if(x<c)f--;
std::cout<<((x-f>4)?"YES\n":"NO\n");
}
} | a.cc: In function 'int main()':
a.cc:2:28: error: 'cin' is not a member of 'std'
2 | for(int a,b,c;std::cin>>a>>b>>c;){
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
... |
s203663872 | p00061 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
class Main{
static class DataOfPCK{
int num;
int answer;
DataOfPCK(int num,int answer){
this.num=num; this.an... | Main.java:20: error: cannot find symbol
static final Comparator<DataOfPCK> ANSWER_ORDER=new AnswerOrderComprator();
^
symbol: class AnswerOrderComprator
location: class DataOfPCK
1 error
|
s082938765 | p00061 | Java | import java.util.*;
public class aoj0061 {
static final Scanner stdin = new Scanner(System.in);
public static void main(String[] args){
HashMap<String, Integer> map = new HashMap<String, Integer>();
TreeMap<Integer, Integer>rmap = new TreeMap<Integer, Integer>(Collections.reverseOrder());
while(true){
String... | Main.java:2: error: class aoj0061 is public, should be declared in a file named aoj0061.java
public class aoj0061 {
^
1 error
|
s356624324 | p00061 | Java | import java.util.*;
class main{
public static void Main(String args[]){
Scanner sc = new Scanner(System.in);
ArrayList <Integer>array = new ArrayList();
while(true){
String input = sc.next();
String[] ranks = input.split(",");
if(ranks[0] == ranks[1] && ... | Main.java:9: error: bad operand types for binary operator '=='
if(ranks[0] == ranks[1] && ranks[0] == 0){
^
first type: String
second type: int
Main.java:12: error: cannot find symbol
array.add(Integer.praseInt(ranks[1]));
... |
s023769028 | p00061 | Java | import java.util.*;
class main{
public static void Main(String args[]){
Scanner sc = new Scanner(System.in);
ArrayList <Integer>array = new ArrayList();
while(true){
String input = sc.next();
String[] ranks = input.split(",");
if(ranks[0] == ranks[1] && ... | Main.java:12: error: cannot find symbol
array.add(Integer.praseInt(ranks[1]));
^
symbol: method praseInt(String)
location: class Integer
Main.java:24: error: cannot find symbol
println(array.size() - count);
^
symbol: method println(int)... |
s129329360 | p00061 | Java | import java.util.*;
class main{
public static void Main(String args[]){
Scanner sc = new Scanner(System.in);
ArrayList <Integer>array = new ArrayList();
while(true){
String input = sc.next();
String[] ranks = input.split(",");
if(ranks[0] == ranks[1] && ... | Main.java:24: error: cannot find symbol
println(array.size() - count);
^
symbol: method println(int)
location: class main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
|
s629846884 | p00061 | Java | import java.util.*;
class main{
public static void Main(String args[]){
Scanner sc = new Scanner(System.in);
ArrayList <Integer>array = new ArrayList();
while(true){
String input = sc.next();
String[] ranks = input.split(",");
if(ranks[0] == ranks[1] && ... | Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
|
s055148426 | p00061 | Java | import java.util.*;
class main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
ArrayList <Integer>array = new ArrayList();
while(true){
String input = sc.next();
String[] ranks = input.split(",");
if(ranks[0] == ranks[1] && ... | Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
|
s362502990 | p00061 | C | #include <cstdio>
#include <algorithm>
using namespace std;
int main(){
int x[10000],y[10000],a,s,i=0,j,sum=0,z[10000]={};
while(1){
scanf("%d,%d",&s,&a);
if(s==0) break;
x[s-1]=a;
y[s-1]=x[s-1];
sum++;
}
sort(x,x+sum);
int r=100;
for(i=0;i<sum;i++){
for(j=0;j<sum;j++){
if(x[i]<x[j]){
if(r!=x[j])... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s190616375 | p00061 | C++ | #include<iostream>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
pair<int,int> fun[100];
int num,acc,tel,i=0,tmp;
int j,z;
while(1){
scanf("%d,%d",&num,&acc);
if(num == 0 && acc == 0) break;
fun[i] = make_pair(acc,num);
i++;
}
sort(fun,... | a.cc: In function 'int main()':
a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
18 | sort(fun,fun+i);
| ^~~~
| sqrt
|
s311493552 | p00061 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#define rep(n) for(int i=0; i<(n); i++)
#define pb(n) push_back((n))
//typedef long long ll;
using namespace st... | a.cc: In function 'int main()':
a.cc:31:13: error: no matching function for call to 'sort(std::vector<std::pair<int, int> >&, std::vector<std::pair<int, int> >::iterator)'
31 | sort(v,v.end());
| ~~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:... |
s773064666 | p00061 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
???int team[101],num=0,point,lank[101],co=0,flag=0;
???queue<int> que;
???string str;
???for(int i=1;i<101;i++)team[i]=-1;
???while(cin>>str){
??????if(str[0]=='0'&&str[2]=='0')break;
??????for(int i=0;;i++){
?????????if(str[i]==','){
????????????for(int j=0;j<i... | a.cc: In function 'int main()':
a.cc:5:1: error: expected primary-expression before '?' token
5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
| ^
a.cc:5:2: error: expected primary-expression before '?' token
5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
| ^
a.cc:5:3: error: expect... |
s098162648 | p00061 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
???int team[101],num=0,point,lank[101],co=0,flag=0;
???queue<int> que;
???string str;
???for(int i=1;i<101;i++)team[i]=-1;
???while(cin>>str){
??????if(str[0]=='0'&&str[2]=='0')break;
??????for(int i=0;;i++){
?????????if(str[i]==','){
????????????for(int j=0;j<i... | a.cc: In function 'int main()':
a.cc:5:1: error: expected primary-expression before '?' token
5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
| ^
a.cc:5:2: error: expected primary-expression before '?' token
5 | ???int team[101],num=0,point,lank[101],co=0,flag=0;
| ^
a.cc:5:3: error: expect... |
s514683031 | p00061 | C++ | #include<iostream>
#include<set>
#include<cstdio>
using namespace std;
int main() {
int a, b;
set<int> c;
int d[101];
while (scanf_s("%d,%d", &a, &b) && a != 0 && b != 0) {
c.insert(b);
d[a] = b;
}
int i = c.size();
while (cin >> a){
b = d[a];
set<int>::iterator it = c.end();
it--;
int sum = 0;
for... | a.cc: In function 'int main()':
a.cc:9:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
9 | while (scanf_s("%d,%d", &a, &b) && a != 0 && b != 0) {
| ^~~~~~~
| scanf
|
s056263300 | p00061 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <set>
using namespace std;
typedef pair<int,int> pp;
bool cmp( pp a , pp b){
return a.second < b.second;
}
int main(){
int a,b,n;
vector<pp> hello;
while(scanf("%d,%d",&a,&b) && a){
hello.push_back(make_pair(a,b));
}
vector<int> rank(hello.size... | a.cc: In function 'int main()':
a.cc:19:9: error: 'sort' was not declared in this scope; did you mean 'short'?
19 | sort(hello.begin(),hello.end(),cmp);
| ^~~~
| short
|
s198409699 | p00061 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
typedef pair<int,int> pp;
bool cmp( pp a , pp b){
return a.second > b.second;
}
int main(){
int a,b,n;
vector<pp> hello;
while(scanf("%d,%d",&a,&b) && a){
hello.push_back(make_pair(a,b));
}
vector... | a.cc: In function 'int main()':
a.cc:22:18: error: 'INT_MAX' was not declared in this scope
22 | int mi = INT_MAX;
| ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
5 | #include <algorithm>
+++ |+#include... |
s138313288 | p00061 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
... | a.cc:69:2: error: #endif without #if
69 | #endif
| ^~~~~
|
s788302355 | p00061 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int date[100000];
bool bit[31];
int did[31];
int main()
{
memset(bit,false,sizeof(bit));
while(true)
{
int a,b;
scanf("%d,%d",&a,&b);
if(a==0&&b==0)break;
bit[b]=true;
date[a]=b;
}
int k=1;
for(int i=30;i>-1;i--)
{
if(bit[i]==true)
{
d... | a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
12 | memset(bit,false,sizeof(bit));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
+++ |+#include ... |
s784023469 | p00061 | C++ | #include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
vector<int> da[31];
int main() {
int id,sc,n,i,j;
while (scanf("%d,%d",&id,&sc)) {
if (id==0 && sc==0) break;
da[sc].push_back(id);
}
while (cin >> id) {
n=0;
for (i=30;i>=0;i--) {
if (da[i].size()>0) {
n++;
for (j=0... | a.cc: In function 'int main()':
a.cc:22:18: error: expected '}' at end of input
22 | return 0;
| ^
a.cc:7:12: note: to match this '{'
7 | int main() {
| ^
|
s037576523 | p00061 | C++ | #include <iostream>
#include <string>
#include <cstdio>
#include <vector>
using namespace std;
struct P{
int num;
int point;
int rank;
static bool more (const P& left,const P& right){
return left.point > right.point;
}
};
int main(){
int n,cnt=0;
vector <P> data;
P tmp;
whi... | a.cc: In function 'int main()':
a.cc:26:5: error: 'sort' was not declared in this scope; did you mean 'short'?
26 | sort(data.begin(),data.end(),P::more);
| ^~~~
| short
|
s713921858 | p00061 | C++ | team = [0 for i in range(101)]
point= [[0 for i in range(2)] for i in range(31)]
while 1:
temp= map(int, raw_input().split(','))
if temp[0] ==0==temp[1]:
break
team[temp[0]]=temp[1]
if point[temp[1]][1]==0:
point[temp[1]][1]=1
for i in range(temp[1]+1):
point[i][0]+=1... | a.cc:1:1: error: 'team' does not name a type
1 | team = [0 for i in range(101)]
| ^~~~
|
s907526138 | p00061 | C++ | #include <algorithm>
#include <cstdio>
using namespace std;
int main(void){
pair<int,int> p[100];
int num,point,i = 0;
while(1){
scanf("%d,%d" ,&num ,&point);
if(num == 0 && point == 0) break;
p[i] = make_pair(-point,num);
i++;
}
sort(p,p+i);
int key;
while(cin >> key){
int ... | a.cc: In function 'int main()':
a.cc:20:9: error: 'cin' was not declared in this scope
20 | while(cin >> key){
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include <cstdio>
+++ |+#include <iostream>
3 | usi... |
s886994645 | p00061 | C++ | #include <algorithm>
using namespace std;
int main(void){
pair<int,int> p[101];
int num,point,i = 0;
char cm;
while(1){
cin >> num >> cm >> point;
if(num == 0 && point == 0) break;
p[i] = make_pair(-point,num);
i++;
}
sort(p,p+i);
int key;
while(cin >> key){
int cnt = 1;... | a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope
10 | cin >> num >> cm >> point;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <algorithm>
+++ |+#include <iostream>
... |
s674607805 | p00061 | C++ | #include<iostream>
#include<vector>
#include<map>
#include<string>
#include<cstdio>
using namespace std;
typedef pair<int,int>pii;
int main(void){
map<int,int>mp;
vector<pii>v;
while(true){
int a,b;
scanf("%d,%d",&a,&b);
if(a==0 && b==0)break;
v.push_back(pii(b,a));
}
sort(v.begin(),v.end());
reverse(... | a.cc: In function 'int main()':
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'?
21 | sort(v.begin(),v.end());
| ^~~~
| short
a.cc:22:9: error: 'reverse' was not declared in this scope
22 | reverse(v.begin(),v.end());
| ^~~~~~... |
s950838339 | p00062 | Java | import java.util.Scanner;
public class J0062{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int[] nums = new int[10];
while(sc.hasNext()){
String s = sc.next();
for(int i=0; i<10; i++)
nums[i] = Integer.parseInt("" + s.charAt(i));
for(int i=0; i<9; i++){
... | Main.java:3: error: class J0062 is public, should be declared in a file named J0062.java
public class J0062{
^
1 error
|
s363952918 | p00062 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int[] a = new int[10];
char[] s = sc.next().toCharArray();
for(int i=0;i<10;i++)a[i]=s[i]-'0';
for(int j=9;j>0;j--){
int[] b = new int[j];
for(int i... | Main.java:19: error: reached end of file while parsing
}
^
1 error
|
s197043748 | p00062 | Java | package main;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
public class WhatIsBottommost {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
String line = sc.nextLine();
int[... | Main.java:7: error: class WhatIsBottommost is public, should be declared in a file named WhatIsBottommost.java
public class WhatIsBottommost {
^
1 error
|
s127322329 | p00062 | Java | import java.util.Scanner;
public class aoj0062 {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int[] a = new int[10];
String str;;
while(scan.hasNext()){
str = scan.next();
char[] ch = str.toCharArray();
for(int i = 0; i < 10; i++){
a[i] = Integer.parseInt(""... | Main.java:3: error: class aoj0062 is public, should be declared in a file named aoj0062.java
public class aoj0062 {
^
1 error
|
s604943039 | p00062 | C | a[11],i;main(j){for(;;){for(i=11;i--;)(a[i]=getchar())+1||exit(0);for(i=10;--i;)for(j=0;j++<i;)a[j]+=a[j+1];i=(a[1]-6)%10+48;puts(&i);}} | main.c:1:1: warning: data definition has no type or storage class
1 | a[11],i;main(j){for(;;){for(i=11;i--;)(a[i]=getchar())+1||exit(0);for(i=10;--i;)for(j=0;j++<i;)a[j]+=a[j+1];i=(a[1]-6)%10+48;puts(&i);}}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:7: error:... |
s797886849 | p00062 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char num[10][10];
while(1) {
for(int i = 0; i < 10; ++i) {
if(!(cin >> num[0][i])) {
return 0;
}
num[0][i] -= '0';
}
for(int i = 1; i < 10; ++i) {
for(int j = ... | a.cc: In function 'int main()':
a.cc:26:6: error: expected '}' at end of input
26 | }
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s789333687 | p00062 | C++ | #include<iostream>
#include<stdio.h>
#include<ctype.h>
#include<string>
#include<cmath>
#include<math.h>
#include<vector>
#include<stdlib.h>
#include<algorithm>
#include<functional>
using namespace std;
#define OUT cout <<
#define IN cin >>
#define E << endl;
#define FOR(i,a,b) for(int i = a;i < b;i++)
char c[10];
i... | a.cc: In function 'void input()':
a.cc:25:17: error: reference to 'array' is ambiguous
25 | array[i] = c[i] - '0';
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51,
from /usr/include/c+... |
s238571640 | p00062 | C++ | #define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 30
int main(void)
{
char num[11],a;
int n[10];
while (gets_s(num, 11) != NULL) {
for (int i = 0; num[i] != '\0'; ++i) {
a = num[i];
sscanf_s(&a, "%d", &n[i])... | a.cc: In function 'int main()':
a.cc:13:16: error: 'gets_s' was not declared in this scope
13 | while (gets_s(num, 11) != NULL) {
| ^~~~~~
a.cc:16:25: error: 'sscanf_s' was not declared in this scope; did you mean 'scanf_s'?
16 | sscanf_s(&a, "%d", &n[i]);
... |
s744505214 | p00062 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
char ss[10];
int a[10];
while (cin >> ss) {
for (int i = 0; i < 10; i++) {
a[i] = ss[i] - '0';
}
int x = a[0] + a[9] + (a[1] + a[8]) * 9 + (a[2] + a[4] + a[5] + a[7]
) * 6 + (a[3] + a[6]) * 4;
string sa=to_string(x);
reverse(sa.be... | a.cc: In function 'int main()':
a.cc:15:17: error: 'reverse' was not declared in this scope
15 | reverse(sa.begin(), sa.end());
| ^~~~~~~
|
s376147203 | p00062 | C++ | Be spelling | a.cc:1:1: error: 'Be' does not name a type
1 | Be spelling
| ^~
|
s821686299 | p00062 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(void){
????????int a[10];
????????string n;
??????????
????????while(cin>>n){
????????????????for(int i = 0; i < 10 ; i ++ )a[i]=n[i]-'0';
????????????????for(int i = 9; 0 < i; i --)
????????????????????????for(int j = 0 ; j <= i ; j ++)
????????????????... | a.cc: In function 'int main()':
a.cc:5:1: error: expected primary-expression before '?' token
5 | ????????int a[10];
| ^
a.cc:5:2: error: expected primary-expression before '?' token
5 | ????????int a[10];
| ^
a.cc:5:3: error: expected primary-expression before '?' token
5 | ????????int a[10];
... |
s048242249 | p00062 | C++ | #include<cstdio>
int main(){char s[11],a,i;while(gets(s)){for(a=9;a>=0;a--)for(i=0;i<a;s[i]=(s[i]+s[i+1]-6)%10+48,i++);printf("%c\n",*s);}} | a.cc: In function 'int main()':
a.cc:2:33: error: 'gets' was not declared in this scope; did you mean 'getw'?
2 | int main(){char s[11],a,i;while(gets(s)){for(a=9;a>=0;a--)for(i=0;i<a;s[i]=(s[i]+s[i+1]-6)%10+48,i++);printf("%c\n",*s);}}
| ^~~~
| ... |
s084137422 | p00062 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
int main()
{
vector<int> a(10);
while (scanf("%d ", a) == 1) {
for (int i = 1; i < 10; i++) {
scanf("%d ", &a[i]);
}
for (int i = 9; i >= 1; i--) {
vector<int> b(i);
for (int j = 0; j < i; j++) {
b[j] = (a[... | a.cc: In function 'int main()':
a.cc:23:12: error: expected '}' at end of input
23 | return 0;
| ^
a.cc:8:1: note: to match this '{'
8 | {
| ^
|
s094549798 | p00062 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
using namespace std;
type... | a.cc: In function 'int main()':
a.cc:44:39: error: call of overloaded 'abs(Int)' is ambiguous
44 | m+=abs(n/pow%10+n/pow/10%10)%10*pow;
| ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from a.cc... |
s732783473 | p00062 | C++ | 4823108376
1234567890
0123456789 | a.cc:3:1: error: invalid digit "9" in octal constant
3 | 0123456789
| ^~~~~~~~~~
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4823108376
| ^~~~~~~~~~
|
s346940876 | p00062 | C++ | top[11];
for(int i = 0; i <10; i++)
{
cin >> top[i];
tri[0][i] = top[i] - '0';
//printf("%d ",tri[0][i]);
}
int cont = 1;
for(int i = 9; i > 0; i--){
for(int j = 0; j < i; j++){
if(tri[cont-1][j] + tri[cont-1][j+1] > 9)
tri[cont][j] = tri[cont-1][j] + tri[cont-1][j+1] -10 ;
else tri... | a.cc:1:1: error: 'top' does not name a type
1 | top[11];
| ^~~
a.cc:2:5: error: expected unqualified-id before 'for'
2 | for(int i = 0; i <10; i++)
| ^~~
a.cc:2:20: error: 'i' does not name a type
2 | for(int i = 0; i <10; i++)
| ^
a.cc:2:27: error: 'i' does ... |
s259951588 | p00062 | C++ | = 0; i <10; i++)
{
cin >> top[i];
tri[0][i] = top[i] - '0';
//printf("%d ",tri[0][i]);
}
int cont = 1;
for(int i = 9; i > 0; i--){
for(int j = 0; j < i; j++){
if(tri[cont-1][j] + tri[cont-1][j+1] > 9)
tri[cont][j] = tri[cont-1][j] + tri[cont-1][j+1] -10 ;
else tri[cont][j] = tri[cont-1]... | a.cc:1:1: error: expected unqualified-id before '=' token
1 | = 0; i <10; i++)
| ^
a.cc:1:6: error: 'i' does not name a type
1 | = 0; i <10; i++)
| ^
a.cc:1:13: error: 'i' does not name a type
1 | = 0; i <10; i++)
| ^
a.cc:8:5: error: expected unqualified-id before 'for'
... |
s363101984 | p00062 | C++ | = 0; i <10; i++)
{
cin >> top[i];
tri[0][i] = top[i] - '0';
//printf("%d ",tri[0][i]);
}
int cont = 1;
for(int i = 9; i > 0; i--){
for(int j = 0; j < i; j++){
if(tri[cont-1][j] + tri[cont-1][j+1] > 9)
tri[cont][j] = tri[cont-1][j] + tri[cont-1][j+1] -10 ;
else tri[cont][j] = tri[cont-1]... | a.cc:1:1: error: expected unqualified-id before '=' token
1 | = 0; i <10; i++)
| ^
a.cc:1:6: error: 'i' does not name a type
1 | = 0; i <10; i++)
| ^
a.cc:1:13: error: 'i' does not name a type
1 | = 0; i <10; i++)
| ^
a.cc:8:5: error: expected unqualified-id before 'for'
... |
s234859477 | p00062 | C++ | int main(){
string s;
int num[10];
int k[10][12] = {0};
k[0][1] = 1;
for(int i = 1; i < 10; i++){
for(int j = 1; j < 12; j++){
k[i][j] = k[i-1][j-1]+k[i-1][j];
}
}
while(cin >> s){
if(s == "0")break;
int sum = 0;
for(int i = 0; i < s.size(); i++){
sum += (s[i]-'0')*k[9][i+1];
}
cout <<... | a.cc: In function 'int main()':
a.cc:2:9: error: 'string' was not declared in this scope
2 | string s;
| ^~~~~~
a.cc:15:15: error: 'cin' was not declared in this scope
15 | while(cin >> s){
| ^~~
a.cc:15:22: error: 's' was not declared in this scope
15 | ... |
s332977092 | p00062 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string str;
while(cin>>str){
int num[10];
for(int i=0;i<10;i++){
num[i]=str[i]-48;
}
for(int j=9;j>=0;j--){
for(int k=0;k<j;k++){
num[k] += num[k+1];
}
}
cout<<num[k]%10<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:16:27: error: 'k' was not declared in this scope
16 | cout<<num[k]%10<<endl;
| ^
|
s576177225 | p00063 | Java | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScann... | Main.java:89: error: reached end of file while parsing
}
^
1 error
|
s473456086 | p00063 | Java | port java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdin = new Scanner(System.in);
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
int cnt = 0;
... | Main.java:1: error: class, interface, enum, or record expected
port java.io.BufferedReader;
^
Main.java:2: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:4: error: class, interfa... |
s094361881 | p00063 | Java | port java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdin = new Scanner(System.in);
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
int cnt = 0;
... | Main.java:1: error: class, interface, enum, or record expected
port java.io.BufferedReader;
^
Main.java:2: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:4: error: class, interfa... |
s537094572 | p00063 | Java | #include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<string>
using namespace std;
int main()
{
string s;
int n, i;
n = 0;
while (cin>>s) {
n++;
for (i = 0; i < s.size()/2; i++) {
if (s[i] != s[s.size()-i-1]) {
n-... | Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<math.h>
^
Main.java:3: error: illegal character: '#'
#include<vector>
^
Main.java:4: error: illegal character: '#'
#include<algorithm>
^
Main.java:5: error: illegal character: '#'
#include<cstdio>
^
Main.... |
s609834589 | p00063 | Java | ipmport java.util.Scanner;
public class Main
{
public static void main(String arg[])
{
Scanner sc = new Scanner(System.in);
int count =0;
while(sc.hasNext())
{
String str = sc.next();
for(int i=0; i<str.length(); i++)
{
if(str.charAt(i)==str.charAt(str.length()-1-i))
{
if(str.length(... | Main.java:1: error: class, interface, enum, or record expected
ipmport java.util.Scanner;
^
1 error
|
s048708466 | p00063 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = 0;
while(sc.hasNext()){
String s = sc.next();
if(s.equals((new StringBuffer(s)).reverse().toString()))n++;
}
System.out.println(c);
}
} | Main.java:12: error: cannot find symbol
System.out.println(c);
^
symbol: variable c
location: class Main
1 error
|
s094599501 | p00063 | C | #include<stdio.h>
#include<string.h>
int main(){
int l,c=0;
char s[102]={0};
while(~scanf("%s",s)){
for(i=1;s[i];i++);
for(j=0;j>=i;j++){
if(s[i]-s[j])break;
i--;
}
if(j<i)c++;
}
printf("%d",c);
return 0;
}
| main.c: In function 'main':
main.c:7:9: error: 'i' undeclared (first use in this function)
7 | for(i=1;s[i];i++);
| ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:9: error: 'j' undeclared (first use in this function)
8 | for(j=... |
s873460399 | p00063 | C | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int main(void)
{
int c, n = 0;
char s1[100], s2[100];
while (scanf("%s", s1) != EOF){
c = 0;
for (int i = 0; i <= strlen(s1); i++){
s2[i] = s1[i];
}
reverse(s2, s2 + strlen(s1));
for (int i = 0; i <= strlen(s1); i++){
... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s624338897 | p00063 | C | #include <stdio.h>
#include <string.h>
int main(void)
{
char a[101];
int c=0,l;
while(scanf("%s",a)!=EOF){
l=strlen(a);
int i,f=1;
for(i=0;i<l/2;i++){
if(a[i]!=a[l-1-i]))
f=0;
break;
}
if(f)
c++;
}
printf("%d\n",c);
return 0;
} | main.c: In function 'main':
main.c:11:25: error: expected statement before ')' token
11 | if(a[i]!=a[l-1-i]))
| ^
|
s596680907 | p00063 | C | #include <stdio.h>
#include <string.h>
int main(){
char x[105];
int i,j,num,sum;
while(scanf("%s",x)!=EOF){
int c=strlen(x);
for(i=0;i<c/2;i++){
if(x[i]!=x[c-1-i]){
num=1;
}}}
if(num==0) sum++;
num=0;
printf("%d\n",sum);
sum=0;
}
return 0;
} | main.c:17:1: error: expected identifier or '(' before 'return'
17 | return 0;
| ^~~~~~
main.c:18:1: error: expected identifier or '(' before '}' token
18 | }
| ^
|
s434628298 | p00063 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
int main(){
string s;
int cnt=0;
... | a.cc: In function 'int main()':
a.cc:30:27: error: expected ';' before ':' token
30 | printf("%d\n",cnt):
| ^
| ;
|
s195129203 | p00063 | C++ | #include <stdio.h>
int main(void)
{
char c[200];
int ans = 0;
int len;
while(scanf("%s", c) != EOF){
len = strlen(c);
ans++;
for(int i = 0; i < len / 2; i++){
if(c[i] != c[len - i - 1]){
ans--;
break;
}
}
}
printf("%d\n",ans);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:23: error: 'strlen' was not declared in this scope
9 | len = strlen(c);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <stdio.h>
+++ |+#i... |
s602991023 | p00063 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_... | a.cc: In function 'int main()':
a.cc:27:17: error: 'tmp' was not declared in this scope; did you mean 'tm'?
27 | tmp=s;
| ^~~
| tm
|
s136597557 | p00063 | C++ | #include <iostream>
#include <vector>
#include <cstdio>
#include <string>
using namespace std;
int main(){
string a;
//int n;
int k=0;
//cin>>n;
while(cin>>a){
//cin>>a;
int f=0;
//cout<<a.size()/2<<endl;
for(int i=0;i<a.size()/2;i++){
//cout<<a[i]<<a[a.size()-1-i]<<endl;
if(a[i]!=a[a.size()-1-i])
... | a.cc: In function 'int main()':
a.cc:24:17: error: 'n' was not declared in this scope
24 | n--;
| ^
|
s636346641 | p00063 | C++ | s = 0
while a = gets
a.chop!
f = 1
a.size.times{|i|
f = 0 if a[i] != a[~i]
}
s += f
end
p s | a.cc:1:1: error: 's' does not name a type
1 | s = 0
| ^
a.cc:8:9: error: 's' does not name a type
8 | s += f
| ^
|
s403943487 | p00063 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define sz(obj) ((int)(obj).size())
int main()
{
string str;
int cnt = 0;
while (cin >> str){
REP(i, sz(str) / 2) if (str[i] == str[sz(str) - (i + 1)]) ccnt++;
... | a.cc: In function 'int main()':
a.cc:13:63: error: 'ccnt' was not declared in this scope; did you mean 'cnt'?
13 | REP(i, sz(str) / 2) if (str[i] == str[sz(str) - (i + 1)]) ccnt++;
| ^~~~
| ... |
s271964130 | p00063 | C++ | #include<cstdio>
#include<iostream>
#include<cmath>
#include<vector>
#include<string>
#include<algorithm>
#define ll long long
#define LL long long
#define ULL unsigned long long
#define ull unsigned long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define REP(i,n) fo... | a.cc: In function 'int main()':
a.cc:27:21: error: 'strlen' was not declared in this scope
27 | len=strlen(str);
| ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include<algorithm>
+++ |+#i... |
s300440609 | p00063 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string a;
int count = 0;
while(cin >> a;){
string b = a;
reverse(b.begin(),b.end());
if(a == b) count++;
}
cout << count << "\n";
} | a.cc: In function 'int main()':
a.cc:8:23: error: expected ')' before ';' token
8 | while(cin >> a;){
| ~ ^
| )
a.cc:8:24: error: expected primary-expression before ')' token
8 | while(cin >> a;){
| ^
|
s066285902 | p00063 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string a;
int count = 0;
while(cin >> a){
string b = a;
reverse(b.begin(),b.end());
if(a == b) count++;
}
cout << count << "\n";
} | a.cc: In function 'int main()':
a.cc:10:17: error: 'reverse' was not declared in this scope
10 | reverse(b.begin(),b.end());
| ^~~~~~~
|
s885564848 | p00063 | C++ | //#define scanf_s scanf
#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 51
int main(void)
{
char str[MAX];
int i, j, cou = 0;
while (scanf_s("%s",str) != EOF) {
++cou;
for (i = 0; str[i] != '\0'; ++i);
for (j = 0; j < i / 2; ++j) {... | a.cc: In function 'int main()':
a.cc:13:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
13 | while (scanf_s("%s",str) != EOF) {
| ^~~~~~~
| scanf
|
s507556533 | p00063 | C++ | #include <iostream>
#include <string>
#include <stdio.h>
using namespace std;
int main(){
string s,sans1,sans2;
char s1[100] , s2[100];
int ssum;
int sum = 0;
while(1){
scanf("%s" , s);
if(s == EOF) break;
ssum = s.size() / 2;
for(int i = 0; i < ssum; i++){
s1[i] = s[i];
s2[i] = s[s.size() ... | a.cc: In function 'int main()':
a.cc:18:22: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
18 | if(s == EOF) break;
| ~ ^~
| |
| std::string {aka std::__cx... |
s995634093 | p00063 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s,g;
int k=0;
while(cin>>s){
g=s;
reverse(s.begin() , s.end() );
if(g==s)k++;
}
cout<<k<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'reverse' was not declared in this scope
10 | reverse(s.begin() , s.end() );
| ^~~~~~~
|
s050231361 | p00063 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s,g;
int k=0;
while(cin>>s){
g=s;
reverse(s.begin() , s.end() );
if(g==s)k++;
}
cout<<k<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'reverse' was not declared in this scope
10 | reverse(s.begin() , s.end() );
| ^~~~~~~
|
s103267101 | p00063 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s,g;
int k=0;
while(cin>>s){
g=s;
reverse(s.begin() , s.end() );
if(g==s)k++;
}
cout<<k<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'reverse' was not declared in this scope
10 | reverse(s.begin() , s.end() );
| ^~~~~~~
|
s822879604 | p00063 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string sa;
int co = 0;
while (cin >> sa) {
int a = sa.size();
if (a == 1) { co++; }
string sb, sc;
for (int i = 0; i < a / 2; i++) {
sb[i] = sa[i];
}
int j = 0;
if (a % 2 == 0) {
for (int i = a / 2 + 1; i < a; i++) {
sc... | a.cc: In function 'int main()':
a.cc:28:17: error: 'reverse' was not declared in this scope
28 | reverse(sc.begin(),sc.end());
| ^~~~~~~
|
s420747207 | p00063 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string st;
string origin;
int cnt = 0;
while (cin >> st) {
origin = st;
reverse(st.begin(), st.end());
if (st == origin) cnt++;
}
cout << cnt << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'reverse' was not declared in this scope
12 | reverse(st.begin(), st.end());
| ^~~~~~~
|
s313573310 | p00063 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string st;
string origin;
int cnt = 0;
while (cin >> st) {
origin = st;
reverse(st.begin(), st.end());
if (st == origin) cnt++;
}
cout << cnt << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'reverse' was not declared in this scope
12 | reverse(st.begin(), st.end());
| ^~~~~~~
|
s693464040 | p00063 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string s,t; int n=0;
while(cin >> s)
{
t=s;
reverse(t.begin(), t.end());
if(s==t)n++;
}
cout << n << endl;
} | a.cc: In function 'int main()':
a.cc:12:17: error: 'reverse' was not declared in this scope
12 | reverse(t.begin(), t.end());
| ^~~~~~~
|
s495592828 | p00063 | C++ | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
char ss[100];
int i,c;
c=0;
while(0<=scanf("%s",ss)){
/* for(i=0;i<=strlen(ss)-1;i++){
if(ss[i]!=ss[strlen(ss)-i-1])break;
}
if(i==strlen(ss)-1)++c;
}
*/ printf("%d\n",c);
return 0;
} | a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
19 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s534832107 | p00063 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string pal;
int count = 0;
while(cin >> pal){
bool ispalin = true;
int l = pal.length;
for(int i=0;i*2 < l-1;i++) if(pal[i] != pal[l-1-i]) {ispalin = false;break;}
if(ispalin) count++;
}
cout << count << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:29: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
12 |... |
s935310648 | p00063 | C++ | #include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main()
{
string str;
int c = 0;
while (cin >> str) {
cin.ignore();
string S, R;
S = substr(0, str.size() / 2);
if (str.size() % 2 == 0) {
R = substr(str.size() / 2, str.size() / 2);
} else {
R = subs... | a.cc: In function 'int main()':
a.cc:14:9: error: 'substr' was not declared in this scope
14 | S = substr(0, str.size() / 2);
| ^~~~~~
|
s650237680 | p00063 | C++ | #include <stdio.h>
int main(){
int i,len,cnt=0;
char input[1000];
while(scanf("%s",input)!=EOF){
if(input==EOF)break;
len=strlen(input);
int sw=1;
for(i=0;i<len/2;i++){
if(input[i]!=input[len-1-i]){
sw=0;
break;
}
... | a.cc: In function 'int main()':
a.cc:6:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
6 | if(input==EOF)break;
| ^
a.cc:7:13: error: 'strlen' was not declared in this scope
7 | len=strlen(input);
| ^~~~~~
a.cc:2:1: note: '... |
s282420321 | p00063 | C++ | include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
char a[101];
int s,cn=0,i,f;
while (cin >> a) {
s=strlen(a); f=0;
for (i=0;i<(s+1)/2;i++) if (a[i]!=a[s-1-i]) f=1;
if (f==0) cn++;
}
cout << cn << endl;
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from a.cc:3:
/usr/include/string.h:44:22: error: 'size_t' has not been declared
44 | size_t __n) __THROW __nonnull ((1, 2));
| ^~~~~~
/usr/include/string.h:47:56... |
s892887139 | p00063 | C++ | #include <iostream>
#include <cstring>
#include <string>
using namespace std;
int main(){
int cnt;
string s;
cnt = 0;
while(cin >> s){
string c = s;
reverse(c.begin(),c.end());
if(c == s) cnt++;
}
cout << cnt << endl;
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'reverse' was not declared in this scope
12 | reverse(c.begin(),c.end());
| ^~~~~~~
|
s756907937 | p00063 | C++ | #include <iostream>
#include <string>
using namespace std;
int check(string a,string b){
if(a == b) return 1;
return 0;
}
int main(void){
string str;
int cnt = 0;
while(cin >> str){
int flg = 0;
for(int i = 0 ; i < str.size()/2 ; i++){
if(!check(str[i],str[str.size()-i-1]){
flg =... | a.cc: In function 'int main()':
a.cc:18:16: error: could not convert 'str.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
18 ... |
s400572437 | p00063 | C++ | Input | a.cc:1:1: error: 'Input' does not name a type
1 | Input
| ^~~~~
|
s608880767 | p00063 | C++ | #include <iostream>
#include <string>
int main(){
char c;
int a=0;
std::string s,x;
for(;std::cin>>s>>c;){
x=s;
reverse(x.begin(),x.end());
if (x==s) a++;
}
std::cout<<a<<"\n";
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'reverse' was not declared in this scope
9 | reverse(x.begin(),x.end());
| ^~~~~~~
|
s463301040 | p00063 | C++ | /**
*
*/
import java.util.*;
/**
* @author akira
*
*/
class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int ans = 0;
while(scan.hasNextLine()){
String str = scan.nextLine();
boolean b = true;
for(int i ... | a.cc:4:1: error: 'import' does not name a type
4 | import java.util.*;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:14:15: error: expected ':' before 'static'
14 | public static void main(String[] args) {
| ^~~~~~~
| :
a.cc:... |
s123436724 | p00063 | C++ | #include<iostream>int p(char*s){int l=strlen(s),i;for (i=l;i--;)if (s[i]!=s[l-i-1])return 0;return 1;}int c;int main(){char s[101];while (std::cin>>s)p(s)?++c:c;std::cout<<c<<std::endl;} | a.cc:1:23: warning: extra tokens at end of #include directive
1 | #include<iostream>int p(char*s){int l=strlen(s),i;for (i=l;i--;)if (s[i]!=s[l-i-1])return 0;return 1;}int c;int main(){char s[101];while (std::cin>>s)p(s)?++c:c;std::cout<<c<<std::endl;}
| ^
a.cc:1:9: fatal error: iostream... |
s808551348 | p00063 | C++ | #include<iostream>int p(char*s){int l=strlen(s),i;for(i=l;i--;)return s[i]!=s[l-i-1]?0:1;}int c;int main(){char s[101];while(std::cin>>s)p(s)?++c:c;std::cout<<c<<std::endl;} | a.cc:1:23: warning: extra tokens at end of #include directive
1 | #include<iostream>int p(char*s){int l=strlen(s),i;for(i=l;i--;)return s[i]!=s[l-i-1]?0:1;}int c;int main(){char s[101];while(std::cin>>s)p(s)?++c:c;std::cout<<c<<std::endl;}
| ^
a.cc:1:9: fatal error: iostream>in: No such ... |
s368187380 | p00063 | C++ | #include<iostream>
int p(char*s){int l=strlen(s),i;for(i=l;i--;)return s[i]!=s[l-i-1]?0:1;}
int c;
int main(){char s[101];while(std::cin>>s)p(s)?++c:c;std::cout<<c<<std::endl;} | a.cc: In function 'int p(char*)':
a.cc:2:21: error: 'strlen' was not declared in this scope
2 | int p(char*s){int l=strlen(s),i;for(i=l;i--;)return s[i]!=s[l-i-1]?0:1;}
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring... |
s402921691 | p00063 | C++ | #include<iostream>
#include<stdio.h>
int p(char*s){int l=strlen(s),i;for(i=l;i--;)return s[i]!=s[l-i-1]?0:1;}
int c;
int main(){char s[101];while(std::cin>>s)p(s)?++c:c;std::cout<<c<<std::endl;} | a.cc: In function 'int p(char*)':
a.cc:3:21: error: 'strlen' was not declared in this scope
3 | int p(char*s){int l=strlen(s),i;for(i=l;i--;)return s[i]!=s[l-i-1]?0:1;}
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring... |
s529139607 | p00063 | C++ | #include<iostream>
#include<string>
using namespace std;
int c;
int main(){
for (string s, t; getline(cin, s), t = s,reverse(t.begin(),t.end()),s=="\0";)
c += (s == t);
cout << c << endl;
} | a.cc: In function 'int main()':
a.cc:7:50: error: 'reverse' was not declared in this scope
7 | for (string s, t; getline(cin, s), t = s,reverse(t.begin(),t.end()),s=="\0";)
| ^~~~~~~
|
s206793388 | p00064 | Java | #include <stdio.h>
#include <string.h>
int main(void)
{
char str[100][100];
int i, j, k, sum, mul;
i = 0;
sum = 0;
while (scanf("%s" , str[i]) != EOF){
for (j = 0; j < strlen(str[i]); j++){
if (str[i][j] >= '0' && str[i][j] <= '9'){
mul = 1;
for (k = 1; str[i][j+k] - '0' >= 0 && str[i][j+k] - '0' <... | Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:2: error: illegal character: '#'
#include <string.h>
^
Main.java:7: error: class, interface, enum, or record expected
int i, j, k, sum, mul;
^
Main.jav... |
s505935324 | p00064 | Java |
public class Main {
public static void main(String[] args) throws NumberFormatException,
IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
StringBuilder builder = new StringBuilder();
String line;
int count = 0;
while ((line = reader.readLine()) != null) {
... | Main.java:5: error: cannot find symbol
IOException {
^
symbol: class IOException
location: class Main
Main.java:6: error: cannot find symbol
BufferedReader reader = new BufferedReader(new InputStreamReader(
^
symbol: class BufferedReader
location: class Main
Main.java:6: error: cannot find symbol
... |
s979654350 | p00064 | Java | import java.io.*;
class Main{
public static void main(Sting[] args) throws IOException{
BufferedReader br=new BfferedReader(new InputStreamReader(System.in));
String line="";
int count=0;
while((line=br.readLine())!=null){
int a=0;
boolean f=false;
for(int i=0;i<line.length();i++){
f=false;
if(line.charAt(i)>='0'&&lin... | Main.java:4: error: cannot find symbol
public static void main(Sting[] args) throws IOException{
^
symbol: class Sting
location: class Main
Main.java:5: error: cannot find symbol
BufferedReader br=new BfferedReader(new InputStreamReader(System.in));
^
symbol: clas... |
s738528885 | p00064 | Java | package Vol000;
import java.util.Scanner;
public class AOJ0_64
{
public static void main(String arg[])
{
Scanner in = new Scanner(System.in);
int count =0;
String tmp = "0";
while(in.hasNext())
{
char ch[]=in.nextLine().toCharArray();
for(int i=0; i<ch.length; i++)
{
while(i<ch.length&&(Chara... | Main.java:4: error: class AOJ0_64 is public, should be declared in a file named AOJ0_64.java
public class AOJ0_64
^
1 error
|
s354313028 | p00064 | C | #include <stdio.h>int a, b;int main(){while(scanf("%*[^0-9]%d",&a)!=EOF){b+=a;}printf("%d\n",b);a=0;} | main.c:1:19: warning: extra tokens at end of #include directive
1 | #include <stdio.h>int a, b;int main(){while(scanf("%*[^0-9]%d",&a)!=EOF){b+=a;}printf("%d\n",b);a=0;}
| ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17):... |
s674228838 | p00064 | C | int a,b;int main(){while(scanf("%*[^0-9]%d",&a)!=EOF){b+=a;}printf("%d\n",b);a=0;} | main.c: In function 'main':
main.c:1:26: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | int a,b;int main(){while(scanf("%*[^0-9]%d",&a)!=EOF){b+=a;}printf("%d\n",b);a=0;}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of '... |
s867090056 | p00064 | C | #include<string.h>
#include<ctype.h>
#include<math.h>
int main(void) {
char str[81];
int count = 0,length,i,j=0,k=0;
while (scanf("%s",str) != EOF)
{
length = strlen(str);
for (i = length - 1; i >= 0; i--) {
if (isdigit(str[i])) {
j = 0;
while (1) {
if (isdigit(str[i - j])) {
count += (st... | main.c: In function 'main':
main.c:8:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
8 | while (scanf("%s",str) != EOF)
| ^~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
3 | #include<math.h>
+++ |+#include <stdi... |
s828756363 | p00064 | C | include<stdio.h>
#include<string.h>
#include<math.h>
int main(){
int i,j,k;
int n=0;
char s[81];
while(scanf("%s",s)!=-1){
for(i=0;i<strlen(s);i++){
if('1'<=s[i]&&s[i]<='9'){
for(j=i+1;j<strlen(s);j++){
if(s[j]<'0'||'9'<s[j])
break;
}
for(k=0;k<j-i;k++)
n+=(s[i+k]-'0')*pow(10,j-i-k-1);
... | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
In file included from main.c:2:
/usr/include/string.h:44:22: error: unknown type name 'size_t'
44 | size_t __n) __THROW __nonnull ((1, 2));
| ... |
s105659133 | p00064 | C | #include<stdio.h>
#include<string.h>
int func(int);
int t;
char str[81];
int main(void){
int ans,i;
memset(str,'a',sizeof(str));
ans=0;
while(~scanf("%[^\n]%*c",str)){
for(i=0;i<strlen(str);i++)
if(str[i]-'0'<10 && str[i]-'0'>=0){
ans+=func(i);
printf("%d\n",res);
i=t;
}
}
printf(... | main.c: In function 'main':
main.c:19:23: error: 'res' undeclared (first use in this function)
19 | printf("%d\n",res);
| ^~~
main.c:19:23: note: each undeclared identifier is reported only once for each function it appears in
|
s202773705 | p00064 | C | /*
*/
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int mystrtol(char text[], char **pEnd, int value);
int main(void){
char text[101];
int sum;
int i, temp;
char *pStart;
char *pEnd;
while(fgets(text, sizeof(text), stdin) != NULL){
i = 0;
pStart = text;
text[strlen(text)-1] = '... | main.c: In function 'mystrtol':
main.c:64:13: error: 'value' redeclared as different kind of symbol
64 | int value;
| ^~~~~
main.c:62:44: note: previous definition of 'value' with type 'int'
62 | int mystrtol(char text[], char **pEnd, int value){
| ... |
s611572118 | p00064 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define rer(i, a, b) for (int i = (int)a; i <= (int)b; ++i)
#define each(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define all(v) v.begin(), v.end()
#define mset... | a.cc: In function 'int main()':
a.cc:31:25: error: expected ';' before 'string'
31 | s += ' '
| ^
| ;
32 | string num;
| ~~~~~~
a.cc:34:57: error: 'num' was not declared in this scope; did you mean... |
s086366280 | p00064 | C++ | a;main(n){for(;~scanf("%*[^0-9]%d",&n);)a+=n;a=!printf("%d\n",a);} | a.cc:1:1: error: 'a' does not name a type
1 | a;main(n){for(;~scanf("%*[^0-9]%d",&n);)a+=n;a=!printf("%d\n",a);}
| ^
a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
1 | a;main(n){for(;~scanf("%*[^0-9]%d",&n);)a+=n;a=!printf("%d\n",a);}
| ^
|
s267347077 | p00064 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
#include <numeric>
using namespace std;
#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n);... | a.cc: In function 'int main()':
a.cc:24:33: error: expected ')' before '{' token
24 | while((c = getchar() != EOF) {
| ~ ^~
| )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.