submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s914873015 | p00102 | C++ | #include <iostream>
#include<iomanip>
using namespace std;
int main() {
int n;
cin >> n;
if(n == 0)
break;
int A[51][51] = {};
for(int i=0;i<n;i++) {
for(int j=0;j<n;j++) {
cin >> A[i][j];
A[i][n] += A[i][j];
A[n][j] += A[i][j];
}
A[n][n] += A[i][n];
}
for(int i=0;i<=n;i++) {
for(int j=0;j<=n;j++) {
cout << setw(4)<< A[i][j] << " ";
}
cout << "\n";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:5: error: break statement not within loop or switch
12 | break;
| ^~~~~
|
s192963061 | p00102 | C++ | #include <cstdio>
int main(){
int i,j,n,a[10][10],b[10],c[10],sum;
while(1){
scanf("%d",&n);
if(n == 0) break;
sum = 0;
for(i=0;i<n;i++){
b[i] = 0;
for(j=0;j<n;j++){
scanf("%d",&a[i][j]);
b[i] += a[i][j];
sum += a[i][j];
}
}
for(i=0;i<n;i++){
c[i] = 0;
for(j=0;j<n;j++){
c[i] += a[j][i];
}
}
for(i=0;i<n;i++){
for(j=0;j<n;j++){
printf("%5d ",a[i][j]);
}
printf("%5d\n",b[i]);
}
for(i=0;i<n;i++){
printf("%5d ",c[i]);
}
printf("%5d\n",sum);
}
return 0;
}
#include <cstdio>
int main(){
int i,j,n,a[10][10],b[10],c[10],sum;
while(1){
scanf("%d",&n);
if(n == 0) break;
sum = 0;
for(i=0;i<n;i++){
b[i] = 0;
for(j=0;j<n;j++){
scanf("%d",&a[i][j]);
b[i] += a[i][j];
sum += a[i][j];
}
}
for(i=0;i<n;i++){
c[i] = 0;
for(j=0;j<n;j++){
c[i] += a[j][i];
}
}
for(i=0;i<n;i++){
for(j=0;j<n;j++){
printf("%5d ",a[i][j]);
}
printf("%5d\n",b[i]);
}
for(i=0;i<n;i++){
printf("%5d ",c[i]);
}
printf("%5d\n",sum);
}
return 0;
} | a.cc:42:5: error: redefinition of 'int main()'
42 | int main(){
| ^~~~
a.cc:3:5: note: 'int main()' previously defined here
3 | int main(){
| ^~~~
|
s450307939 | p00102 | C++ | #include <stdio.h>
#include <string.h>
int main(void) {
int size;
int matrix[10][10];
int sum_row,sum_column,sum;
char line[200];
char* p;
int i,j;
char c;
while(1) {
scanf("%d",&size);
c=getchar();
if(size==0) break;
for(i=0;i<size;i++) {
fgets(line,sizeof(line),stdin);
line[strlen(line)-1]='\0';
p=strtok(line," ");
matrix[i][0]=atoi(p);
for(j=1;j<size;j++) {
p=strtok(NULL," ");
matrix[i][j]=atoi(p);
}
}
for(i=0;i<size;i++) {
sum_row=0;
for(j=0;j<size;j++) {
printf("%5d",matrix[i][j]);
sum_row+=matrix[i][j];
}
printf("%5d\n",sum_row);
}
sum=0;
for(j=0;j<size;j++) {
sum_column=0;
for(i=0;i<size;i++) {
sum_column+=matrix[i][j];
}
sum+=sum_column;
printf("%5d",sum_column);
}
printf("%5d\n",sum);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:30:20: error: 'atoi' was not declared in this scope
30 | matrix[i][0]=atoi(p);
| ^~~~
|
s576465008 | p00102 | C++ | #include <stdio.h>
#include <string.h>
int main(void) {
int size;
int matrix[10][10];
int sum_row,sum_column,sum;
char line[200];
char* p;
int i,j;
char c;
while(1) {
scanf("%d",&size);
c=getchar();
if(size==0) break;
for(i=0;i<size;i++) {
fgets(line,sizeof(line),stdin);
line[strlen(line)-1]='\0';
p=strtok(line," ");
matrix[i][0]=atoi(p);
for(j=1;j<size;j++) {
p=strtok(NULL," ");
matrix[i][j]=atoi(p);
}
}
for(i=0;i<size;i++) {
sum_row=0;
for(j=0;j<size;j++) {
printf("%5d",matrix[i][j]);
sum_row+=matrix[i][j];
}
printf("%5d\n",sum_row);
}
sum=0;
for(j=0;j<size;j++) {
sum_column=0;
for(i=0;i<size;i++) {
sum_column+=matrix[i][j];
}
sum+=sum_column;
printf("%5d",sum_column);
}
printf("%5d\n",sum);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:30:20: error: 'atoi' was not declared in this scope
30 | matrix[i][0]=atoi(p);
| ^~~~
|
s193614484 | p00102 | C++ | #include <iostream>
#include <Iomanip>
using namespace std;
int main()
{
int n;
while(1)
{
cin>>n;
if(n==0)break;
int m[n][n];
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cin>>m[i][j];
}
}
int gyousum=0,retusum=0,allsum=0;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cout<<setw(5)<<m[i][j];
gyousum+=m[i][j];
allsum+=m[i][j];
}
cout<<setw(5)<<gyousum<<"\n";
gyousum=0;
}
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
retusum+=m[j][i];
}
cout<<setw(5)<<retusum;
retusum=0;
}
cout<<setw(5)<<allsum<<"\n";
allsum=0;
}
return 0;
} | a.cc:2:10: fatal error: Iomanip: No such file or directory
2 | #include <Iomanip>
| ^~~~~~~~~
compilation terminated.
|
s294066760 | p00102 | C++ | #include <iostream>
using namespace std;
int main()
{
int n, num[11][11];
while (1) {
if (cin >> n, !n) break;
for (int i=0; i<11; i++) for (int j=0; j<11; j++) num[i][j] = 0;
for (int i=0; i<n; i++) for (int j=0; j<n; j++) cin >> num[i][j];
for (int i=0; i<10; i++) for (int j=0; j<10; j++) num[10][i] += num[j][i];
for (int i=0; i<11; i++)
for (int j=0; j<10; j++) num[i][10] += num[i][j];
for (int i=0; i<11; i++) {
for (int j=0; j<11; j++) {if ((i<n && j<n) || (i==10 && j<n) || (j==10 && i<n) || (j==10 && i==10)) {cout.width(5); cout << num[i][j];}}
if ((i < n) || (i == 10)) cout << endl;
}
} | a.cc: In function 'int main()':
a.cc:18:10: error: expected '}' at end of input
18 | }
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s389116405 | p00102 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int n;
while(cin>>n)
{
int table[11][11]={0};
if(n==0)
break;
for(int i=0,in;i<n;++i)
{
for(int j=0;j<n;++j)
{
cin>>in;
table[i][j]=in;
table[n][j]+=in;
table[i][n]+=in;
}
}
for(int i=0;i<n;++i)table[n][n]+=table[n][i];
for(int i=0;i<n+1;++i)
{
for(int j=0;j<n+1;++j)printf("%5d",table[i][j]);
cout<<endl;
}
}
return 0; | a.cc: In function 'int main()':
a.cc:29:14: error: expected '}' at end of input
29 | return 0;
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s363472125 | p00102 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int n;
while(cin>>n)
{
int table[11][11]={0};
if(n==0)
break;
for(int i=0,in;i<n;++i)
{
for(int j=0;j<n;++j)
{
cin>>in;
table[i][j]=in;
table[n][j]+=in;
table[i][n]+=in;
}
}
for(int i=0;i<n;++i)table[n][n]+=table[n][i];
for(int i=0;i<n+1;++i)
{
for(int j=0;j<n+1;++j)printf("%5d",table[i][j]);
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
30 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s521545003 | p00102 | C++ | #include<iostream>
#include<iomanip>
int n;
int tbl[11][11];
int main()
{
while( std::cin >> n, n )
{
memset( tbl, 0, sizeof( tbl ) );
for( int i = 0; i != n; ++i )
{
for( int j = 0; j != n; ++j )
{
std::cin >> tbl[i][j];
tbl[i][n] += tbl[i][j];
tbl[n][j] += tbl[i][j];
tbl[n][n] += tbl[i][j];
}
}
for( int i = 0; i <= n; ++i )
{
for( int j = 0; j <= n; ++j )
std::cout << std::setw( 5 ) << std::right << tbl[i][j];
std::cout << std::endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:17: error: 'memset' was not declared in this scope
11 | memset( tbl, 0, sizeof( tbl ) );
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<iomanip>
+++ |+#include <cstring>
3 |
|
s419636024 | p00102 | C++ | #include<iostream>
int main(){
int n;
while(std::cin>>n,n){
int data[5][5];
memset(data,0,sizeof(data));
for(int i=0;i<4;i++){
for(int j=0;j<4;j++){
std::cin>>data[i][j];
data[i][4]+=data[i][j];
data[4][j]+=data[i][j];
data[4][4]+=data[i][j];
}
}
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
std::cout<<data[i][j]<<" ";
}
std::cout<<std::endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:17: error: 'memset' was not declared in this scope
7 | memset(data,0,sizeof(data));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>
2 |
|
s307160464 | p00102 | C++ | 4
52 96 15 20
86 22 35 45
45 78 54 36
16 86 74 55
4
52 96 15 20
86 22 35 45
45 78 54 36
16 86 74 55
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4
| ^
|
s432872388 | p00102 | C++ | 4
52 96 15 20
86 22 35 45
45 78 54 36
16 86 74 55
4
52 96 15 20
86 22 35 45
45 78 54 36
16 86 74 55
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4
| ^
|
s528961374 | p00103 | Java | #include<iostream>
#include<string>
using namespace std;
int main() {
int e;
cin >> e;
for(int i=0;i<e;i++){
int o=0,r=0,c=0;
while(1){
string str;
if(o==3) break;
cin >> str;
if(str=="HIT"){
if(r==3) c++,r--;
r++;
}
else if(str=="OUT") o++;
else{
c+=r+1;
r=0;
}
}
cout << c << endl;
}
return 0;
} | Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<string>
^
Main.java:6: error: illegal character: '\u3000'
???int e;
^
Main.java:6: error: illegal character: '\u3000'
???int e;
^
Main.java:6: error: illegal character: '\u3000'
???int e;
^
Main.java:7: error: illegal character: '\u3000'
???cin >> e;
^
Main.java:7: error: illegal character: '\u3000'
???cin >> e;
^
Main.java:7: error: illegal character: '\u3000'
???cin >> e;
^
Main.java:7: error: not a statement
???cin >> e;
^
Main.java:8: error: illegal character: '\u3000'
???for(int i=0;i<e;i++){
^
Main.java:8: error: illegal character: '\u3000'
???for(int i=0;i<e;i++){
^
Main.java:8: error: illegal character: '\u3000'
???for(int i=0;i<e;i++){
^
Main.java:9: error: illegal character: '\u3000'
??????int o=0,r=0,c=0;
^
Main.java:9: error: illegal character: '\u3000'
??????int o=0,r=0,c=0;
^
Main.java:9: error: illegal character: '\u3000'
??????int o=0,r=0,c=0;
^
Main.java:9: error: illegal character: '\u3000'
??????int o=0,r=0,c=0;
^
Main.java:9: error: illegal character: '\u3000'
??????int o=0,r=0,c=0;
^
Main.java:9: error: illegal character: '\u3000'
??????int o=0,r=0,c=0;
^
Main.java:10: error: illegal character: '\u3000'
??????while(1){
^
Main.java:10: error: illegal character: '\u3000'
??????while(1){
^
Main.java:10: error: illegal character: '\u3000'
??????while(1){
^
Main.java:10: error: illegal character: '\u3000'
??????while(1){
^
Main.java:10: error: illegal character: '\u3000'
??????while(1){
^
Main.java:10: error: illegal character: '\u3000'
??????while(1){
^
Main.java:11: error: illegal character: '\u3000'
?????????string str;
^
Main.java:11: error: illegal character: '\u3000'
?????????string str;
^
Main.java:11: error: illegal character: '\u3000'
?????????string str;
^
Main.java:11: error: illegal character: '\u3000'
?????????string str;
^
Main.java:11: error: illegal character: '\u3000'
?????????string str;
^
Main.java:11: error: illegal character: '\u3000'
?????????string str;
^
Main.java:11: error: illegal character: '\u3000'
?????????string str;
^
Main.java:11: error: illegal character: '\u3000'
?????????string str;
^
Main.java:11: error: illegal character: '\u3000'
?????????string str;
^
Main.java:12: error: illegal character: '\u3000'
?????????if(o==3) break;
^
Main.java:12: error: illegal character: '\u3000'
?????????if(o==3) break;
^
Main.java:12: error: illegal character: '\u3000'
?????????if(o==3) break;
^
Main.java:12: error: illegal character: '\u3000'
?????????if(o==3) break;
^
Main.java:12: error: illegal character: '\u3000'
?????????if(o==3) break;
^
Main.java:12: error: illegal character: '\u3000'
?????????if(o==3) break;
^
Main.java:12: error: illegal character: '\u3000'
?????????if(o==3) break;
^
Main.java:12: error: illegal character: '\u3000'
?????????if(o==3) break;
^
Main.java:12: error: illegal character: '\u3000'
?????????if(o==3) break;
^
Main.java:13: error: illegal character: '\u3000'
?????????cin >> str;
^
Main.java:13: error: illegal character: '\u3000'
?????????cin >> str;
^
Main.java:13: error: illegal character: '\u3000'
?????????cin >> str;
^
Main.java:13: error: illegal character: '\u3000'
?????????cin >> str;
^
Main.java:13: error: illegal character: '\u3000'
?????????cin >> str;
^
Main.java:13: error: illegal character: '\u3000'
?????????cin >> str;
^
Main.java:13: error: illegal character: '\u3000'
?????????cin >> str;
^
Main.java:13: error: illegal character: '\u3000'
?????????cin >> str;
^
Main.java:13: error: illegal character: '\u3000'
?????????cin >> str;
^
Main.java:13: error: not a statement
?????????cin >> str;
^
Main.java:14: error: illegal character: '\u3000'
?????????if(str=="HIT"){
^
Main.java:14: error: illegal character: '\u3000'
?????????if(str=="HIT"){
^
Main.java:14: error: illegal character: '\u3000'
?????????if(str=="HIT"){
^
Main.java:14: error: illegal character: '\u3000'
?????????if(str=="HIT"){
^
Main.java:14: error: illegal character: '\u3000'
?????????if(str=="HIT"){
^
Main.java:14: error: illegal character: '\u3000'
?????????if(str=="HIT"){
^
Main.java:14: error: illegal character: '\u3000'
?????????if(str=="HIT"){
^
Main.java:14: error: illegal character: '\u3000'
?????????if(str=="HIT"){
^
Main.java:14: error: illegal character: '\u3000'
?????????if(str=="HIT"){
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:15: error: illegal character: '\u3000'
????????????if(r==3) c++,r--;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:16: error: illegal character: '\u3000'
????????????r++;
^
Main.java:17: error: illegal character: '\u3000'
?????????}
^
Main.java:17: error: illegal character: '\u3000'
?????????}
^
Main.java:17: error: illegal character: '\u3000'
?????????}
^
Main.java:17: error: illegal character: '\u3000'
?????????}
^
Main.java:17: error: illegal character: '\u3000'
?????????}
^
Main.java:17: error: illegal character: '\u3000'
?????????}
^
Main.java:17: error: illegal character: '\u3000'
?????????}
^
Main.java:17: error: illegal character: '\u3000'
?????????}
^
Main.java:17: error: illegal character: '\u3000'
?????????}
^
Main.java:18: error: illegal character: '\u3000'
?????????else if(str=="OUT") o++;
^
Main.java:18: error: illegal character: '\u3000'
?????????else if(str=="OUT") o++;
^
Main.java:18: error: illegal character: '\u3000'
?????????else if(str=="OUT") o++;
^
Main.java:18: error: illegal character: '\u3000'
?????????else if(str=="OUT") o++;
^
Main.java:18: error: illegal character: '\u3000'
?????????else if(str=="OUT") o++;
^
Main.java:18: error: illegal character: '\u3000'
?????????else if(str=="OUT") o++;
^
100 errors
only showing the first 100 errors, of 103 total; use -Xmaxerrs if you would like to see more
printing javac parameters to: /w/javac.20260128_022403.args
|
s553207167 | p00103 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int p,r,a;
int n = sc.nextInt();
for(int i=0; i<n; i++){
a=0;r=0;p=0;
while(a<3){
String t = sc.next();
if(t.equal("HIT")){
r++;
if(r>3) {r--;p++;}
} else if(t.equal("OUT")){
a++;
} else {
p+=r+1;
r=0:
}
}
System.out.println(p);
}
}
} | Main.java:18: error: ';' expected
r=0:
^
1 error
|
s946927652 | p00103 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int p,r,a;
int n = sc.nextInt();
for(int i=0; i<n; i++){
a=0;r=0;p=0;
while(a<3){
String t = sc.next();
if(t.equal("HIT")){
r++;
if(r>3) {r--;p++;}
} else if(t.equal("OUT")){
a++;
} else {
p+=r+1;
r=0;
}
}
System.out.println(p);
}
}
} | Main.java:11: error: cannot find symbol
if(t.equal("HIT")){
^
symbol: method equal(String)
location: variable t of type String
Main.java:14: error: cannot find symbol
} else if(t.equal("OUT")){
^
symbol: method equal(String)
location: variable t of type String
2 errors
|
s550114383 | p00103 | Java | #include <iostream>
int main(int argc, const char * argv[]) {
int k;
int out = 0;
int hit = 0;
int numrun = 0;
int pointa = 0;
int pointb = 0;
int ining = 0;
std::cin >> ining;
int i = 1;
while(i < ining + 1){
std::string judge;
std::cin >> judge;
if(judge == "HIT"){
hit++;
if(hit == 4){
pointa++;
hit = hit - 1;
}
}
if(judge == "OUT"){
out++;
if(out >= 3){
i++;
std::cout << pointa << std::endl;
hit = 0;
out = 0;
pointa = 0;
}
}
if(judge == "HOMERUN"){
pointa = pointa + hit + 1;
hit = 0;
}
}
} | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
#include <iostream>
^
(use --enable-preview to enable unnamed classes)
Main.java:3: error: illegal start of type
int main(int argc, const char * argv[]) {
^
Main.java:3: error: class, interface, enum, or record expected
int main(int argc, const char * argv[]) {
^
Main.java:12: error: class, interface, enum, or record expected
std::cin >> ining;
^
Main.java:14: error: class, interface, enum, or record expected
while(i < ining + 1){
^
Main.java:16: error: class, interface, enum, or record expected
std::cin >> judge;
^
Main.java:18: error: class, interface, enum, or record expected
if(judge == "HIT"){
^
Main.java:20: error: class, interface, enum, or record expected
if(hit == 4){
^
Main.java:22: error: class, interface, enum, or record expected
hit = hit - 1;
^
Main.java:23: error: class, interface, enum, or record expected
}
^
Main.java:28: error: class, interface, enum, or record expected
if(out >= 3){
^
Main.java:30: error: class, interface, enum, or record expected
std::cout << pointa << std::endl;
^
Main.java:31: error: class, interface, enum, or record expected
hit = 0;
^
Main.java:32: error: class, interface, enum, or record expected
out = 0;
^
Main.java:33: error: class, interface, enum, or record expected
pointa = 0;
^
Main.java:34: error: class, interface, enum, or record expected
}
^
Main.java:39: error: class, interface, enum, or record expected
hit = 0;
^
Main.java:40: error: class, interface, enum, or record expected
}
^
19 errors
|
s897020244 | p00103 | Java | import java.util.Scanner;
public class Main {
private byte[] runner;
private static final int OUT_COUNT_FOR_CHANGE = 3;
enum EVENT {HIT, HOMERUN, OUT};
private byte out;
private int scoreOfInning;
public Main {
this.runner = new byte[3];
this.out = 0;
this.scoreOfInning = 0;
}
public boolean action(EVENT e) {
boolean isChange = false;
switch(e) {
case HIT:
scoreOfInning += hit();
break;
case HOMERUN:
scoreOfInning += homerun();
break;
case OUT:
isChange = out();
break;
default:
break;
}
return isChange;
}
private int hit() {
int ret = runner[2]==1 ? 1 : 0;
runner[2] = runner[1];
runner[1] = runner[0];
runner[0] = 1;
return ret;
}
private boolean out() {
out++;
if(out==OUT_COUNT_FOR_CHANGE) {
System.out.println(scoreOfInning);
out = 0;
scoreOfInning = 0;
clearRunner();
return true;
}
return false;
}
private int homerun() {
int ret = runner[0] + runner[1] + runner[2] + 1;
clearRunner();
return ret;
}
private void clearRunner() {
runner[0] = runner[1] = runner[2] = 0;
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
Main sim = new Main();
int numOfDataSet = in.nextInt();
EVENT e = EVENT.HIT;
for(int i=0; i<numOfDataSet; i++) {
do {
String event = in.next();
if(event.equals("HIT")) e = EVENT.HIT;
else if(event.equals("HOMERUN")) e = EVENT.HOMERUN;
else if(event.equals("OUT")) e = EVENT.OUT;
else System.exit(1);
} while(!sim.action(e));
}
}
} | Main.java:11: error: <identifier> expected
public Main {
^
1 error
|
s518996814 | p00103 | Java | import java.io.*;
public class Main{
public static void main(String[] args){
Scanner s = new Scanner(System.in);
int count_out = 0, inning;
int baseflag = 0;
String str = "";
String binary = "";
inning = s.nextInt();
int[] score = new int[inning];
while(count_out < inning * 3){
try{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
str = bf.readLine();
}catch(Exception e){
System.out.println(e);
}
if(str.equals("OUT")){
count_out++;
}else if(str.equals("HIT")){
baseflag = baseflag << 1;
baseflag++;
/* binary = Integer.toBinaryString(baseflag);
System.out.println(binary); */
if(baseflag > 8){
baseflag -= 8;
score[count_out/3]++;
/* binary = Integer.toBinaryString(baseflag);
System.out.println(binary); */
}
}else if(str.equals("HOMERUN")){
if(baseflag == 1 || baseflag == 2 || baseflag == 4){
score[count_out/3] += 2;
}else if(baseflag == 3 || baseflag == 5 || baseflag == 6){
score[count_out/3] += 3;
}else if(baseflag == 0){
score[count_out/3]++;
}else{
score[count_out/3] += 4;
}
baseflag = 0;
/* binary = Integer.toBinaryString(baseflag);
System.out.println(binary); */
}
}
for(int i = 0;i < inning;i++){
System.out.println(score[i]);
}
}
/* public static String read(){
try{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
String s = bf.readLine();
}catch(Exception e){
System.out.println(e);
}
return s;
}
*/
} | Main.java:5: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s270827167 | p00103 | Java | import java.io.*;
public class BaseballSimulation{
public static void main(String[] args){
Scanner s = new Scanner(System.in);
int count_out = 0, inning;
int baseflag = 0;
String str = "";
String binary = "";
inning = s.nextInt();
int[] score = new int[inning];
while(count_out < inning * 3){
try{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
str = bf.readLine();
}catch(Exception e){
System.out.println(e);
}
if(str.equals("OUT")){
count_out++;
}else if(str.equals("HIT")){
baseflag = baseflag << 1;
baseflag++;
if(baseflag > 8){
baseflag -= 8;
score[count_out/3]++;
}
}else if(str.equals("HOMERUN")){
if(baseflag == 1 || baseflag == 2 || baseflag == 4){
score[count_out/3] += 2;
}else if(baseflag == 3 || baseflag == 5 || baseflag == 6){
score[count_out/3] += 3;
}else if(baseflag == 0){
score[count_out/3]++;
}else{
score[count_out/3] += 4;
}
baseflag = 0;
}
}
for(int i = 0;i < inning;i++){
System.out.println(score[i]);
}
}
} | Main.java:3: error: class BaseballSimulation is public, should be declared in a file named BaseballSimulation.java
public class BaseballSimulation{
^
Main.java:5: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class BaseballSimulation
Main.java:5: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class BaseballSimulation
3 errors
|
s731049004 | p00103 | Java | import java.util.Scanner;
public class BaseballSimulation{
public static void main(String[] args){
Scanner s = new Scanner(System.in);
int count_out = 0, inning;
int baseflag = 0;
String str = "";
String binary = "";
inning = s.nextInt();
int[] score = new int[inning];
while(count_out < inning * 3){
try{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
str = bf.readLine();
}catch(Exception e){
System.out.println(e);
}
if(str.equals("OUT")){
count_out++;
}else if(str.equals("HIT")){
baseflag = baseflag << 1;
baseflag++;
if(baseflag > 8){
baseflag -= 8;
score[count_out/3]++;
}
}else if(str.equals("HOMERUN")){
if(baseflag == 1 || baseflag == 2 || baseflag == 4){
score[count_out/3] += 2;
}else if(baseflag == 3 || baseflag == 5 || baseflag == 6){
score[count_out/3] += 3;
}else if(baseflag == 0){
score[count_out/3]++;
}else{
score[count_out/3] += 4;
}
baseflag = 0;
}
}
for(int i = 0;i < inning;i++){
System.out.println(score[i]);
}
}
} | Main.java:3: error: class BaseballSimulation is public, should be declared in a file named BaseballSimulation.java
public class BaseballSimulation{
^
Main.java:18: error: cannot find symbol
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class BaseballSimulation
Main.java:18: error: cannot find symbol
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class BaseballSimulation
Main.java:18: error: cannot find symbol
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class BaseballSimulation
4 errors
|
s375665995 | p00103 | Java | import java.util.Scanner;
public class KmcProcon1 {
private static int[] base = {0, 0, 0};
private static int out = 0;
private static int score = 0;
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String input = scan.next();
int i = 0;
String[] arr = input.split("\n");
int dataset = Integer.parseInt(arr[0]);
i++;
for (int j = 0; j < dataset; j++) {
boolean game = true;
score =0;
while (game) {
switch (arr[i]) {
case "HIT":
if (base[2] == 1) {
score++;
base[2] = 0;
}
if (base[1] == 1) {
base[2] = 1;
base[1] = 0;
}
if (base[0] == 1) {
base[1] = 1;
base[0] = 0;
}
base[0] = 1;
break;
case "HOMERUN":
int runner = 1;
if (base[2] == 1) {
runner++;
base[2] = 0;
}
if (base[1] == 1) {
runner++;
base[1] = 0;
}
if (base[0] == 1) {
runner++;
base[0] = 0;
}
score += runner;
break;
case "OUT":
out++;
if (out > 2) {
game = false;
}
break;
}
i++;
}
System.out.println(score);
}
}
} | Main.java:2: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java
public class KmcProcon1 {
^
1 error
|
s757140439 | p00103 | Java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package kmcprocon1;
import java.util.Scanner;
public class KmcProcon1 {
private static int[] base = {0, 0, 0};
private static int out = 0;
private static int score = 0;
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String input = scan.next();
int i = 0;
String[] arr = input.split("\n");
int dataset = Integer.parseInt(arr[0]);
i++;
for (int j = 0; j < dataset; j++) {
boolean game = true;
score =0;
while (game) {
switch (arr[i]) {
case "HIT":
if (base[2] == 1) {
score++;
base[2] = 0;
}
if (base[1] == 1) {
base[2] = 1;
base[1] = 0;
}
if (base[0] == 1) {
base[1] = 1;
base[0] = 0;
}
base[0] = 1;
break;
case "HOMERUN":
int runner = 1;
if (base[2] == 1) {
runner++;
base[2] = 0;
}
if (base[1] == 1) {
runner++;
base[1] = 0;
}
if (base[0] == 1) {
runner++;
base[0] = 0;
}
score += runner;
break;
case "OUT":
out++;
if (out > 2) {
game = false;
}
break;
}
i++;
}
System.out.println(score);
}
}
} | Main.java:9: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java
public class KmcProcon1 {
^
1 error
|
s117543683 | p00103 | Java |
package kmcprocon1;
import java.util.Scanner;
public class KmcProcon1 {
public static void main(String[] args) {
int out = 0;
int score;
int[] base = {0, 0, 0};
Scanner scan = new Scanner(System.in);
String input = scan.next();
int i = 0;
String[] arr = input.split("\n");
int dataset = Integer.parseInt(arr[0]);
i++;
for (int j = 0; j < dataset; j++) {
boolean game = true;
score =0;
while (game) {
switch (arr[i]) {
case "HIT":
if (base[2] == 1) {
score++;
base[2] = 0;
}
if (base[1] == 1) {
base[2] = 1;
base[1] = 0;
}
if (base[0] == 1) {
base[1] = 1;
base[0] = 0;
}
base[0] = 1;
break;
case "HOMERUN":
int runner = 1;
if (base[2] == 1) {
runner++;
base[2] = 0;
}
if (base[1] == 1) {
runner++;
base[1] = 0;
}
if (base[0] == 1) {
runner++;
base[0] = 0;
}
score += runner;
break;
case "OUT":
out++;
if (out > 2) {
game = false;
}
break;
}
i++;
}
System.out.println(score);
}
}
} | Main.java:6: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java
public class KmcProcon1 {
^
1 error
|
s020994745 | p00103 | Java | package kmcprocon1;
import java.util.Scanner;
public class KmcProcon1 {
public static void main(String[] args) {
int out = 0;
int score;
int[] base = {0, 0, 0};
Scanner scan = new Scanner(System.in);
int i = 0;
int dataset = Integer.parseInt(scan.nextLine());
i++;
for (int j = 0; j < dataset; j++) {
boolean game = true;
score = 0;
while (game) {
switch (scan.nextLine()) {
case "HIT":
if (base[2] == 1) {
score++;
base[2] = 0;
}
if (base[1] == 1) {
base[2] = 1;
base[1] = 0;
}
if (base[0] == 1) {
base[1] = 1;
base[0] = 0;
}
base[0] = 1;
break;
case "HOMERUN":
int runner = 1;
if (base[2] == 1) {
runner++;
base[2] = 0;
}
if (base[1] == 1) {
runner++;
base[1] = 0;
}
if (base[0] == 1) {
runner++;
base[0] = 0;
}
score += runner;
break;
case "OUT":
out++;
if (out > 2) {
game = false;
}
break;
}
i++;
}
System.out.println(score);
}
}
} | Main.java:5: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java
public class KmcProcon1 {
^
1 error
|
s843218701 | p00103 | Java | package kmcprocon1;
import java.util.Scanner;
public class KmcProcon1 {
public static void main(String[] args) {
int out = 0;
int score;
int[] base = {0, 0, 0};
Scanner scan = new Scanner(System.in);
int i = 0;
int dataset = Integer.parseInt(scan.nextLine());
i++;
for (int j = 0; j < dataset; j++) {
boolean game = true;
score = 0;
out = 0;
while (game) {
switch (scan.nextLine()) {
case "HIT":
if (base[2] == 1) {
score++;
base[2] = 0;
}
if (base[1] == 1) {
base[2] = 1;
base[1] = 0;
}
if (base[0] == 1) {
base[1] = 1;
base[0] = 0;
}
base[0] = 1;
break;
case "HOMERUN":
int runner = 1;
if (base[2] == 1) {
runner++;
base[2] = 0;
}
if (base[1] == 1) {
runner++;
base[1] = 0;
}
if (base[0] == 1) {
runner++;
base[0] = 0;
}
score += runner;
break;
case "OUT":
out++;
if (out > 2) {
game = false;
}
break;
}
i++;
}
System.out.println(score);
}
}
} | Main.java:5: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java
public class KmcProcon1 {
^
1 error
|
s212623161 | p00103 | Java | package kmcprocon1;
import java.util.Scanner;
public class KmcProcon1 {
public static void main(String[] args) {
int out = 0;
int score;
int[] base = {0, 0, 0};
Scanner scan = new Scanner(System.in);
int i = 0;
int dataset = Integer.parseInt(scan.nextLine());
i++;
for (int j = 0; j < dataset; j++) {
boolean game = true;
score = 0;
out = 0;
while (game) {
switch (scan.nextLine()) {
case "HIT":
if (base[2] == 1) {
score++;
base[2] = 0;
}
if (base[1] == 1) {
base[2] = 1;
base[1] = 0;
}
if (base[0] == 1) {
base[1] = 1;
base[0] = 0;
}
base[0] = 1;
break;
case "HOMERUN":
int runner = 1;
if (base[2] == 1) {
runner++;
base[2] = 0;
}
if (base[1] == 1) {
runner++;
base[1] = 0;
}
if (base[0] == 1) {
runner++;
base[0] = 0;
}
score += runner;
break;
case "OUT":
out++;
if (out > 2) {
game = false;
}
break;
}
i++;
}
System.out.println(score);
}
}
} | Main.java:5: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java
public class KmcProcon1 {
^
1 error
|
s839156663 | p00103 | Java | package kmcprocon1;
import java.util.Scanner;
public class KmcProcon1 {
public static void main(String[] args) {
int out;
int score;
int[] base = {0, 0, 0};
Scanner scan = new Scanner(System.in);
int i = 0;
int dataset = Integer.parseInt(scan.nextLine());
for (int j = 0; j < dataset; j++) {
boolean game = true;
score = 0;
out = 0;
base[0] = 0;
base[1] = 0;
base[2] = 0;
while (game) {
switch (scan.nextLine()) {
case "HIT":
if (base[2] == 1) {
score++;
base[2] = 0;
}
if (base[1] == 1) {
base[2] = 1;
base[1] = 0;
}
if (base[0] == 1) {
base[1] = 1;
base[0] = 0;
}
base[0] = 1;
break;
case "HOMERUN":
int runner = 1;
if (base[2] == 1) {
runner++;
base[2] = 0;
}
if (base[1] == 1) {
runner++;
base[1] = 0;
}
if (base[0] == 1) {
runner++;
base[0] = 0;
}
score += runner;
break;
case "OUT":
out++;
if (out > 2) {
game = false;
}
break;
}
i++;
}
System.out.println(score);
}
}
} | Main.java:5: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java
public class KmcProcon1 {
^
1 error
|
s146357613 | p00103 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Baseball_Simulation {
public static void main(String[] args) throws Exception {
// TODO ?????????????????????????????????????????????
boolean[] arg = null;
int length=0,out=0;
int i=0;
boolean first=true;
int[] score=null;
boolean[] rui=new boolean[3];
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
String line;
while ((line = br.readLine()) != null ) {
if(first){
length=Integer.parseInt(line);
score=new int[length];
first=false;
}else{
if(line=="OUT"){
out++;
}else if(line=="HIT"){
if(rui[2]){
score[i]++;
rui[2]=false;
}
if(rui[1]){
rui[2]=true;
rui[1]=false;
}
if(rui[0]){
rui[1]=true;
}
rui[0]=true;
}else if(line=="HOMERUN"){
score[i]++;
for(int j=0;j<3;j++){
if(rui[j]){
score[i]++;
}
}
}
}
if(out==3){
rui=new boolean[3];
i++;
if(length==i){
break;
}
}
}
for(int k=0;k<score.length;k++){
System.out.println(score[k]);
}
}
}
} | Main.java:4: error: class Baseball_Simulation is public, should be declared in a file named Baseball_Simulation.java
public class Baseball_Simulation {
^
1 error
|
s053388365 | p00103 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Baseball_Simulation {
public static void main(String[] args) throws Exception {
// TODO ?????????????????????????????????????????????
boolean[] arg = null;
int length=0,out=0;
int i=0;
boolean first=true;
int[] score=null;
boolean[] rui=new boolean[3];
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
String line;
while ((line = br.readLine()) != null ) {
if(first){
length=Integer.parseInt(line);
score=new int[length];
first=false;
}else{
if(line=="OUT"){
out++;
}else if(line=="HIT"){
if(rui[2]){
score[i]++;
rui[2]=false;
}
if(rui[1]){
rui[2]=true;
rui[1]=false;
}
if(rui[0]){
rui[1]=true;
}
rui[0]=true;
}else if(line=="HOMERUN"){
score[i]++;
for(int j=0;j<3;j++){
if(rui[j]){
score[i]++;
}
}
}
}
if(out==3){
rui=new boolean[3];
i++;
if(length==i){
break;
}
}
}
for(int k=0;k<score.length;k++){
System.out.println(score[k]);
}
}
}
} | Main.java:4: error: class Baseball_Simulation is public, should be declared in a file named Baseball_Simulation.java
public class Baseball_Simulation {
^
1 error
|
s761784722 | p00103 | Java | import java.io.*;
import java.util.ArrayList;
import java.util.List;
public class Main {
private static List<String> base = new ArrayList<String>();
private static int score = 0;
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
int out = 0;
while((str = br.readLine())!=null)
{
if(str.equals("HIT"))
{
calHit();
}
if(str.equals("HOMERUN"))
{
calHomerun();
}
if(str.equals("OUT"))
{
out++;
}
if(out==3)
{
System.out.println(score);
break;
}
}
}catch (Exception e) {
e.printStackTrace();
}
}
private static void calHit() {
if(base.size()==0 || base.size()==1 || base.size()==2)
{
base.add("Runner");
}
else if(base.size()==3)
{
score++;
}
}
private static void calHomerun() {
score = score+base.size()+1;
base.clear();
} | Main.java:80: error: reached end of file while parsing
}
^
1 error
|
s278497944 | p00103 | Java | import java.io.*;
public class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
int out = 0;
int runner = 0;
int score = 0;
while((str = br.readLine())!=null)
{
if(str.equals("HIT"))
{
if(runner<3)
{
runner++;
}
else
{
score++;
}
}
if(str.equals("HOMERUN"))
{
score = score + runner + 1;
runner = 0;
}
if(str.equals("OUT"))
{
out++;
}
if(out==3)
{
System.out.println(score);
break;
}
}
}catch (Exception e) {
e.printStackTrace();
}
} | Main.java:54: error: reached end of file while parsing
}
^
1 error
|
s892915335 | p00103 | Java | import java.io.*;
import java.util.*;
public class Main {
// private static List<String> base = new ArrayList<String>();
// private static int score = 0;
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int out = 0;
int runner = 0;
int score = 0;
int num = Integer.parseInt(br.readLine());
for(int i=0; i<num; i++)
{
String str;
while(out<3)
{
str=br.readLine();
if(str.equals("HIT"))
{
if(runner==3)
{
score++;
}
else
{
runner++;
}
}
else if(str.equals("HOMERUN"))
{
score += runner + 1;
runner = 0;
}
else
{
out++;
}
}
}
System.out.println(score);
}catch (Exception e) {
e.printStackTrace();
}
} | Main.java:65: error: reached end of file while parsing
}
^
1 error
|
s794286570 | p00103 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;
public class BaseballSimulation103k {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
List<Integer> field = Arrays.asList(0,0,0);
long scoreCount = 0;
int outCount = 0;
int finishedGame = 0;
try {
int gameNumber = br.read();
while (finishedGame < gameNumber) {
br = new BufferedReader(new InputStreamReader(System.in));
switch (br.readLine()) {
case hit:
if(field.get(2)==1) {
scoreCount++;
}
field.remove(2);
field.add(0, 1);
break;
case out:
outCount++;
if (outCount == 3) {
System.out.println(scoreCount);
scoreCount = 0;
outCount = 0;
field = Arrays.asList(0,0,0);
finishedGame++;
}
break;
case homerun:
field = Arrays.asList(0,0,0);
scoreCount += 1 + field.stream().filter(base -> base==1).count();
break;
}
}
System.exit(0);
} catch (IOException e) {
e.printStackTrace();
}
}
private final static String hit = "HIT";
private final static String out = "OUT";
private final static String homerun = "HOMERUN";
} | Main.java:7: error: class BaseballSimulation103k is public, should be declared in a file named BaseballSimulation103k.java
public class BaseballSimulation103k {
^
1 error
|
s150078985 | p00103 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
??
public class Main {
????????public static void main(String[] args) {
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
????????????????int field = 0;
????????????????long scoreCount = 0;
????????????????int outCount = 0;
????????????????int finishedGame = 0;
????????????????String line = "";
????????????????try {
????????????????????????int gameNumber = br.read();
????????????????????????while (finishedGame != gameNumber) {
????????????????????????????????line = br.readLine();
????????????????????????????????switch (line) {
????????????????????????????????case "HIT":
????????????????????????????????????????if(field==3) {
????????????????????????????????????????????????scoreCount++;
????????????????????????????????????????????????field--;
????????????????????????????????????????}
????????????????????????????????????????field++;
????????????????????????????????????????break;
????????????????????????????????case "OUT":
????????????????????????????????????????outCount++;
????????????????????????????????????????if (outCount == 3) {
????????????????????????????????????????????????System.out.println(scoreCount);
????????????????????????????????????????????????scoreCount = 0;
????????????????????????????????????????????????outCount = 0;
????????????????????????????????????????????????field = 0;
????????????????????????????????????????????????finishedGame++;
????????????????????????????????????????}
????????????????????????????????????????break;
????????????????????????????????case "HOMERUN":
????????????????????????????????????????scoreCount += 1 + field;
????????????????????????????????????????field = 0;
????????????????????????????????????????break;
????????????????????????????????}
????????????????????????}
????????????????????????br.close();
????????????????} catch (IOException e) {
????????????????????????e.printStackTrace();
????????????????}
????????}
} | Main.java:4: error: class, interface, enum, or record expected
??
^
Main.java:6: error: illegal start of type
????????public static void main(String[] args) {
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: : expected
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:7: error: : expected
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: illegal start of expression
????????????????int field = 0;
^
Main.java:8: error: '.class' expected
????????????????int field = 0;
^
Main.java:8: error: : expected
????????????????int field = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: illegal start of expression
????????????????long scoreCount = 0;
^
Main.java:9: error: '.class' expected
????????????????long scoreCount = 0;
^
Main.java:9: error: : expected
????????????????long scoreCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: illegal start of expression
????????????????int outCount = 0;
^
Main.java:10: error: '.class' expected
????????????????int outCount = 0;
^
Main.java:10: error: : expected
????????????????int outCount = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: illegal start of expression
????????????????int finishedGame = 0;
^
Main.java:11: error: '.class' expected
????????????????int finishedGame = 0;
^
Main.java:11: error: : expected
????????????????int finishedGame = 0;
^
Main.java:12: error: illegal start of expression
????????????????String line = "";
^
Main.java:12: error: illegal start of expression
????????????????String line = "";
^
Main.java:12: error: illegal start of expression
????????????????String line = "";
^
Main.java:12: error: illegal start of expression
????????????????String line = "";
^
Main.java:12: error: illegal start of expression
????????????????String line = "";
^
Main.java:12: error: illegal start of expression
????????????????String line = "";
^
Main.java:12: error: illegal start of expression
????????????????String line = "";
^ |
s580209468 | p00103 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
List<Integer> field = new ArrayList<>(Arrays.asList(0,0,0));
long scoreCount = 0;
int outCount = 0;
try {
int gameNumber = Integer.parseInt(Objects.requireNonNull(br.readLine());
while (gameNumber>0) {
String line = Objects.requireNonNull(br.readLine());
if(line.equals("HIT")) {
if(field.get(2)==1) {
scoreCount++;
}
field.remove(2);
field.add(0, 1);
}else if(line.equals("OUT")) {
outCount++;
if (outCount == 3) {
System.out.println(scoreCount);
scoreCount = 0;
outCount = 0;
field = new ArrayList<>(Arrays.asList(0,0,0));
gameNumber--;
}
}else if(line.equals("HOMERUN")) {
scoreCount += 1 + field.stream().filter(base -> base==1).count();
field = new ArrayList<>(Arrays.asList(0,0,0));
}
}
System.exit(0);
} catch (IOException e) {
e.printStackTrace();
}
}
} | Main.java:15: error: ')' or ',' expected
int gameNumber = Integer.parseInt(Objects.requireNonNull(br.readLine());
^
1 error
|
s069270891 | p00103 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
List<Integer> field = new ArrayList<>(Arrays.asList(0,0,0));
long scoreCount = 0;
int outCount = 0;
try {
int gameNumber = Integer.parseInt(Objects.requireNonNull(br.readLine());
while (gameNumber>0) {
String line = br.readLine();
if(line.equals("HIT")) {
if(field.get(2)==1) {
scoreCount++;
}
field.remove(2);
field.add(0, 1);
}else if(line.equals("OUT")) {
outCount++;
if (outCount == 3) {
System.out.println(scoreCount);
scoreCount = 0;
outCount = 0;
field = new ArrayList<>(Arrays.asList(0,0,0));
gameNumber--;
}
}else if(line.equals("HOMERUN")) {
scoreCount += 1 + field.stream().filter(base -> base==1).count();
field = new ArrayList<>(Arrays.asList(0,0,0));
}
}
System.exit(0);
} catch (IOException e) {
e.printStackTrace();
}
}
} | Main.java:15: error: ')' or ',' expected
int gameNumber = Integer.parseInt(Objects.requireNonNull(br.readLine());
^
1 error
|
s361640939 | p00103 | Java | import java.util.*;
public class Main {
public static void main(String[] a){
Scanner s = new Scanner(System.in);int n=Integer.valueOf(s.next());for(;n-->0;){for(int h=0,o=0;o<3;){switch(s.next().charAt(1)) {case'I':h++;if((h&3)==0)h|=3;break;case'O':h+=(((h&3)+1)<<2);h&=~3;break;default:o++;}System.out.println(h>>2)}}}} | Main.java:4: error: ';' expected
Scanner s = new Scanner(System.in);int n=Integer.valueOf(s.next());for(;n-->0;){for(int h=0,o=0;o<3;){switch(s.next().charAt(1)) {case'I':h++;if((h&3)==0)h|=3;break;case'O':h+=(((h&3)+1)<<2);h&=~3;break;default:o++;}System.out.println(h>>2)}}}}
^
1 error
|
s369408785 | p00103 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class BaseballSimulation {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws NumberFormatException, IOException {
// TODO 自動生成されたメソッド・スタブ
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
int set, outcount, runs, first, second, third;
String event;
List<Integer> list = new ArrayList<Integer>();
set = Integer.parseInt(bufferedReader.readLine());
for(int i = 0; i < set; i++){
outcount = runs = first = second = third = 0;
while (outcount < 3) {
event = bufferedReader.readLine();
if (event.equals("HIT")){
if(third == 1){
third = 0;
runs++;
}
if(second == 1){
second = 0;
third = 1;
}
if(first == 1){
first = 0;
second = 1;
}
first = 1;
}else if(event.equals("HOMERUN")){
runs += (first + second + third + 1);
first = second = third = 0;
}else if(event.equals("OUT")){
outcount++;
}
}
list.add(runs);
}
for(int value : list) System.out.println(value);
}
} | Main.java:7: error: class BaseballSimulation is public, should be declared in a file named BaseballSimulation.java
public class BaseballSimulation {
^
1 error
|
s427096674 | p00103 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t--=0){
int runner = 0;
int point = 0;
int out = 0;
while(out < 3){
String c = sc.next();
if(c.equals("HIT")){
if(runner<3)runner++;
else point++;
}
else if(c.equals("HOMERUN")){
point += runner+1;
runner = 0;
}
else{
out++;
}
}
System.out.println(point);
}
}
} | Main.java:9: error: unexpected type
while(t--=0){
^
required: variable
found: value
1 error
|
s162122559 | p00103 | C | #include <stdio.h>
int a[3];
int b[3];
int out;
int asum, bsum;
int main(void) {
int i, j;
int set;
int flag = 0;
char buf[10];
scanf("%d", &set);
for (i = 0; i < set; i++){
scanf("%s", buf);
if (flag == 0){
if (buf[0] == 'H' && buf[1] == 'I'){
asum += a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = 1;
}
else if (buf[0] == 'H' && buf[1] == 'O'){
asum += a[2] + a[1] + a[0];
}
else {
out++;
}
if (out == 3){
a[0] = a[1] = a[2] = 0;
flag = 1;
}
}
else {
if (buf[0] == 'H' && buf[1] == 'I'){
bsum += b[2];
b[2] = b[1];
b[1] = b[0];
b[0] = 1;
}
else if (buf[0] == 'H' && buf[1] == 'O'){
bsum += b[2] + b[1] + b[0];
}
else {
out++;
}
if (out == 3){
b[0] = b[1] = b[2] = 0;
flag = 0;
}
}
printf("%d\n%d\n", asum, bsum);
// your code goes here
return 0;
} | main.c: In function 'main':
main.c:56:1: error: expected declaration or statement at end of input
56 | }
| ^
|
s920607061 | p00103 | C | #include <stdio.h>
int a[3];
int b[3];
int out;
int asum, bsum;
int main(void){
int i;
int set;
int flag = 0;
char buf[10];
scanf("%d", &set);
for (i = 0; i < set; i++){
scanf("%s", buf);
if (flag == 0){
if (buf[0] == 'H' && buf[1] == 'I'){
asum += a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = 1;
}
else if (buf[0] == 'H' && buf[1] == 'O'){
asum += a[2] + a[1] + a[0] + 1;
}
else {
out++;
}
if (out == 3){
a[0] = a[1] = a[2] = 0;
flag = 1;
}
}
else {
if (buf[0] == 'H' && buf[1] == 'I'){
bsum += b[2];
b[2] = b[1];
b[1] = b[0];
b[0] = 1;
}
else if (buf[0] == 'H' && buf[1] == 'O'){
bsum += b[2] + b[1] + b[0] + 1;
}
else {
out++;
}
if (out == 3){
b[0] = b[1] = b[2] = 0;
flag = 0;
}
}
printf("%d\n%d\n", asum, bsum);
return 0;
} | main.c: In function 'main':
main.c:55:1: error: expected declaration or statement at end of input
55 | }
| ^
|
s417486734 | p00103 | C | #include <stdio.h>
int a[3];
int out;
int asum;
int main(void){
int i;
int set;
char buf[10];
scanf("%d", &set);
for (i = 0; i < set; i++){
scanf("%s", buf);
if (buf[0] == 'H' && buf[1] == 'I'){
asum += a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = 1;
}
else if (buf[0] == 'H' && buf[1] == 'O'){
asum += a[2] + a[1] + a[0] + 1;
}
else {
out++;
}
if (out == 3){
a[0] = a[1] = a[2] = 0;
printf("%d\n", asum);
}
}
}
return 0;
} | main.c:33:9: error: expected identifier or '(' before 'return'
33 | return 0;
| ^~~~~~
main.c:34:1: error: expected identifier or '(' before '}' token
34 | }
| ^
|
s588646999 | p00103 | C | #include <stdio.h>
int a[3];
int out;
int sum[1000];
int main(void){
int i;
int set;
char buf[10];
scanf("%d", &set);
for (i = 0; i < set; i++){
scanf("%s", buf);
if (buf[0] == 'H' && buf[1] == 'I'){
sum[i] += a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = 1;
}
else if (buf[0] == 'H' && buf[1] == 'O'){
sum[i] += a[2] + a[1] + a[0] + 1;
}
else {
out++;
}
if (out == 3){
a[0] = a[1] = a[2] = 0;
out = 0;
buf = "aiueoaiueo"
}
}
for (i = 0; i < set; i++){printf("%d\n", sum[i]);
return 0;
} | main.c: In function 'main':
main.c:31:29: error: assignment to expression with array type
31 | buf = "aiueoaiueo"
| ^
main.c:31:43: error: expected ';' before '}' token
31 | buf = "aiueoaiueo"
| ^
| ;
32 | }
| ~
main.c:36:1: error: expected declaration or statement at end of input
36 | }
| ^
|
s849856152 | p00103 | C | #include <stdio.h>
int a[3];
int out;
int sum[1000];
int main(void){
int i;
int set;
char buf[10];
scanf("%d", &set);
for (i = 0; i < set; i++){
scanf("%s", buf);
if (buf[0] == 'H' && buf[1] == 'I'){
sum[i] += a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = 1;
}
else if (buf[0] == 'H' && buf[1] == 'O'){
sum[i] += a[2] + a[1] + a[0] + 1;
}
else {
out++;
}
if (out == 3){
a[0] = a[1] = a[2] = 0;
out = 0;
buf = "aiueoaiueo";
}
}
for (i = 0; i < set; i++){printf("%d\n", sum[i]);
return 0;
} | main.c: In function 'main':
main.c:31:29: error: assignment to expression with array type
31 | buf = "aiueoaiueo";
| ^
main.c:36:1: error: expected declaration or statement at end of input
36 | }
| ^
|
s633472650 | p00103 | C | #include <stdio.h>
int a[3];
int out;
int sum[1000];
int main(void){
int i;
int set;
char buf[10];
scanf("%d", &set);
for (i = 0; i < set; i++){
scanf("%s", buf);
if (buf[0] == 'H' && buf[1] == 'I'){
sum[i] += a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = 1;
}
else if (buf[0] == 'H' && buf[1] == 'O'){
sum[i] += a[2] + a[1] + a[0] + 1;
}
else {
out++;
}
if (out == 3){
a[0] = a[1] = a[2] = 0;
out = 0;
}
}
for (i = 0; i < set; i++){printf("%d\n", sum[i]);
return 0;
} | main.c: In function 'main':
main.c:35:1: error: expected declaration or statement at end of input
35 | }
| ^
|
s445879603 | p00103 | C | #include <stdio.h>
int a[3];
int out;
int sum[1000];
int main(void){
int i;
int set;
char buf[10];
scanf("%d", &set);
for (i = 0; i < set; i++){
scanf("%s", buf);
sum[i] += a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = 1;
}
else if (buf[0] == 'H' && buf[1] == 'O'){
sum[i] += a[2] + a[1] + a[0] + 1;
}
else {
out++;
}
if (out == 3){
a[0] = a[1] = a[2] = 0;
out = 0;
}
}
for (i = 0; i < set; i++){printf("%d\n", sum[i])};
return 0;
}
if (buf[0] == 'H' && buf[1] == 'I'){ | main.c: In function 'main':
main.c:20:17: error: 'else' without a previous 'if'
20 | else if (buf[0] == 'H' && buf[1] == 'O'){
| ^~~~
main.c: At top level:
main.c:32:9: error: expected identifier or '(' before 'for'
32 | for (i = 0; i < set; i++){printf("%d\n", sum[i])};
| ^~~
main.c:32:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
32 | for (i = 0; i < set; i++){printf("%d\n", sum[i])};
| ^
main.c:32:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
32 | for (i = 0; i < set; i++){printf("%d\n", sum[i])};
| ^~
main.c:33:9: error: expected identifier or '(' before 'return'
33 | return 0;
| ^~~~~~
main.c:34:1: error: expected identifier or '(' before '}' token
34 | }
| ^
main.c:36:17: error: expected identifier or '(' before 'if'
36 | if (buf[0] == 'H' && buf[1] == 'I'){
| ^~
|
s914167531 | p00103 | C | #include <stdio.h>
int a[3];
int out;
int sum[1000];
int main(void){
int i;
int set;
char buf[10];
scanf("%d", &set);
for (i = 0; i < set; i++){
scanf("%s", buf);
if (buf[0] == 'H' && buf[1] == 'I'){
sum[i] += a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = 1;
}
else if (buf[0] == 'H' && buf[1] == 'O'){
sum[i] += a[2] + a[1] + a[0] + 1;
}
else {
out++;
}
if (out == 3){
a[0] = a[1] = a[2] = 0;
out = 0;
}
}
for (i = 0; i < set; i++){printf("%d\n", sum[i])};
return 0;
}
if (buf[0] == 'H' && buf[1] == 'I'){ | main.c: In function 'main':
main.c:33:57: error: expected ';' before '}' token
33 | for (i = 0; i < set; i++){printf("%d\n", sum[i])};
| ^
| ;
main.c: At top level:
main.c:37:17: error: expected identifier or '(' before 'if'
37 | if (buf[0] == 'H' && buf[1] == 'I'){
| ^~
|
s354620412 | p00103 | C | #include <stdio.h>
#include <string.h>
int a[3];
int out;
int sum;
int main(void){
int i;
int set;
char buf[8];
char hit[4] = "HIT", out[4]="OUT", homerun[8]="HOMERUN";
scanf("%d", &set);
for (i = 0; i < set; i++){
scanf("%s", buf);
if (strcmp(buf, hit) > 0){
sum += a[2];
a[2] = a[1];
a[1] = a[0];
a[0] = 1;
}
else if (strcmp(buf, homerun) > 0){
sum += a[2] + a[1] + a[0] + 1;
}
else if (strcmp(buf, out) > 0){
out++;
}
if (out == 3){
a[0] = a[1] = a[2] = 0;
out = 0;
sum = 0;
printf("%d\n", sum);
}
}
return 0;
} | main.c: In function 'main':
main.c:27:28: error: lvalue required as increment operand
27 | out++;
| ^~
main.c:30:25: warning: comparison between pointer and integer
30 | if (out == 3){
| ^~
main.c:32:29: error: assignment to expression with array type
32 | out = 0;
| ^
|
s463389764 | p00103 | C | #include<stdio.h>
#include<iostream>
using namespace std;
int main(void)
{
int n,i=0,out=0,g=0;
int cange=0,score[2]={0,0};
char evn[100][7];
int base[4]={0,0,0,0};
cin >> n;
while(n!=g){
cin >> evn[i];
if(evn[i][1]=='I'){
base[3]+=base[2];
base[2]=base[1];
base[1]=base[0];
base[0]=1;
}
if(evn[i][1]=='O'){
base[3]+=base[2]+base[1]+base[0]+1;
base[2]=0;base[1]=0;base[0]=0;
}
if(evn[i][0]=='O'){
out++;
}
if(out==3){
out=0;
base[0]=0;
base[1]=0;
base[2]=0;
if(cange==0){
score[0]=base[3];
base[3]=0;
cange=1;
g++;
}
else{
score[1]=base[3];
score[3]=0;
cange=0;
g++;
}
}
}
cout << score[0] << endl <<score[1];
return 0;
} | main.c:2:9: fatal error: iostream: No such file or directory
2 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s958107437 | p00103 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
int *A;
const char *H[4] = "HIT";
const char *R[8] = "HOMERUN";
const char *O[4] = "OUT";
while(1){
int score = 0;
int runner = 0;
int out = 0;
scanf("%s",*char s[10]);
if(strcmp(s,H) == 0)
{
runner++;
if(runnner == 4)
{
score++;
runner--;
}
}
else if(strcmp(s,R) == 0)
{
score = score + runner + 1;
runner = 0;
}
else if(strcmp(s,O) == 0) out++;
if(out == 3) printf("%d",score);
}
return 0;
} | main.c: In function 'main':
main.c:7:28: error: invalid initializer
7 | const char *H[4] = "HIT";
| ^~~~~
main.c:8:28: error: invalid initializer
8 | const char *R[8] = "HOMERUN";
| ^~~~~~~~~
main.c:9:28: error: invalid initializer
9 | const char *O[4] = "OUT";
| ^~~~~
main.c:14:29: error: expected expression before 'char'
14 | scanf("%s",*char s[10]);
| ^~~~
main.c:15:27: error: 's' undeclared (first use in this function)
15 | if(strcmp(s,H) == 0)
| ^
main.c:15:27: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:29: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
15 | if(strcmp(s,H) == 0)
| ^
| |
| const char **
In file included from main.c:3:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'const char **'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
main.c:18:28: error: 'runnner' undeclared (first use in this function); did you mean 'runner'?
18 | if(runnner == 4)
| ^~~~~~~
| runner
main.c:24:34: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
24 | else if(strcmp(s,R) == 0)
| ^
| |
| const char **
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'const char **'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
main.c:29:34: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
29 | else if(strcmp(s,O) == 0) out++;
| ^
| |
| const char **
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'const char **'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
|
s142824803 | p00103 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
int *A;
const char *H[4] = "HIT";
const char *R[8] = "HOMERUN";
const char *O[4] = "OUT";
while(1){
int score = 0;
int runner = 0;
int out = 0;
*char s[10];
scanf("%s",s);
if(strcmp(s,H) == 0)
{
runner++;
if(runnner == 4)
{
score++;
runner--;
}
}
else if(strcmp(s,R) == 0)
{
score = score + runner + 1;
runner = 0;
}
else if(strcmp(s,O) == 0) out++;
if(out == 3) printf("%d",score);
}
return 0;
} | main.c: In function 'main':
main.c:7:28: error: invalid initializer
7 | const char *H[4] = "HIT";
| ^~~~~
main.c:8:28: error: invalid initializer
8 | const char *R[8] = "HOMERUN";
| ^~~~~~~~~
main.c:9:28: error: invalid initializer
9 | const char *O[4] = "OUT";
| ^~~~~
main.c:14:18: error: expected expression before 'char'
14 | *char s[10];
| ^~~~
main.c:15:28: error: 's' undeclared (first use in this function)
15 | scanf("%s",s);
| ^
main.c:15:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:29: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
16 | if(strcmp(s,H) == 0)
| ^
| |
| const char **
In file included from main.c:3:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'const char **'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
main.c:19:28: error: 'runnner' undeclared (first use in this function); did you mean 'runner'?
19 | if(runnner == 4)
| ^~~~~~~
| runner
main.c:25:34: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
25 | else if(strcmp(s,R) == 0)
| ^
| |
| const char **
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'const char **'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
main.c:30:34: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
30 | else if(strcmp(s,O) == 0) out++;
| ^
| |
| const char **
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'const char **'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
|
s711718687 | p00103 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
int *A;
const char H[4] = "HIT";
const char R[8] = "HOMERUN";
const char O[4] = "OUT";
while(1){
int score = 0;
int runner = 0;
int out = 0;
*char s[10];
scanf("%s",s);
if(strcmp(s,H) == 0)
{
runner++;
if(runnner == 4)
{
score++;
runner--;
}
}
else if(strcmp(s,R) == 0)
{
score = score + runner + 1;
runner = 0;
}
else if(strcmp(s,O) == 0) out++;
if(out == 3) printf("%d",score);
}
return 0;
} | main.c: In function 'main':
main.c:14:18: error: expected expression before 'char'
14 | *char s[10];
| ^~~~
main.c:15:28: error: 's' undeclared (first use in this function)
15 | scanf("%s",s);
| ^
main.c:15:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:28: error: 'runnner' undeclared (first use in this function); did you mean 'runner'?
19 | if(runnner == 4)
| ^~~~~~~
| runner
|
s123914069 | p00103 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
int *A;
const char H[4] = "HIT";
const char R[8] = "HOMERUN";
const char O[4] = "OUT";
while(1){
int score = 0;
int runner = 0;
int out = 0;
char s[10];
scanf("%s",s);
if(strcmp(s,H) == 0)
{
runner++;
if(runnner == 4)
{
score++;
runner--;
}
}
else if(strcmp(s,R) == 0)
{
score = score + runner + 1;
runner = 0;
}
else if(strcmp(s,O) == 0) out++;
if(out == 3) printf("%d",score);
}
return 0;
} | main.c: In function 'main':
main.c:19:28: error: 'runnner' undeclared (first use in this function); did you mean 'runner'?
19 | if(runnner == 4)
| ^~~~~~~
| runner
main.c:19:28: note: each undeclared identifier is reported only once for each function it appears in
|
s875703871 | p00103 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
int *A;
const char H[4] = "HIT";
const char R[8] = "HOMERUN";
const char O[4] = "OUT";
int score = 0;
int runner = 0;
int out = 0;
int event = 0;
int n;
scanf("%d",&n);
while(event < n+1){
char s[10];
scanf("%s",s);
event++;
if(strcmp(s,H) == 0)
{
runner++;
if(runner == 4)
{
score++;
runner--;
}
}
else if(strcmp(s,R) == 0)
{
score = score + runner + 1;
runner = 0;
}
else if(strcmp(s,O) == 0) out++;
if(out == 3){
runner = out = 0;
printf("%d ",score);
score = 0;
event++;
}
}
return 0; | main.c: In function 'main':
main.c:42:9: error: expected declaration or statement at end of input
42 | return 0;
| ^~~~~~
|
s087756879 | p00103 | C | #include<stdio.h>
int main(void)
{
char str[16]={};
int n;
int score=0;
int base=0;
int out=0;
scanf("%d", &n);
for(i=0;i<n;i++)
{
scanf("%s", str);
if(str[1]='I')
if(base==3)
score++,base=0;
else
base++;
else if(str[1]='U')
if(out==2)
out=base=0;
else
out++;
else if(str[1]='O')
score+=base+1,base=0;
}
return 0;
} | main.c: In function 'main':
main.c:13:7: error: 'i' undeclared (first use in this function)
13 | for(i=0;i<n;i++)
| ^
main.c:13:7: note: each undeclared identifier is reported only once for each function it appears in
|
s804735072 | p00103 | C | #include<cstdio>
int main() {
bool a = false, b = false, c = false;
int score = 0;
char event[10];
int d;
scanf_s("%d", &d, 10);
for (int i = 0; i<d; i++) {
score = 0;
a = b = c = false;
int out = 0;
while (1) {
scanf_s("%s", &event, 10);
if (event[1] == 'I') {
if (c)score++;
c = b;
b = a;
a = true;
}
else if (event[1] == 'O') {
score++;
if (a)score++;
if (b)score++;
if (c)score++;
a = b = c = false;
}
else out++;
if (out == 3) {
printf("%d\n", score);
break;
}
}
}
}
| main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s298799631 | p00103 | C | #include<stdio.h>
#include<string.h>
int main(){
int base;
int n;
int out;
int score;
char com[10];
scanf("%d",&n);
for(i=0;i<n;i++){
out=0;
score=0;
base=0;
while(out<3){
scanf("%s",com);
if(com[1]=='U'){
out++;
if(out==3)printf("%d\n",score);
}
else if(com[1]=='I'){
base++;
if(base==4){score++;base--;}
}
else if(com[1]=='O'){
score+=base+1;
base=0;
}
}
}
return 0;
}
| main.c: In function 'main':
main.c:12:6: error: 'i' undeclared (first use in this function)
12 | for(i=0;i<n;i++){
| ^
main.c:12:6: note: each undeclared identifier is reported only once for each function it appears in
|
s493352158 | p00103 | C | #include<stdio.h>
#include<strcmp.h>
int main(){
int out,n,k,g[3],x;
char t[5],e1[4]="OUT",e2[4]="HIT",e3[8]="HOMERUN";
scanf("%d",&n);
while(n-->0){
out=0;
k=0;
g[0]=0;
g[1]=0;
g[2]=0;
while(out!=3){
scanf("%s",t);
if(strcmp(e1,t)==0)
out++;
else if(strcmp(e2,t)==0){
if(g[2]==1)
k++;
g[2]=g[1];
g[1]=g[0];
g[0]=1;
}
else {
x=0;
for(i=0;i<3;i++)
if(g[i]==1)
x++;
k=k+x+1;
}
}
printf("%d\n",k);
}
return 0;
} | main.c:2:9: fatal error: strcmp.h: No such file or directory
2 | #include<strcmp.h>
| ^~~~~~~~~~
compilation terminated.
|
s162742486 | p00103 | C | int main(){
int c,y,t,o,p;
char a[9];
scanf("%d",&c);
for(y=0;;y++){
t=o=p=0;
while(~scanf("%s",&a)||exit(1)){
if(a[0]=='H')t++;
else o++;
if(a[1]=='O'){p+=t;t=0;}
if(t>3){p++;t--;}
if(o>2)break;
}
printf("%d\n",p);
}
} | main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | scanf("%d",&c);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | scanf("%d",&c);
| ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:40: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
7 | while(~scanf("%s",&a)||exit(1)){
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | int main(){
main.c:7:40: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
7 | while(~scanf("%s",&a)||exit(1)){
| ^~~~
main.c:7:40: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:7:40: error: void value not ignored as it ought to be
7 | while(~scanf("%s",&a)||exit(1)){
| ^~~~~~~
main.c:14:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
14 | printf("%d\n",p);
| ^~~~~~
main.c:14:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:17: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s632152666 | p00103 | C | a,q,o,x,b;
main(){
for(scanf("%d",&p);~scanf("%s",&a);o=o==3?b=x=!printf("%d\n",x):o){
//printf("%d\n",a%9);
///*
//printf("bef x:%d b:%d o:%d\n",x,b,o);
if(a%9==7)b=b*2+1,x+=b>>3&1;
if(a%9==8)o++;
if(a%9==6)for(x++,b&=7;b;b/=2)x+=b&1;
//printf("x:%d b:%d o:%d\n",x,b,o);
//*/
}
} | main.c:1:1: warning: data definition has no type or storage class
1 | a,q,o,x,b;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'q' [-Wimplicit-int]
1 | a,q,o,x,b;
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | a,q,o,x,b;
| ^
main.c:1:7: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
1 | a,q,o,x,b;
| ^
main.c:1:9: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
1 | a,q,o,x,b;
| ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:3:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | for(scanf("%d",&p);~scanf("%s",&a);o=o==3?b=x=!printf("%d\n",x):o){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | a,q,o,x,b;
main.c:3:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | for(scanf("%d",&p);~scanf("%s",&a);o=o==3?b=x=!printf("%d\n",x):o){
| ^~~~~
main.c:3:7: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:19: error: 'p' undeclared (first use in this function)
3 | for(scanf("%d",&p);~scanf("%s",&a);o=o==3?b=x=!printf("%d\n",x):o){
| ^
main.c:3:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:50: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
3 | for(scanf("%d",&p);~scanf("%s",&a);o=o==3?b=x=!printf("%d\n",x):o){
| ^~~~~~
main.c:3:50: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:50: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:50: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s203352452 | p00103 | C | #include<stdio.h>
int main(){
int c,y,t,o,p;
char a[9];
read(0,b,4);
for(y=0;;y++){
for(t=o=p=0;;){
if(!~scanf("%s",a))return 0;
if(a[0]=='H')t++;
else o++;
if(a[1]=='O'){p+=t;t=0;}
if(t>3){p++;t--;}
if(o>2)break;
}
printf("%d\n",p);
}
} | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'read'; did you mean 'fread'? [-Wimplicit-function-declaration]
6 | read(0,b,4);
| ^~~~
| fread
main.c:6:16: error: 'b' undeclared (first use in this function)
6 | read(0,b,4);
| ^
main.c:6:16: note: each undeclared identifier is reported only once for each function it appears in
|
s711235874 | p00103 | C | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;} | main.c:1:1: warning: data definition has no type or storage class
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:74: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;}
| ^~~~~~
main.c:1:74: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:74: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:74: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:105: error: lvalue required as left operand of assignment
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;}
| ^~
|
s243686895 | p00103 | C | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;} | main.c:1:1: warning: data definition has no type or storage class
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:74: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
| ^~~~~~
main.c:1:74: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:74: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:74: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:105: error: lvalue required as left operand of assignment
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
| ^~
main.c:1:110: error: expected ')' before ':' token
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
| ~ ^
| )
main.c:1:128: error: expected expression before '}' token
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
| ^
|
s925851258 | p00103 | C | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;} | main.c:1:1: warning: data definition has no type or storage class
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:67: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;}
| ^~~~~~
main.c:1:67: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:67: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:67: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:100: error: lvalue required as left operand of assignment
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;}
| ^~
|
s864807680 | p00103 | C | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;} | main.c:1:1: warning: data definition has no type or storage class
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:65: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;}
| ^~~~~~
main.c:1:65: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:65: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:65: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:63: error: lvalue required as left operand of assignment
1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;}
| ^
|
s961653682 | p00103 | C | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
{
/*if(a%3){
if(a&1){
if(!(++o%3)){
printf("%d\n",b>3?s+b-3:s),b=s=0;
}
}
else{
b++;
}
}
else{
s+=b+1,b=0;
}*/
a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,$
}
} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:16:36: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
16 | a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,$
| ^~~~~~
main.c:16:36: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:36: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:16:36: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:80: error: '$' undeclared (first use in this function)
16 | a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,$
| ^
main.c:16:80: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:81: error: expected ')' before '}' token
16 | a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,$
| ~ ^
| )
17 | }
| ~
main.c:16:81: error: expected ';' before '}' token
16 | a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,$
| ^
| ;
17 | }
| ~
|
s553547013 | p00103 | C | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
{
/*if(a%3){
if(a&1){
if(!(++o%3)){
printf("%d\n",b>3?s+b-3:s),b=s=0;
}
}
else{
b++;
}
}
else{
s+=b+1,b=0;
}*/
a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,$
}
} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:16:36: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
16 | a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,$
| ^~~~~~
main.c:16:36: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:36: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:16:36: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:80: error: '$' undeclared (first use in this function)
16 | a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,$
| ^
main.c:16:80: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:81: error: expected ')' before '}' token
16 | a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,$
| ~ ^
| )
17 | }
| ~
main.c:16:81: error: expected ';' before '}' token
16 | a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,$
| ^
| ;
17 | }
| ~
|
s728887744 | p00103 | C | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:68: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}}
| ^~~~~~
main.c:1:68: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:68: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:68: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:1:118: error: expected identifier or '(' before '}' token
1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}}
| ^
|
s783169113 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:68: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);}
| ^~~~~~
main.c:1:68: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:68: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:68: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:64: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);}
| ^
|
s727985644 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:66: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);}
| ^~~~~~
main.c:1:66: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:66: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:66: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:64: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);}
| ^
|
s914065451 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:68: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);}
| ^~~~~~
main.c:1:68: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:68: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:68: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:66: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);}
| ^
|
s925176782 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:68: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^~~~~~
main.c:1:68: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:68: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:68: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:66: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^
|
s835689788 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:69: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^~~~~~
main.c:1:69: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:69: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:69: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:67: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^
|
s847081736 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:70: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^~~~~~
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:70: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:68: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
| ^
|
s514630484 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:70: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);}
| ^~~~~~
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:70: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:68: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);}
| ^
|
s588298408 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:67: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^~~~~~
main.c:1:67: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:67: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:67: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:65: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
| ^
|
s655328050 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:67: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);}
| ^~~~~~
main.c:1:67: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:67: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:67: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:65: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);}
| ^
|
s830798000 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:67: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;}
| ^~~~~~
main.c:1:67: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:67: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:67: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:104: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;}
| ^~
|
s363254557 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:69: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);}
| ^~~~~~
main.c:1:69: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:69: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:69: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:67: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);}
| ^
|
s299401356 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
b=
a%3?
a&1?
++o%3?
b
:(s=!puts(48+(b>3?s+b-3:s))
:b+1
:!(s+=b+1);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:22: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
7 | :(s=!puts(48+(b>3?s+b-3:s))
| ^~~~
main.c:7:22: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:7:29: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion]
7 | :(s=!puts(48+(b>3?s+b-3:s))
| ~~^~~~~~~~~~~~~~
| |
| int
main.c:7:29: note: expected 'const char *' but argument is of type 'int'
main.c:7:44: error: expected ')' before ':' token
7 | :(s=!puts(48+(b>3?s+b-3:s))
| ~ ^
| )
8 | :b+1
| ~
main.c:9:12: error: expected ':' before '}' token
9 | :!(s+=b+1);}
| ^
| :
|
s394090658 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
b=
a%3?
a&1?
++o%3?
b
:(s=!puts(itoa(b>3?s+b-3:s,&a,10)))
:b+1
:!(s+=b+1);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:22: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
7 | :(s=!puts(itoa(b>3?s+b-3:s,&a,10)))
| ^~~~
main.c:7:22: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:7:27: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
7 | :(s=!puts(itoa(b>3?s+b-3:s,&a,10)))
| ^~~~
main.c:7:27: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion]
7 | :(s=!puts(itoa(b>3?s+b-3:s,&a,10)))
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
main.c:7:27: note: expected 'const char *' but argument is of type 'int'
|
s827311648 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
b=
a%3?
a&1?
++o%3?
b
:(s=!puts(itoa(b>3?s+b-3:s,&a,10)))
:b+1
:!(s+=b+1);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:22: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
7 | :(s=!puts(itoa(b>3?s+b-3:s,&a,10)))
| ^~~~
main.c:7:22: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:7:27: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
7 | :(s=!puts(itoa(b>3?s+b-3:s,&a,10)))
| ^~~~
main.c:7:27: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion]
7 | :(s=!puts(itoa(b>3?s+b-3:s,&a,10)))
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
main.c:7:27: note: expected 'const char *' but argument is of type 'int'
|
s769034780 | p00103 | C | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
b=(
a%3?
a&1?
++o%3?
b
:s=!printf("%d\n",b>3?s+b-3:s)
:b+1
:!s-=~b);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:21: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | :s=!printf("%d\n",b>3?s+b-3:s)
| ^~~~~~
main.c:7:21: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:21: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:21: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:19: error: lvalue required as left operand of assignment
7 | :s=!printf("%d\n",b>3?s+b-3:s)
| ^
|
s485094780 | p00103 | C | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
b=(
a%3?
a&1?
++o%3?
b
:s=!printf("%d\n",b>3?s+b-3:s)
:b+1
:!(s-=~b));} | main.c:1:1: warning: data definition has no type or storage class
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);)
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:21: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | :s=!printf("%d\n",b>3?s+b-3:s)
| ^~~~~~
main.c:7:21: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:21: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:21: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:19: error: lvalue required as left operand of assignment
7 | :s=!printf("%d\n",b>3?s+b-3:s)
| ^
|
s330539266 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:67: error: 'c' undeclared (first use in this function)
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);}
| ^
main.c:1:67: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:70: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);}
| ^~~~~~
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:70: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s622902420 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:67: error: 'c' undeclared (first use in this function)
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^
main.c:1:67: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:70: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^~~~~~
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:70: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s678051924 | p00103 | C | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:70: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);}
| ^~~~~~
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:70: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:105: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);}
| ^~
|
s094033076 | p00103 | C | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:67: error: 'c' undeclared (first use in this function)
1 | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^
main.c:1:67: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:70: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
| ^~~~~~
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:70: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s500045025 | p00103 | C | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;}
main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;}
| ^~~~~
main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:62: error: 'c' undeclared (first use in this function)
1 | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;}
| ^
main.c:1:62: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:65: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;}
| ^~~~~~
main.c:1:65: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:65: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:65: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s521521375 | p00103 | C | #include<stdio.h>
int main(void){
int i,j,k,q,p,inning,point,kazu[20];
char eve[10];
point=0;
j=0;
k=0;
q=0;
p=0;
scanf("%d",&inning);
for(k=0;k<inning;k++){
point=0;
j=0;
q=0;
p=0;
while(q<3){
for(j=0;j<10;j++){
eve[j]=0;
}
gets(eve);
if(eve[0]=='O'){
if(eve[1]=='U'){
if(eve[2]=='T'){
q++;
}
}
}
if(eve[0]=='H'){
if(eve[1]=='I'){
if(eve[2]=='T'){
p++;
if(p>=4){
point++;
}
}
}
}
if(eve[0]=='H'){
if(eve[1]=='O'){
if(eve[2]=='M'){
if(eve[3]=='E'){
if(eve[4]=='R'){
if(eve[5]=='U'){
if(eve[6]=='N'){
point=point+p+1;
p=0;
}
}
}
}
}
}
}
}
kazu[k]=point;
}
for(k=0;k<inning;k++){
printf("%d\n",kazu[k]);
}
return 0;
} | main.c: In function 'main':
main.c:29:25: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
29 | gets(eve);
| ^~~~
| fgets
|
s400330367 | p00103 | C | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;} | main.c:1:1: warning: data definition has no type or storage class
1 | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
1 | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;}
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;}
| ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
1 | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;}
| ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;}
main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;}
| ^~~~~
main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:65: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;}
| ^~~~~~
main.c:1:65: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:65: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:65: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:98: error: lvalue required as left operand of assignment
1 | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;}
| ^
|
s231502045 | p00103 | C | #include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
while(n--){
string str;
int o = 0, p = 0, r=0;
while(o < 3){
cin >> str;
if(str == "HIT"){
if(r<3) r++;
else p++;
}else if(str == "HOMERUN"){
p += r+1;
r = 0;
}else if(str == "OUT"){
o++;
}
}
cout << p << endl;
}
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s897759251 | p00103 | C | #include<stdio.h>
#include<string.h>
int main()
{
int n;
scanf("%d",&n);
while(n-->0)
{
char a[8];
int score=0,base=0,out=0;
while(out<3)
{
scanf("%s",&a);
if(!strcmp(a,"HIT"))
{
if(base!=0)
{
if(((base<<=1)&8)==8)
{
score+=1;
base&=7;
}
}
base+=1;
}
else if(!strcmp(a,"HOMERUN"))
{
score+=1;
while(base!=0)
{
score+=1;
(base>>=1)&=7;
}
}
else
out++;
}
printf("%d\n",score);
}
return 0;
} | main.c: In function 'main':
main.c:33:51: error: lvalue required as left operand of assignment
33 | (base>>=1)&=7;
| ^~
|
s585145804 | p00103 | C | #include<stdio.h>
#include<string.h>
int main(void)
{
int HIT=0,OUT=0,POINT=0,a,b,c=0;
char EVENT[100][8];
for(;;)
{
scanf("%d\n",&a);
for(b=0;;b++)
{
gets(EVENT[b]);
if(strcmp(EVENT[b],"OUT")==0)
OUT++;
if(strcmp(EVENT[b],"HIT")==0)
if(HIT==4)
POINT++;
else
HIT++;
if(strcmp(EVENT[b],"HOMERUN")==0)
{
POINT+=HIT+1;
HIT=0;
}
if(OUT==3)
{
printf("%d\n",POINT);
POINT=OUT=HIT=0;
c++;
if(c==a)
return 0;
}
}
} | main.c: In function 'main':
main.c:12:25: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
12 | gets(EVENT[b]);
| ^~~~
| fgets
main.c:34:9: error: expected declaration or statement at end of input
34 | }
| ^
|
s795819359 | p00103 | C | #include <stdio.h>
#include <string.h>
int main(){
int ining,i,j,tokuten[100],mozisuu,hit,out;
char mozi[8];
scanf("%d",ining);
for(j=0; j<100; j++){
tokuten[j]=0;
}
i=0;
hit=0;
out=0;
while(ining>i){
scanf("%s", mozi);
mozisuu=strlen(mozi);
if(mozisuu==7){
tokuten[i]=hit+1;
} else {
if(getchar(mozi)=='h'){
hit=hit+1;
}
else{
out=out+1;
}
}
if(out==3){
hit=0;
out=0;
i=i+1;
}
}
for(j=0; j<ining; j++){
printf("%d",tokuten[j]);
}
} | main.c: In function 'main':
main.c:23:28: error: too many arguments to function 'getchar'
23 | if(getchar(mozi)=='h'){
| ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: declared here
582 | extern int getchar (void);
| ^~~~~~~
|
s440829704 | p00103 | C | #include <stdio.h>
#include <algorithm>
using namespace std;
int main()
{
int n,q;
int S[100000], T[50000];
int ans;
int i,j;
scanf("%d",&n);
for(i=0; i<n; i++){
scanf("%d",&S[i]);
}
ans = 0;
scanf("%d",&q);
for(i=0; i<q; i++){
int found;
scanf("%d",&T[i]);
found = binary_search(S, S+n, T[i]);
if(found==0) ans++;
// テァツキツ堙・ツスツ「テヲツ篠「テァツエツ「(テヲツ卍づゥツ鳴禿・ツ按?」ツつ古」ツ?ォテ」ツ?ェテ」ツつ?
// for(j=0; j<n; j++){
// if( S[j]==T[i] ){
// ans++;
// break;
// }
// }
}
printf("%d\n",ans);
return 0;
}
| main.c:2:10: fatal error: algorithm: No such file or directory
2 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s126098186 | p00103 | C | #include<stdio.h>
int main(void){
int i,j,n,c=0,b=0,s=0;
char in[100];
int ten[100]={0};
scanf("%d",&n);
while(c!=n){
scanf("%s",in);
switch(in[1]-'A'){
case 8:b++;break; //i hit
case 20:s++;break; //u out
case 14:ten[c]+=b+1;b=0;break;//o homerun
}
if(b==4){ten[c]++;b=3;}
if(s==3){c++;b=0;s=0;}
}
for(i=0;i<n;i++){
printf("%d\n",ten[i]);
}
return 0;
}
h | main.c:25:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
25 | h
| ^
|
s293738349 | p00103 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
cin >> n;
while(n--)
{
int count = 0,out = 0;
int home[4];
memset(home,0,sizeof(home));
while(out != 3)
{
string s;
cin >> s;
if(s == "OUT")
{
out++;
}
else if(s == "HIT")
{
if(home[2] == 1)
{
home[2]--;
home[3]++;
}
if(home[1] == 1)
{
home[1]--;
home[2]++;
}
if(home[0] == 1)
{
home[0]--;
home[1]++;
}
home[0]++;
}
else if(s == "HOMERUN")
{
if(home[2] == 1)
{
home[2]--;
home[3]++;
}
if(home[1] == 1)
{
home[1]--;
home[3]++;
}
if(home[0] == 1)
{
home[0]--;
home[3]++;
}
home[3]++;
}
}
count = home[3];
cout << count << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:17: error: 'memset' was not declared in this scope
13 | memset(home,0,sizeof(home));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 | #include <string>
|
s312623531 | p00103 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
int e;
cin >> e;
for(int i=0;i<e;i++){
int o=0,r=0,c=0;
while(1){
string str;
if(o==3) break;
cin >> str;
if(str=="HIT"){
if(r==3) c++,r--;
r++;
}
else if(str=="OUT") o++;
else{
c+=r+1;
r=0;
}
}
cout << c << endl;
}
return 0;
} | a.cc:6:1: error: extended character is not valid in an identifier
6 | int e;
| ^
a.cc:6:1: error: extended character is not valid in an identifier
a.cc:6:1: error: extended character is not valid in an identifier
a.cc:7:1: error: extended character is not valid in an identifier
7 | cin >> e;
| ^
a.cc:7:1: error: extended character is not valid in an identifier
a.cc:7:1: error: extended character is not valid in an identifier
a.cc:8:1: error: extended character is not valid in an identifier
8 | for(int i=0;i<e;i++){
| ^
a.cc:8:1: error: extended character is not valid in an identifier
a.cc:8:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
9 | int o=0,r=0,c=0;
| ^
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
10 | while(1){
| ^
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
11 | string str;
| ^
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
12 | if(o==3) break;
| ^
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
13 | cin >> str;
| ^
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
14 | if(str=="HIT"){
| ^
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
15 | if(r==3) c++,r--;
| ^
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
16 | r++;
| ^
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
17 | }
| ^
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
18 | else if(str=="OUT") o++;
| ^
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
19 | else{
| ^
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
20 | c+=r+1;
| ^
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
21 | r=0;
| ^
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:22:1 |
s661781259 | p00103 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
int e;
cin >> e;
for(int i=0;i<e;i++){
int o=0,r=0,c=0;
while(1){
string str;
if(o==3) break;
cin >> str;
if(str=="HIT"){
if(r==3) c++,r--;
r++;
}
else if(str=="OUT") o++;
else{
c+=r+1;
r=0;
}
}
cout << c << endl;
}
} | a.cc:6:1: error: extended character is not valid in an identifier
6 | int e;
| ^
a.cc:6:1: error: extended character is not valid in an identifier
a.cc:6:1: error: extended character is not valid in an identifier
a.cc:7:1: error: extended character is not valid in an identifier
7 | cin >> e;
| ^
a.cc:7:1: error: extended character is not valid in an identifier
a.cc:7:1: error: extended character is not valid in an identifier
a.cc:8:1: error: extended character is not valid in an identifier
8 | for(int i=0;i<e;i++){
| ^
a.cc:8:1: error: extended character is not valid in an identifier
a.cc:8:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
9 | int o=0,r=0,c=0;
| ^
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:9:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
10 | while(1){
| ^
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
11 | string str;
| ^
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:11:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
12 | if(o==3) break;
| ^
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:12:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
13 | cin >> str;
| ^
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:13:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
14 | if(str=="HIT"){
| ^
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:14:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
15 | if(r==3) c++,r--;
| ^
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:15:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
16 | r++;
| ^
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:16:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
17 | }
| ^
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:17:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
18 | else if(str=="OUT") o++;
| ^
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:18:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
19 | else{
| ^
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:19:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
20 | c+=r+1;
| ^
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:20:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
21 | r=0;
| ^
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:21:1: error: extended character is not valid in an identifier
a.cc:22:1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.