submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s847270126
p00754
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import ...
Main.java:20: error: unreported exception IOException; must be caught or declared to be thrown String s=ir.readLine(); ^ 1 error
s759343896
p00754
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import ...
Main.java:42: error: cannot find symbol while((i==st||dep!=0)&&i<n){ ^ symbol: variable i location: class Main Main.java:42: error: cannot find symbol while((i==st||dep!=0)&&i<n){ ^ symbol: variable i location: class Main Main.java:43: error: cannot find symbol if(is...
s705657618
p00754
Java
import java.util.*; public class balance{ public static void Main(String[] args){ Scanner sc = new Scanner(System.in); while(true){ String s = sc.nextLine(); boolean flag = true; if(s.equals(".")) break; Stack<String> stack = new Stack<String>(); while(true){ for(int i = 0; i < s.length(); i++)...
Main.java:3: error: class balance is public, should be declared in a file named balance.java public class balance{ ^ 1 error
s560356837
p00754
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); Stack<Character> s = new Stack<>(); while(true){ String in = sc.nextLine(); String pr = "yes"; if(in.charAt(0) == '.') break; for(int i = 0; ; i++){ char c = in.charAt(i); if...
Main.java:25: error: 'else' without 'if' else continue; ^ 1 error
s665430197
p00754
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()) { int pts[]={0,0}; String txt =sc.nextLine(); for(int i=0; i<txt.length(); i++) { switch(...
Main.java:29: error: ';' expected pts[1]--: ^ 1 error
s308032527
p00754
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext) { int pts[]={0,0}; String txt =sc.nextLine(); if(txt == null) { break; } ...
Main.java:11: error: cannot find symbol while(sc.hasNext) ^ symbol: variable hasNext location: variable sc of type Scanner 1 error
s844054677
p00754
Java
import java.util.Scanner; import java.util.Deque; import java.util.ArrayDeque; public class Main { public static void main(String args[]){ Scanner in=new Scanner (System.in); Deque<Character> stack=new ArrayDeque<Character>(); String target; while (!(in.hasNext("."))) { target=in.next(); for (int i=0;i<...
Main.java:13: error: illegal escape character if (target.charAt(i)=='\[' || target.charAt(i)=='\(') { ^ Main.java:13: error: unclosed character literal if (target.charAt(i)=='\[' || target.charAt(i)=='\(') { ^ Main.java:13: error: unclosed character literal ...
s297887872
p00754
Java
import java.util.Scanner; public class Balance{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String passage; int counter1=0,counter2=0; do{ passage=sc.nextLine(); String[] ch =passage.split(""); for(int i=0;i<passage.length();i++){ if(ch[i].equals("[")) counter1++; if...
Main.java:3: error: class Balance is public, should be declared in a file named Balance.java public class Balance{ ^ 1 error
s401699036
p00754
Java
import java.util.Scanner; public class Balance{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String passage; int counter1=0,counter2=0; do{ passage=sc.nextLine(); String[] ch =passage.split(""); for(int i=0;i<passage.length();i++){ if(ch[i].equals("[")) counter1++; if...
Main.java:3: error: class Balance is public, should be declared in a file named Balance.java public class Balance{ ^ 1 error
s754189992
p00754
Java
import java.util.Scanner; import java.util.Deque; import java.util.ArrayDeque; public class Balance{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String passage; char[] ch; Deque<Integer> ad=new ArrayDeque<Integer>(); do{ passage = sc.nextLine(); ad.addFirst(0); for(int ...
Main.java:5: error: class Balance is public, should be declared in a file named Balance.java public class Balance{ ^ 1 error
s412591343
p00754
Java
public class Main { void run() throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int count_a = 0; int count_b = 0; int count_c = 0; int count_d = 0; String word_line = ""; String word = ""; List result = new ArrayList(); whi...
Main.java:3: error: cannot find symbol void run() throws NumberFormatException, IOException { ^ symbol: class IOException location: class Main Main.java:45: error: cannot find symbol public static void main(String[] args) throws IOException { ...
s042627864
p00754
Java
class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String[] strings = {"([", ")]"}; while (true) { String input = scan.nextLine(); ArrayList<Integer> list = new ArrayList<Integer>(); if (input.equals(".")) { ...
Main.java:3: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7...
s293254528
p00754
Java
public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String[] strings = {"([", ")]"}; while (true) { String input = scan.nextLine(); ArrayList<Integer> list = new ArrayList<Integer>(); if (input.equals(".")) {...
Main.java:3: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7...
s786098305
p00754
Java
public class Main { public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)){ while(sc.hasNextLine()) { String str=sc.nextLine(); if(str.equals(".")) break; Stack<Character> stack=new Stack<Character>(); boolean tf=true; for(int i=0; i<str.length(); i++) { char s...
Main.java:3: error: cannot find symbol try(Scanner sc = new Scanner(System.in)){ ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol try(Scanner sc = new Scanner(System.in)){ ^ symbol: class Scanner location: class Main Main.java:7: error: can...
s377153561
p00754
Java
static boolean check(String s) { Stack<Character> stack = new Stack<>(); // for(int i = 0; i < s.length(); i++) { char c = s.charAt(i); if(c == ‘.’) { break; } if(c == ‘(’) { stack.push(‘)’); } if(c =...
Main.java:5: error: illegal character: '\u2018' if(c == ?.?) { ^ Main.java:5: error: illegal character: '\u2019' if(c == ?.?) { ^ Main.java:8: error: illegal character: '\u2018' if(c == ?(?) { ^ Main.java:8: error: illegal...
s991545088
p00754
Java
import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.File; import java.io.PrintStream; public class B { public static void main(String[] args) throws IOException { /** try { System.setOut(new PrintStream(new File("resu...
Main.java:8: error: class B is public, should be declared in a file named B.java public class B { ^ 1 error
s072263220
p00754
Java
package _1173; import java.util.*; import java.lang.*; import java.math.*; public class Main { Scanner sc = new Scanner(System.in); String trim(String tar){ String ret = ""; for(char ch:tar.toCharArray){ if("()[]".indexOf(ch) >=0){ ret += "()[]".indexOf(ch); } } return ret; } void run() { f...
Main.java:13: error: cannot find symbol for(char ch:tar.toCharArray){ ^ symbol: variable toCharArray location: variable tar of type String Main.java:32: error: cannot find symbol boolean ok = buffer.length ==0; ^ symbol: variable length location: variable buffer o...
s466352067
p00754
Java
package _1173; import java.util.*; import java.lang.*; import java.math.*; public class Main { Scanner sc = new Scanner(System.in); String trim(String tar){ String ret = ""; for(char ch:tar.toCharArray()){ if("()[]".indexOf(ch) >=0){ ret += "()[]".indexOf(ch); } } return ret; } void run() { ...
Main.java:31: error: cannot find symbol boolean ok = buffer.length ==0; ^ symbol: variable length location: variable buffer of type String 1 error
s169466459
p00754
Java
class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);for(;;){String t,r;t=sc.nextLine();if(t.equals("."))break;r="";for(char c:t.toCharArray())if("()[]".indexOf(c)<0)r+=(c+8);for(int i=0;i<50;i++)r=r.replace("01","").replace("ce","");System.out.println(r.equals("")?"no":"yes");}}}
Main.java:1: error: cannot find symbol class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);for(;;){String t,r;t=sc.nextLine();if(t.equals("."))break;r="";for(char c:t.toCharArray())if("()[]".indexOf(c)<0)r+=(c+8);for(int i=0;i<50;i++)r=r.replace("01","").replace("ce","");System.out.println(r....
s903402907
p00754
Java
import java.util.*;class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);for(;;){String t,r;t=sc.nextLine();if(t.equals("."))break;r="";for(char c:t.toCharArray())if("()[]".indexOf(c)<0)r+=(c+8);for(int i=0;i<50;i++)r=r.replace("01","").replace("ce","");System.out.println(r.equals("")?"no":"yes...
Main.java:1: error: cannot find symbol import java.util.*;class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);for(;;){String t,r;t=sc.nextLine();if(t.equals("."))break;r="";for(char c:t.toCharArray())if("()[]".indexOf(c)<0)r+=(c+8);for(int i=0;i<50;i++)r=r.replace("01","").replace("ce","");Sy...
s805010689
p00754
Java
import java.util.*;class Main{public static void main(String[]a){int i;Scanner s=new Scanner(System.in);for(;;){String t,r;t=s.nextLine();if(t.equals("."))break;r="";for(char c:t.toCharArray()){i="()[]".indexOf(c);if(i>=0)r+=i;}for(;i<99;i++)r=r.replace("01","").replace("23","");System.out.println(r.equals("")?"no":"ye...
Main.java:1: error: variable i might not have been initialized import java.util.*;class Main{public static void main(String[]a){int i;Scanner s=new Scanner(System.in);for(;;){String t,r;t=s.nextLine();if(t.equals("."))break;r="";for(char c:t.toCharArray()){i="()[]".indexOf(c);if(i>=0)r+=i;}for(;i<99;i++)r=r.replace("01...
s141787506
p00754
Java
import java.util.LinkedList; import java.util.Scanner; public class main { /** * @param args */ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); LinkedList<Character> q = new LinkedList<Character>(); String input = ""; while (!(input = scanner.nextLine()).equals(".")) {...
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s372939522
p00754
Java
import java.util.LinkedList; import java.util.Scanner; public class Main { /** * @param args */ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); LinkedList<Character> q = new LinkedList<Character>(); String input = ""; while (!(input = scanner.nextLine()).equals(".")) {...
Main.java:30: error: not a statement }F ^ Main.java:30: error: ';' expected }F ^ 2 errors
s928872868
p00754
Java
public class TheBalanceoftheWorld{ static Scanner sc = new Scanner(System.in); public static void main(String[] args){ String line; int number_round, number_square, p; char[] sentence; outer: while(!(line = sc.nextLine()).equals(".")){ char[] check_stack = ne...
Main.java:1: error: class TheBalanceoftheWorld is public, should be declared in a file named TheBalanceoftheWorld.java public class TheBalanceoftheWorld{ ^ Main.java:2: error: cannot find symbol static Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class TheBalanceoft...
s274541416
p00754
Java
import java.util.*; import java.io.*; class Ballance { public String line; public Ballance(String str){ line = str; } public void init(){ String res = ""; for(int i=0; i<line.length(); i++){ char ch = line.charAt(i); if (ch == '(' || ch == '[' || ch =...
Main.java:55: error: class TheBallance is public, should be declared in a file named TheBallance.java public class TheBallance{ ^ 1 error
s880758639
p00754
Java
import java.util.*; import java.io.*; public class Main { private class Ballance { public String line; public Ballance(String str){ line = str; } public void init(){ String res = ""; for(int i=0; i<line.length(); i++){ char ch ...
Main.java:69: error: as of release 8, 'this' is allowed as the parameter name for the receiver type only Ballance ball = new this.Ballance(str); ^ which has to be the first parameter, and cannot be a lambda parameter 1 error
s303462023
p00754
C
#include <stdio.h> #include <string.h> int main() { int i, j; char t[101], c, st[101]; while (true) { for (i = 0; ~scanf("%c", &c) && c != '\n'; i++) { t[i] = c; } t[i] = 0; if (t[0] == '.' && t[1] == 0) { return 0; } memset(st, 0, sizeof st); for (i = 0, j = 0; i <= strlen(t); i++) { if (t[...
main.c: In function 'main': main.c:7:16: error: 'true' undeclared (first use in this function) 7 | while (true) { | ^~~~ main.c:3:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 2 | #include <string.h> +++ |+#include <s...
s984300509
p00754
C
#include <stdio.h> #include <string.h> int main(void) { int i, j; char t[101], c, st[101]; while (true) { for (i = 0; ~scanf("%c", &c) && c != '\n'; i++) { t[i] = c; } t[i] = 0; if (t[0] == '.' && t[1] == 0) { return 0; } memset(st, 0, sizeof st); for (i = 0, j = 0; i <= strlen(t); i++) { if...
main.c: In function 'main': main.c:7:16: error: 'true' undeclared (first use in this function) 7 | while (true) { | ^~~~ main.c:3:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 2 | #include <string.h> +++ |+#include <s...
s355666365
p00754
C
#include<stdio.h> #include<stdlib.h> int main() { char c[101]; char s[101]; int i,j; for(;;) { gets(c); if(c[0]=='.') break; j=0; for(i=0;i<100;i++) { if(c[i]=='.') break; switch (c[i]) { case '(': s[j]=c[i]; j++; break; case ')': if(j>0&&s[j-1]=='(') { s[j-1]=...
main.c: In function 'main': main.c:11:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 11 | gets(c); | ^~~~ | fgets main.c:49:9: error: expected declaration or statement at end of input 49 | ...
s032133438
p00754
C
#include <studio.h> #include <string.h> int f; char s[101]; void judge(int n,,char c){ int i; for(i=n+1;s[i]!='\0';i++){ if(c=='('){ if(s[i]=='('||s[i]=='[') judge(i,s[i]); if(s[i]==']') f=0; if(s[i]==')') break; } else if(c=='['){ if(s[i]=='('||s[i]=='[') judge(i,s[i]); if(s[i]==')') f=0; if(s[i]==']') break; } } } in...
main.c:1:10: fatal error: studio.h: No such file or directory 1 | #include <studio.h> | ^~~~~~~~~~ compilation terminated.
s359275677
p00754
C
#include <stdio.h> #include <string.h> int f; char s[101]; void judge(int n,,char c){ int i; for(i=n+1;s[i]!='\0';i++){ if(c=='('){ if(s[i]=='('||s[i]=='[') judge(i,s[i]); if(s[i]==']') f=0; if(s[i]==')') break; } else if(c=='['){ if(s[i]=='('||s[i]=='[') judge(i,s[i]); if(s[i]==')') f=0; if(s[i]==']') break; } } } int...
main.c:5:18: error: expected declaration specifiers or '...' before ',' token 5 | void judge(int n,,char c){ | ^ main.c: In function 'main': main.c:36:1: error: implicit declaration of function 'judge' [-Wimplicit-function-declaration] 36 | judge(i,s[i]); | ^~~~~
s087028981
p00754
C
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int flag=0; while(sc.hasNext()){ int no=0; int count=0; int kind=0; for(char a = sc.nextchar(); a!='.' && sc.hasNext() && no...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:3:1: error: unknown type name 'public' 3 | public class Main { | ^~...
s158132917
p00754
C
import java.util.*; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int flag=0; while(sc.hasNext()){ String str = sc.next(); char [] A = str.toCharArray; int no=0; int count...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.*; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*; | ^ main.c:2:1: error: unknown type name 'import' 2 | import java.util.Scanner; | ^~~~~~ m...
s797605572
p00754
C
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int flag=0; while(sc.hasNext()){ String str = sc.next(); char [] A = str.toCharArray; int no=0; int count=0; int kind=0...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.*; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*; | ^ main.c:4:1: error: unknown type name 'public' 4 | public class Main { | ^~~~~~ main.c:...
s098853577
p00754
C
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int flag=0; while(sc.hasNext()){ String str = sc.next(); char [] A = str.toCharArray; int no=0; int count=0; int ...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:4:1: error: unknown type name 'public' 4 | public class Main { | ^~...
s128513525
p00754
C
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int flag=0; while(sc.hasNext()){ String str = sc.next(); char [] A = str.toCharArray(); int no=0; int count=0; i...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:4:1: error: unknown type name 'public' 4 | public class Main { | ^~...
s675515341
p00754
C
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int flag=0; while(sc.hasNext()){ String s = sc.next(); char [] A = s.toCharArray(); int no=0; int count=0...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:4:1: error: unknown type name 'public' 4 | public class Main { | ^~...
s733042231
p00754
C
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int flag=0; while(sc.hasNext()){ String s = sc.next(); char [] A = s.toCharArray(); int no=0; int count=0...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:4:1: error: unknown type name 'public' 4 | public class Main { | ^~...
s037044276
p00754
C
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); while(sc.hasNextLine()){ String s = sc.nextLine(); Stack<Character> count = new Stack<>(); boolean flag = true; LABEL: for(int i...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:2:1: error: unknown type name 'import' 2 | import java.util.Stack; ...
s289934130
p00754
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s796719877
p00754
C
char S[999],v[999]; main(){ int T,C,i; for(;gets(S),S[1];puts(T?"no":"yes")){ for(T=C=i=0;i<strlen(S);i++) switch(S[i]){ case '(': v[C++]=1;break; case '[': v[C++]=2;break; case ')': if(!C||v[--C]!=1)goto F;break; case ']': if(!C||v[--C]!=2)goto F;break; } if(!C)continue; F:T=1; } exit(0);}
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:4:14: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 4 | for(;gets(S),S[1];puts(T?"no":"yes")){ | ^~~~ main.c:4:27: error: im...
s904920430
p00754
C
#include<iostream> #include<string> #include<stack> using namespace std; int main(void){ string s; stack<char> str; while(getline(cin,s) && s!="."){ string ch; for(int i=0;i<s.length;i++) if(s[i]=='{' || s[i]=='(' || s[i]=='}' || s[i]==')')ch+=s[i]; for(int i=0;i<ch.length();i++){ ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s016657715
p00754
C
#include <stdio.h> char stack[100]; int sp=0; int main(int argc, char* argv[]){ char a, prev='.'; while(scanf("%c",&a)){ if(a=='\n') continue; switch(a){ case '(': stack[sp]='('; sp++; break; case '[': stack[sp]='['; sp++; break; case ')': if(stack[sp-1]=='(') sp--; else { while(a!='.') fscanf...
main.c: In function 'main': main.c:16:61: error: 'file' undeclared (first use in this function); did you mean 'fileno'? 16 | else { while(a!='.') fscanf(file,"%c",&a); sp=0; printf("no\n"); } | ^~~~ | ...
s514419481
p00754
C
import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.File; import java.io.PrintStream; public class Main { public static void main(String[] args) throws IOException { /** try { System.setOut(new PrintStream(new File("r...
main.c:1:1: error: unknown type name 'import' 1 | import java.io.FileNotFoundException; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.io.FileNotFoundException; | ^ main.c:2:1: error: unknown type name 'import' 2 | import...
s203561551
p00754
C
main(){ char b[110],s[99]={0},*q,*p; while(fgets(b,110,stdin),*b!='.'){ q=s+1; for(p=b;*p!='.';p++){ if(*p=='('||*p=='['){ *q++=*p; } if(*p==')'||*p==']'){ q--; if(!((*q=='('&&*p==')')||(*q=='['&&*p==']'))){ puts("no"); break; } } } if(*p=='.')puts(q-s-1?"no":"yes"); } }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){ | ^~~~ main.c: In function 'main': main.c:3:15: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration] 3 | while(fgets(b,110,stdin),*b!='.'){ | ^~~~~ main.c:3:27: error: 'st...
s771164585
p00754
C
#include <stdio.h> int main(){ char b[110],s[110]={0},*q,*p; while(b=".",*b!='.'){ q=s+1; for(p=b;*p!='.';p++){ if(*p=='('||*p=='[') *q++=*p; if(*p==')'||*p==']'){ q--; if(!((*q=='('&&*p==')')||(*q=='['&&*p==']'))){ puts("no"); break; } } } if(*p=='.')puts(q==s+1?"yes":"no"); }...
main.c: In function 'main': main.c:4:16: error: assignment to expression with array type 4 | while(b=".",*b!='.'){ | ^
s225866913
p00754
C
b[110],s[110]={0};main(*q,*p){while(scanf("%[^\n]%*c",b),*b-'.'){q=s+1;for(p=b;*p-'.';p++){if(*p=='('||*p=='[') *q++=*p;if(*p==')'||*p==']'){q--;if(!((*q=='('&&*p==')')||(*q=='['&&*p==']'))){puts("no");break;}}}if(*p=='.')puts(q-s-1?"no":"yes");}}
main.c:1:1: warning: data definition has no type or storage class 1 | b[110],s[110]={0};main(*q,*p){while(scanf("%[^\n]%*c",b),*b-'.'){q=s+1;for(p=b;*p-'.';p++){if(*p=='('||*p=='[') *q++=*p;if(*p==')'||*p==']'){q--;if(!((*q=='('&&*p==')')||(*q=='['&&*p==']'))){puts("no");break;}}}if(*p=='.')puts(q-s-1?"no":"yes");}...
s988175966
p00754
C
b[110],s[110]={0};main(q,p){while(scanf("%[^\n]%*c",b),*b-'.'){q=s+1;for(p=b;*p-'.';p++){if(*p=='('||*p=='[') *q++=*p;if(*p==')'||*p==']'){q--;if(!((*q=='('&&*p==')')||(*q=='['&&*p==']'))){puts("no");break;}}}if(*p=='.')puts(q-s-1?"no":"yes");}}
main.c:1:1: warning: data definition has no type or storage class 1 | b[110],s[110]={0};main(q,p){while(scanf("%[^\n]%*c",b),*b-'.'){q=s+1;for(p=b;*p-'.';p++){if(*p=='('||*p=='[') *q++=*p;if(*p==')'||*p==']'){q--;if(!((*q=='('&&*p==')')||(*q=='['&&*p==']'))){puts("no");break;}}}if(*p=='.')puts(q-s-1?"no":"yes");}} ...
s038209388
p00754
C
s[110]={0},*q,*p;main(b[110]){while(scanf("%[^\n]%*c",b),*b-'.'){q=s+1;for(p=b;*p-'.';p++){if(*p=='('||*p=='[') *q++=*p;if(*p==')'||*p==']'){q--;if(!((*q=='('&&*p==')')||(*q=='['&&*p==']'))){puts("no");break;}}}if(*p=='.')puts(q-s-1?"no":"yes");}}
main.c:1:1: warning: data definition has no type or storage class 1 | s[110]={0},*q,*p;main(b[110]){while(scanf("%[^\n]%*c",b),*b-'.'){q=s+1;for(p=b;*p-'.';p++){if(*p=='('||*p=='[') *q++=*p;if(*p==')'||*p==']'){q--;if(!((*q=='('&&*p==')')||(*q=='['&&*p==']'))){puts("no");break;}}}if(*p=='.')puts(q-s-1?"no":"yes");}...
s513113187
p00754
C
main(){charb[110],s[110]={0},*q,*p;while(scanf("%[^n]%*c",b),*b-'.'){q=s+1;for(p=b;*p-'.';p++){if(*p=='('||*p=='[')*q++=*p;if(*p==')'||*p==']'){q--;if(!((*q=='('&&*p==')')||(*q=='['&&*p==']'))){puts("no");break;}}}if(*p=='.')puts(q-s-1?"no":"yes");}return 0;}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){charb[110],s[110]={0},*q,*p;while(scanf("%[^n]%*c",b),*b-'.'){q=s+1;for(p=b;*p-'.';p++){if(*p=='('||*p=='[')*q++=*p;if(*p==')'||*p==']'){q--;if(!((*q=='('&&*p==')')||(*q=='['&&*p==']'))){puts("no");break;}}}if(*p=='.')puts(q-s-1?"no":"yes"...
s849504489
p00754
C
char s[110],a[110],b,i,t; main(){ while(gets(s),strcmp(s,".")){ for(t=1,b=0,i=0;s[i]&&t;++i){ if(s[i]==40||s[i]==91) a[b++]=s[i]; else if(s[i]==41||s[i]==93) { if(!b){t=0;break;} if((s[i]==41&&a[b-1]==40)||(s[i]==93&&a[b-1]==91)) --b; else t=0; } } puts((t&&!b?1:0...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:3:9: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 3 | while(gets(s),strcmp(s,".")){ | ^~~~ main.c:3:17: error: implicit declaration of...
s664479730
p00754
C
int main(){ int i,length=0; char array[100],s[100],c; while(gets(s),s[0]!='.'){ for(i=0;s[i]!='\0';i++){ c=s[i]; if(c=='(' || c=='['){ array[length]=c; length++; } else if(c==')'){ if(array[length-1]=='('){ length--; } else{ length=-1; break; } } ...
main.c: In function 'main': main.c:8:9: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 8 | while(gets(s),s[0]!='.'){ | ^~~~ main.c:35:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 35 | printf("yes\n"); | ^~~~~...
s143344940
p00754
C
#include<stdio.h> #include<stdlib.h> int main(){ int i,length=0; char array[100],s[100],c; while(gets(s),s[0]!='.'){ for(i=0;s[i]!='\0';i++){ c=s[i]; if(c=='(' || c=='['){ array[length]=c; length++; } else if(c==')'){ if(array[length-1]=='('){ length--; } else{ ...
main.c: In function 'main': main.c:8:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 8 | while(gets(s),s[0]!='.'){ | ^~~~ | fgets
s571889117
p00754
C
#include<stdio.h> #include<string.h> void push(int *stack,int data,int *sp); int pop(int *stack,int *sp); int main(void){ char str[128]; int i,j,stack[N],sp,l,out,d; while(fgets(str,sizeof(str),stdin)&&str[0]!='.'){ for(i=0;i<N;i++) stack[i]=0; sp=d=0; l=strlen(str); for(i=0;i<l;i++){ if...
main.c: In function 'main': main.c:11:17: error: 'N' undeclared (first use in this function) 11 | int i,j,stack[N],sp,l,out,d; | ^ main.c:11:17: note: each undeclared identifier is reported only once for each function it appears in
s916092846
p00754
C
#include<iostream> #include<stack> using namespace std; int main() { string h; getline(cin,h); while(h.size()!=1) { stack<char>s; bool l=true; for(int i=0;i<h.size();i++) { if(h[i]=='(' || h[i]=='[')s.push(h[i]); else if(h[i]==')' ) { if(s.empty()) { l=false; break;...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s418455813
p00754
C++
#include <iostream> #include <stack> using namespace std; int main(){ string s; while(getline(cin,s)){ stack<char> st; if(s[0]=='.'break; bool ch=false; int i; for(i=0;i<s.size();i++){ if(s[i]=='[' || s[i]=='(')st.push(s[i]); else if(s[i]==']'){ if(st.empty() || st.top()!='[...
a.cc: In function 'int main()': a.cc:9:14: error: unable to find character literal operator 'operator""break' with 'char' argument 9 | if(s[0]=='.'break; | ^~~~~~~~ a.cc:10:18: error: expected ')' before ';' token 10 | bool ch=false; | ^ | ...
s897794661
p00754
C++
//package aoj; import java.util.Scanner; import java.util.Stack; class Main { public static boolean solve(String sentence) { Stack<Character> stk = new Stack<>(); for (int i = 0; i < sentence.length(); i++) { if(sentence.charAt(i) == '[' || sentence.charAt(i) == '(') stk.push(sentence....
a.cc:3:1: error: 'import' does not name a type 3 | import java.util.Scanner; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.util.Stack; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts...
s470697073
p00754
C++
#include <stdio.h> int main(void){ char c; bool ok; while(1){ char s[101] = {0}; ok = true; std::stack<char> st; for(int i=0; i<101; i++){ scanf("%c", &c); if(c == '\n'){ s[i] = '\0'; break; }else{ s[i] = c; } } if(s[0] == '.'){ break; } for(int...
a.cc: In function 'int main()': a.cc:10:10: error: 'stack' is not a member of 'std' 10 | std::stack<char> st; | ^~~~~ a.cc:2:1: note: 'std::stack' is defined in header '<stack>'; this is probably fixable by adding '#include <stack>' 1 | #include <stdio.h> +++ |+#include <stack> 2 | a.cc...
s853580899
p00754
C++
#include <stdio.h> #include <stack> int main(void){ char c; bool ok; while(1){ char s[101] = {0}; ok = true; std::stack<char> st; for(int i=0; i<101; i++){ scanf("%c", &c); if(c == '\n'){ s[i] = '\0'; break; }else{ s[i] = c; } } if(s[0] == '.'){ bre...
a.cc: In function 'int main()': a.cc:40:16: error: 'str' was not declared in this scope; did you mean 'st'? 40 | }else if(str[i] == ']'){ | ^~~ | st
s191953435
p00754
C++
import java.util.Scanner; import java.io.*; /** * Created by Reopard on 2014/07/03. */ public class Main{ static Scanner s = new Scanner(System.in); public static void main(String[] args)throws IOException{ InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new Buff...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc...
s003423055
p00754
C++
import java.io.InputStreamReader; import java.io.BufferedReader; import java.io.IOException; /** * Created by Reopard on 2014/07/03. */ public class Main{ public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); char[] c...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.InputStreamReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.BufferedReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available wit...
s195751258
p00754
C++
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); stdIn.useDelimiter("\\."); Stack<Character> stack; while(true) { String tmp = stdIn.nextLine(); if(tmp.length() == 1) break; stack = new Stack<Char...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Stack; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts...
s945224798
p00754
C++
#include <bits/stdc++.h> using namespace std; int main() { string str; while (getline(cin, str), str != '.'){ int c = 0, s = 0, f = 0; bool res = false; for (int p = 0; p < str.size(); p++){ if (str[p] == '('){ f = 1; c++; } else if (str[p] == ')'){ if (f == 2) break; f = 0; c--; ...
a.cc: In function 'int main()': a.cc:7:39: error: no match for 'operator!=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | while (getline(cin, str), str != '.'){ | ~~~ ^~ ~~~ | | |...
s607734283
p00754
C++
#include<iostream> #include<cstdlib> #include<cstring> #include<stack> using namespace std; stack<char> st; char str[514]; int slen; int main() { int i; while( gets(str) ) { if ( str[0] == '.' && str[1] == '\0' ) break; slen = strlen(str); for( i = 0; i < slen; i++ ) { if ( str[i] == '(' || str[i] == '...
a.cc: In function 'int main()': a.cc:14:16: error: 'gets' was not declared in this scope; did you mean 'getw'? 14 | while( gets(str) ) { | ^~~~ | getw
s883522785
p00754
C++
#include <cstdio> #include <string> int main() { int i, j; char t[101], c, st[101]; while (true) { for (i = 0; ~scanf("%c", &c) && c != '\n'; i++) { t[i] = c; } t[i] = 0; if (t[0] == '.' && t[1] == 0) { return 0; } memset(st, 0, sizeof st); for (i = 0, j = 0; i <= strlen(t); i++) { if (t[i] ...
a.cc: In function 'int main()': a.cc:15:17: error: 'memset' was not declared in this scope 15 | memset(st, 0, sizeof st); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <string> +++ |...
s583827531
p00754
C++
#include <cstdio> #include <string> using namespace std; int main() { int i, j; char t[101], c, st[101]; while (true) { for (i = 0; ~scanf("%c", &c) && c != '\n'; i++) { t[i] = c; } t[i] = 0; if (t[0] == '.' && t[1] == 0) { return 0; } memset(st, 0, sizeof st); for (i = 0, j = 0; i <= strlen(t...
a.cc: In function 'int main()': a.cc:17:17: error: 'memset' was not declared in this scope 17 | memset(st, 0, sizeof st); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <string> +++ |...
s379119545
p00754
C++
#include <iostream> #include <stack> #include <vector> uging namespace std; int main() { string str; while( getline(cin,str) && str != '.' ){ string z; for(int i=0;i<str.size();i++) if(str[i] == '(' || str[i] == ')' || str[i] == '[' || str[i] == ']') z+=str[i]; stack<char> s; bool f = true; for(int ...
a.cc:4:1: error: 'uging' does not name a type 4 | uging namespace std; | ^~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'string' was not declared in this scope 7 | string str; | ^~~~~~ a.cc:7:9: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41...
s750555825
p00754
C++
#include <iostream> #include <stack> #include <vector> using namespace std; int main() { string str; while( getline(cin,str) && str != '.' ){ string z; for(int i=0;i<str.size();i++) if(str[i] == '(' || str[i] == ')' || str[i] == '[' || str[i] == ']') z+=str[i]; stack<char> s; bool f = true; for(int ...
a.cc: In function 'int main()': a.cc:8:40: error: no match for 'operator!=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 8 | while( getline(cin,str) && str != '.' ){ | ~~~ ^~ ~~~ | | ...
s092126436
p00754
C++
#include <iostream> #include<string> #include<algorithm> #include<stdio.h> using namespace std; int main() { string s; while(true) { getline(cin,s); if(s==".")return 0; string t; //int len=s.size(); // cout<<0<<endl; for(int i=0;i<s.size();i++) { if(s[i]==' ')s.erase(s.begin()i); } cout<<s<<end...
a.cc: In function 'int main()': a.cc:19:55: error: expected ')' before 'i' 19 | if(s[i]==' ')s.erase(s.begin()i); | ~ ^ | )
s328615916
p00754
C++
import java.util.Scanner; import java.util.ArrayList; import java.util.Stack; class Main{ public static void main(String[] args){ Solve s = new Solve(); s.solve(); } } class Solve{ Solve(){} void solve(){ Scanner in = new Scanner(System.in); while(in.hasNext()){ String s = in.nextLine(); //in...
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.util.ArrayList; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodule...
s779294622
p00754
C++
#include<bits/stdc++.h> using namespace std; #define int long long char* Solve(string S) { stack<char> s; for (int i = 0; i < S.size(); i++) { if (S[i] == '(') s.push(')'); else if (S[i] == '[') s.push(']'); else if (S[i] == ')' || S[i]] == ']') { if (s.empty() ...
a.cc: In function 'char* Solve(std::string)': a.cc:13:37: error: expected ')' before ']' token 13 | else if (S[i] == ')' || S[i]] == ']') | ~ ^ | ) a.cc:13:37: error: expected primary-expression before ']' token a.cc:18:28: war...
s199428390
p00754
C++
import java.util.*; class Main{ final static char[][] brackets = {{'(', ')'}, {'[', ']'}}; Stack<Character> s; String input; int flag; //????????????????????????????????°??? Main(){ s = new Stack<Character>(); input = null; flag = 0; } public static void main(String[] args){ while( new Main().Main...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:9: error: 'final' does not name a type 4 | final static char[][] brackets = {{'(', ')'}, {'[', ']'}}; | ^~~~~ a.cc:6:9: error: 'Sta...
s989524221
p00754
C++
#include <vector> #include <string> #include <cstdio> #include <iostream> #include <stack> using namespace std; int main(){ string s; string left("(["); string right(")]"); while(getline(cin,s),s!="."){ stack<char> acc; for(int unsigned i = 0;i<s.size();i++){ for(int unsigned j=0;j<left.size();j++){ if(...
a.cc: In function 'int main()': a.cc:20:32: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)' 20 | if(find(right.begin(),right.end(),s[i]) !...
s745907603
p00754
C++
#include <iostream> #include <cstdio> #include <stack> #include <string> #include <vector> using namespace std; string s; vector<bool> out; int main(){ do{ s.clear(); do{ string temp; getline(cin,temp); s+=temp; }while(s[s.length()-1]!='.'); if (s.length()!=1){ stack<int> st; //(=0,[=1; int i...
a.cc: In function 'int main()': a.cc:31:53: error: cannot convert 'std::stack<int>::empty' from type 'bool (std::stack<int>::)() const' to type 'bool' 31 | if (st.empty){ | ^
s433152036
p00754
C++
#include <iostream> #include <cstdio> #include <stack> #include <string> #include <vector> using namespace std; string s; vector<bool> out; int main(){ do{ s.clear(); do{ string temp; getline(cin,temp); s+=temp; }while(s[s.length()-1]!='.'); if (s.length()!=1){ stack<bool> st; //(=0,[=1; int ...
a.cc: In function 'int main()': a.cc:31:53: error: cannot convert 'std::stack<bool>::empty' from type 'bool (std::stack<bool>::)() const' to type 'bool' 31 | if (st.empty){ | ^
s647259857
p00754
C++
c#include <iostream> #include <string> using namespace std; int main() { string str; int i; while(true){ getline(cin, str); if(str[0] == '.') break; int len = 0; while(str[len] != '\0'){ len++; } int d[101] = {0}, j; for(i = 0, j = 0 ; i < len ; i++){ if(str[...
a.cc:1:2: error: stray '#' in program 1 | c#include <iostream> | ^ a.cc:1:1: error: 'c' does not name a type 1 | c#include <iostream> | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/...
s255498432
p00754
C++
#include <iostream> using namespace std; bool isYes(char input[]); int main() { char Input[10000][101]; int i=0; while(true){ cin.getline(Input, sizeof(Input)); yesno[i] = isYes(Input); if(Input[0] == '.') break; i++; } for(int j=0; j<i; j++){ if(yesno[i]){ cout << "yes" << endl; } else { cout ...
a.cc: In function 'int main()': a.cc:11:28: error: no matching function for call to 'std::basic_istream<char>::getline(char [10000][101], long unsigned int)' 11 | cin.getline(Input, sizeof(Input)); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/ios...
s818380310
p00754
C++
#include <iostream> using namespace std; bool isYes(char input[]); int main() { char Input[101]; int i=0; while(true){ cin.getline(Input, sizeof(Input)); isYes(Input){ cout << "yes" << endl; } else { cout << "no" << endl; } if(Input[0] == '.') break; i++; } return 0; } bool isYes(char Input[]...
a.cc: In function 'int main()': a.cc:12:29: error: expected ';' before '{' token 12 | isYes(Input){ | ^ | ; a.cc:14:19: error: 'else' without a previous 'if' 14 | } else { | ^~~~
s031537461
p00754
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; void test(int ); int f; char ch[101]; int main(){ while(1){ int j=0; while(1){ scanf("%c",&ch[j]); if(ch[j]=='.')break; j++; } if(j==0)break; int count=0,count1=0; for(int i=0;i<j;i++){ if(coun...
a.cc: In function 'void test(int)': a.cc:37:5: error: 'count1' was not declared in this scope; did you mean 'count2'? 37 | count1--; | ^~~~~~ | count2 a.cc:48:5: error: 'count' was not declared in this scope; did you mean 'count2'? 48 | count--; | ^~~~~ | count2
s730244904
p00754
C++
#include "limits" #include "algorithm" #include "iostream" #include "cmath" #include "string" #include "map" #include "iomanip" #include "stack" using namespace std; int main(){ char S[110]; bool FLAG; stack<char> temp; while(1){ FLAG=true; gets(S); if(S[0]=='.')break; for(int i=0;S[i]!='.';++i...
a.cc: In function 'int main()': a.cc:17:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 17 | gets(S); | ^~~~ | getw
s093357544
p00754
C++
#include "limits" #include "algorithm" #include "iostream" #include "cmath" #include "string" #include "map" #include "iomanip" #include "stack" using namespace std; int main(){ char S[110]; bool FLAG; stack<char> temp; while(1){ FLAG=true; gets(S); if(S[0]=='.')break; for(int i=0;S[i]!='.';++i...
a.cc: In function 'int main()': a.cc:17:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 17 | gets(S); | ^~~~ | getw
s804303385
p00754
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; while(getline(cin,s),s!="."){ string c; int d=1; stack<char> w; for(int i=0;i<s.size();i++)if(s[i]==')'||s[i]=='('||s[i]=='['||s[i]==']')c+=s[i]; for(int i=0;i<c.size();i++){ if(c[i]=='['|...
a.cc: In function 'int main()': a.cc:13:19: error: 'dbreak' was not declared in this scope 13 | else {dbreak;} | ^~~~~~
s115434812
p00754
C++
#include<iostream> #include<string.h> #include<string> #include<cstdio> #include<stdlib.h> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<cmath> #include<utility> #include<set> #define ll long long int #define ld long double #define INF 1000000000 #define EPS 0.0000000001 #define rep(i,n)...
a.cc: In function 'int main()': a.cc:27:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 27 | gets(c); | ^~~~ | getw
s083831345
p00754
C++
#include<iostream> #include<string.h> #include<string> #include<cstdio> #include<stdlib.h> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<cmath> #include<utility> #include<set> #define ll long long int #define ld long double #define INF 1000000000 #define EPS 0.0000000001 #define rep(i,n)...
a.cc: In function 'int main()': a.cc:27:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 27 | gets(c); | ^~~~ | getw
s022229355
p00754
C++
#include <string> #include <algorithm> #include <stack> using namespace std; int main() { int no,size; string v; stack<char> sta; string end("."); char a5; while(1){ no = 0; getline(cin,v); if(v == end){ break; } for(char e : v){ if(e == '[' || e == '('){ sta.pus...
a.cc: In function 'int main()': a.cc:17:13: error: 'cin' was not declared in this scope 17 | getline(cin,v); | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <stack> +++ |+#include <iostream> 4 | ...
s281288639
p00754
C++
#include <cstdio> #include <stack> using namespace std; stack<bool> s; char c[128]; int main(){ char *p; bool f; while (gets(c), c[0] != '.') { s = stack<bool>(); p = &c[0]; f = false; while (*p != '.') { switch (*p) { case'(': s.push(true); break; case'[': s.push(false); break; case...
a.cc: In function 'int main()': a.cc:11:16: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | while (gets(c), c[0] != '.') { | ^~~~ | getw
s842515716
p00754
C++
#include <cstdio> #include <stack> using namespace std; stack<bool> s; char c[128]; int main(){ char *p; bool f; while (gets_s(c), c[0] != '.') { s = stack<bool>(); p = &c[0]; f = false; while (*p != '.') { switch (*p) { case'(': s.push(true); break; case'[': s.push(false); break; ca...
a.cc: In function 'int main()': a.cc:11:16: error: 'gets_s' was not declared in this scope 11 | while (gets_s(c), c[0] != '.') { | ^~~~~~ a.cc:43:25: error: 'printf_s' was not declared in this scope; did you mean 'printf'? 43 | printf_s("no\n"); | ...
s978445351
p00754
C++
#include <iostream> #include <cmath> #include <vector> #include <string> #include <map> #include <algorithm> #include <tuple> #include <set> using namespace std; using ll = long long; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using pii = pair<int, int>; usi...
a.cc: In function 'int main()': a.cc:71:21: error: 'strlen' was not declared in this scope 71 | if (strlen(S) == 1 && S[0] == '.') break; | ^~~~~~ a.cc:10:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 9 | #inc...
s155107085
p00754
C++
#include<bits/stdc++.h> using namespace std; main(){ char s[101]; while(gets(s),s[0]!='.'){ stack<char> a; int i=0; for(;s[i]!='.';++i){ if(!(s[i]-'(')||!(s[i]-'['))a.push(s[i]); if(s[i]==')')if(a.empty()||a.top()!='(')break;else a.pop(); if(s[i]==']')if(a.empty()||a.top()!='[')break;e...
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | while(gets(s),s[0]!='.'){ | ^~~~ | getw
s234129981
p00754
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <cstdio> #define F(i,n) for(int i=0;i<(int)(n);i++) #define INF 100000000 #define ll long long using namespace std; typedef pair<int, int> P; int main() { char b; string a; int ans,i,j,p=0; stac...
a.cc: In function 'int main()': a.cc:27:21: error: 'n' was not declared in this scope 27 | F(j,n) { | ^ a.cc:8:36: note: in definition of macro 'F' 8 | #define F(i,n) for(int i=0;i<(int)(n);i++) | ^
s157488483
p00754
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <cstdio> #define F(i,n) for(int i=0;i<(int)(n);i++) #define INF 100000000 #define ll long long using namespace std; typedef pair<int, int> P; int main() { string a; int ans,i,j,p=0; stack<int> s;...
a.cc: In function 'int main()': a.cc:26:21: error: 'n' was not declared in this scope 26 | F(j,n) { | ^ a.cc:8:36: note: in definition of macro 'F' 8 | #define F(i,n) for(int i=0;i<(int)(n);i++) | ^
s801372979
p00754
C++
#include <iostream> class CStack { public: CStack() { topIndex = 0; } ~CStack(){;} void push(char charactor) { if(topIndex < 100) /* スタック可能数を超えてpushした場合、なにもしない */ { stack[topIndex] = charactor; ++topIndex; } } char pop(void) ...
a.cc: In function 'bool isMatchLeftRight(char, char)': a.cc:50:23: error: expected primary-expression before '%' token 50 | if((left == '(') %% (right == ')')) | ^
s424308257
p00754
C++
##include<iostream> #include<string> #include<stack> using namespace std; int main(){ while(1){ bool flag; flag = true; string str; stack<int> num; getline(cin,str); if(str==".") break; for(int i=0;i<str.size();i++){ if(str[i]=='[') num.push(1); else if(str[i]==']'){ if(num.top()==1) num.pop();...
a.cc:1:1: error: stray '##' in program 1 | ##include<iostream> | ^~ a.cc:1:3: error: 'include' does not name a type 1 | ##include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: ...
s150949221
p00754
C++
#include<bits/stdc++.h> using namespace std; #define inf 1e9 #define ll long long #define ull unsigned long long #define M 1000000007 #define P pair<int,int> #define PLL pair<ll,ll> #define FOR(i,m,n) for(int i=m;i<n;i++) #define RFOR(i,m,n) for(int i=m;i>=n;i--) #define rep(i,n) FOR(i,0,n) #define rrep(i,n) RFOR(i,n,0...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s534381862
p00754
C++
#include <bits/stdc++.h> using namespace std; #define MAX_LSIZE 100 // 一行の最大の長さ char buff[MAX_LSIZE+2]; // 一行の文字列を格納する配列 // 行末の改行文字、NULL 文字も格納される char stack[MAX_LSIZE]; // スタック int sp; // スタックポインタ int main() { char c; // 処理する文字を入れる変数 int match; // 括弧のバランス状況を表す // 1 -> バランス, 0 -> 非バランス, -...
a.cc: In function 'int main()': a.cc:24:21: error: reference to 'stack' is ambiguous 24 | stack[sp++] = c; | ^~~~~ In file included from /usr/include/c++/14/stack:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:160, from a.cc...
s949005579
p00754
C++
#include <algorithm> #include <iostream> #include <vector> #include <string> #include <sstream> #include <stack> using namespace std; string words; void solve(){ stack<char> st; for(int i = 0; '.' != words[i];i++){ if(words[i] == '(' || words[i] == '['){ st.push(words[i]); }else if(words[i] == ')'...
a.cc: In function 'int main()': a.cc:58:14: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 58 | if(words == '.') break; | ~~~~~ ^~ ~~~ | | | | | char | std::string {aka std::_...
s462956507
p00754
C++
#include<iostream> #include<stack> using namespace std; main(){ int i,f; for(string s;getline(cin,s),s[0]!='.';){ stack<char> t; for(f=i=0;c=s[i++],c!='.';){ if(c==40|c==91)t.push(c); if(c==41|c==93){ if(!t.empty()&&c-t.top()<3)t.pop(); else f=1; } } puts(!f&t.empty()?"yes":"no"); }}
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:9:12: error: 'c' was not declared in this scope 9 | for(f=i=0;c=s[i++],c!='.';){ | ^
s462254827
p00754
C++
#include<iostream> #include<stack> main(){ for(char i,f,c,s[101];gets(s),s[0]-'.';){ std::stack<char> t; for(f=i=0;c=s[i++],c!='\0';){ if(c==40|c==91)t.push(c); if(c==41|c==93){ if(t.size()&&c-t.top()<3)t.pop(); else f=1; } } puts(f&t.size()?"no":"yes"); }}
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:23: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | for(char i,f,c,s[101];gets(s),s[0]-'.';){ | ^~~~ | ...
s160281893
p00754
C++
#include <iostream> #include <deque> #include <cstring> using namespace std; bool beginC(char c) { return (c == '[' || '(' == c); } bool endC(char c) { return (c == ']' || ')' == c); } bool cuple(char l, char r) { return (l == '(' && r == ')') || (l == '[' && r == ']'); } int size; bool solve(char str[]) { deque<ch...
a.cc: In function 'bool solve(char*)': a.cc:17:29: error: reference to 'size' is ambiguous 17 | for (int i = 0; i < size; i++) { | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, f...
s955309587
p00754
C++
#include<stack> #include<cstdio> #include<cstring> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ for(char s[101];gets(s),strcmp(s,".");){ bool ok=true; stack<char> St; rep(i,strlen(s)){ if(s[i]=='(') St.push(s[i]); if(s[i]=='[') St.push(s[i]); if(s[i]==')') if(St.empty() ||...
a.cc: In function 'int main()': a.cc:10:25: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | for(char s[101];gets(s),strcmp(s,".");){ | ^~~~ | getw