submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s164312829
p01225
Java
import java.util.Scanner; public class Rummy3 { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner scan = new Scanner(System.in); //??????????????°????????? int num = scan.nextInt(); //??????????????±??????????????????????????° int[][] card= new int[...
Main.java:3: error: class Rummy3 is public, should be declared in a file named Rummy3.java public class Rummy3 { ^ 1 error
s336537783
p01225
Java
package Getting_Started; import java.util.*; public class Rummy_Simple { // ?????????9???????????§??????????????°???????????£?????¨??????????????§????????????????????°??¨???????????? // CheckResult????????????????§? final static int COLUMN_NUMBER = 9; @SuppressWarnings("resource") public static void main(Strin...
Main.java:5: error: class Rummy_Simple is public, should be declared in a file named Rummy_Simple.java public class Rummy_Simple { ^ 1 error
s584512848
p01225
Java
import java.util.Scanner; public class Main3{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); int num = scan.nextInt(); int[][] card= new int[2][9]; for(int k = 0; k < num; k++){ for(int j =...
Main.java:3: error: class Main3 is public, should be declared in a file named Main3.java public class Main3{ ^ 1 error
s121173920
p01225
Java
class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int[][] tehuda = new int[2][9]; int T = sc.nextInt();//???????????????????????° for( int i = 0 ; i < T ; i++ ){//???????????????????????°????????? ...
Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s520516809
p01225
Java
import java.io.*; import java.util.Scanner; import java.util.Arrays; public class a{ public static void Main(String[] args){ Scanner sc= new Scanner(System.in); int t=sc.nextInt(); for (int i=0;i<t;i++){ int win=1; int color[][]=new int[3][9]; for (int j=0...
Main.java:4: error: class a is public, should be declared in a file named a.java public class a{ ^ 1 error
s937363630
p01225
Java
import java.io.*; import java.util.Scanner; import java.util.Arrays; public class a{ public static void main(String[] args){ Scanner sc= new Scanner(System.in); int t=sc.nextInt(); for (int i=0;i<t;i++){ int win=1; int color[][]=new int[3][9]; for (int j=0...
Main.java:4: error: class a is public, should be declared in a file named a.java public class a{ ^ 1 error
s379027950
p01225
Java
import java.util.Scanner; public class Card { public int f; public int n; public String c; Card() { f = 0; } void setSet(int _f) { f = _f; } void setN(int _n) { n = _n; } void setC(String _c) { c = _c; } static int sub(Card x, Card y) { if(x.f == y.f) { if(x.c.eq...
Main.java:4: error: class Card is public, should be declared in a file named Card.java public class Card { ^ 1 error
s988360980
p01225
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; import static java.lang.Integer.parseInt; /** * Rummy */ public class Main { public static void main(String[] args) throws IOException { BufferedReader br = ne...
Main.java:58: error: ';' expected int[] _cards = cards.clone() ^ Main.java:64: error: ';' expected int[] _cards = cards.clone() ^ 2 errors
s163655982
p01225
Java
package rummy; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; public class NewRummy { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System....
Main.java:9: error: class NewRummy is public, should be declared in a file named NewRummy.java public class NewRummy { ^ 1 error
s097906882
p01225
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; public class main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); // victor...
Main.java:9: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s300745816
p01225
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; public class Main{ public static void main(String[] args) throws IOException { // ????????????????????? BufferedReader br = new BufferedReader(new InputStreamReader(...
Main.java:41: error: class CardRummy is public, should be declared in a file named CardRummy.java public class CardRummy { ^ 1 error
s219061748
p01225
Java
package rummy; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; /** * <pre> *AOJ Rummy?????????????????????????????????????????????????????° * </pre> * * @author ?????? * @category AOJRummy * @version 1.8_45 * @since 1.8_45 */ public cla...
Main.java:18: error: class Rummy4 is public, should be declared in a file named Rummy4.java public class Rummy4 { ^ 1 error
s491355331
p01225
Java
import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Scanner; public class Main implements Comparator<Main> { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = Integer.parseInt(sc.nextLine()) ; while (sc.hasNextLine()){ ...
Main.java:121: error: reached end of file while parsing } ^ 1 error
s670732708
p01225
Java
import java.util.*; import java.io.*; class Set{ int num=0; int color=0; static boolean sameNum(Set num1, Set num2, Set num3){ if((num1.num == num2.num) && (num2.num == num3.num) && (num3.num == num1.num)){ return true; }else{ return false; } } sta...
Main.java:46: error: '.class' expected while(int i=0;i<n;i++){ ^ Main.java:46: error: > or ',' expected while(int i=0;i<n;i++){ ^ Main.java:46: error: not a statement while(int i=0;i<n;i++){ ^ Main.java:46: error: ';' expected while(int i=0;i<n;i++){...
s076506087
p01225
Java
import java.util.*; import java.io.*; class Set{ int num=0; int color=0; boolean checkNum(Set num1, Set num2, Set num3){ int i,j; i = num3.num - num2.num; j = num2.num - num1.num; if(((i == 1) && (j == 1)) || ((i == 0) && (j == 0))){ return true; }else{...
Main.java:38: error: class Rummy2 is public, should be declared in a file named Rummy2.java public class Rummy2{ ^ 1 error
s740539911
p01225
Java
import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class rummy { public static void main(String[] args) { //?????£????????? int output; int okCount; int loop; String line; Card[] cardList = new Card[9]; Scanner sc = null; try { sc = new Scanner(System.in); ...
Main.java:5: error: class rummy is public, should be declared in a file named rummy.java public class rummy { ^ 1 error
s366020958
p01225
Java
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); // ?????????????????°?????\??? int gameCount = in.nextInt(); // ??????????????????????????°????????\??? int[] cardNum = new int[9]; // ???????????????...
Main.java:35: error: constructor Rummy in class Rummy cannot be applied to given types; Rummy rummy = new Rummy(cardNum, cardColor); ^ required: no arguments found: int[],String[] reason: actual and formal argument lists differ in length Main.java:114: error: cannot find symbol hasCardSet...
s138427086
p01225
Java
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); // ?????????????????°?????\??? int gameCount = in.nextInt(); // ??????????????????????????°????????\??? int[] cardNum = new int[9]; // ???????????????...
Main.java:35: error: constructor Rummy in class Rummy cannot be applied to given types; Rummy rummy = new Rummy(cardNum, cardColor); ^ required: no arguments found: int[],String[] reason: actual and formal argument lists differ in length 1 error
s101774107
p01225
Java
class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][9] char C[][] = new char[T][9]; for(int j=0;j<T;j++){ for(int i=0;i<9;i++){ N[j][i] = scan.nextInt(); } for(int i=0;i<9;i++){ C[j*2][i] = scan.nextChar();...
Main.java:5: error: ';' expected int N[][] = new int[T][9] ^ 1 error
s560801774
p01225
Java
class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][] char C[][] = new char[T][]; for(int j=0;j<T;j++){ N[j] = new int[9]; C[j] = new int[9]; for(int i=0;i<9;i++){ N[j][i] = scan.nextInt(); } for(int i=0;...
Main.java:5: error: ';' expected int N[][] = new int[T][] ^ 1 error
s411535966
p01225
Java
class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][]; char C[][] = new char[T][]; for(int j=0;j<T;j++){ N[j] = new int[9]; C[j] = new int[9]; for(int i=0;i<9;i++){ N[j][i] = scan.nextInt(); } for(int i=0...
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:9: error: incompatible ty...
s799125049
p01225
Java
class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][]; char C[][] = new char[T][]; for(int j=0;j<T;j++){ N[j] = new int[9]; C[j] = new int[9]; for(int i=0;i<9;i++){ N[j][i] = scan.nextInt(); } for(int i=0...
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:9: error: incompatible ty...
s489842040
p01225
Java
import java.util.Scanner; class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][]; char C[][] = new char[T][]; for(int j=0;j<T;j++){ N[j] = new int[9]; C[j] = new int[9]; for(int i=0;i<9;i++){ N[j][i] = scan.nex...
Main.java:11: error: incompatible types: int[] cannot be converted to char[] C[j] = new int[9]; ^ Main.java:16: error: cannot find symbol C[j*2][i] = scan.nextChar(); ^ symbol: method nextChar() location: variable scan of type Scanner Main.java:20: error: cannot find symbol ...
s879478160
p01225
Java
import java.util.Scanner; import java.util.Arrays; class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][]; char C[][] = new char[T][]; for(int j=0;j<T;j++){ N[j] = new int[9]; C[j] = new char[9]; for(int i=0;i<9;i+...
Main.java:17: error: cannot find symbol C[j*2][i] = scan.nextChar(); ^ symbol: method nextChar() location: variable scan of type Scanner Main.java:21: error: cannot find symbol Char coler[]={'R','G','B'}; ^ symbol: class Char location: class Main 2 errors
s229186452
p01225
Java
import java.util.Scanner; import java.util.Arrays; class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][]; char C[][] = new char[T][]; for(int j=0;j<T;j++){ N[j] = new int[9]; C[j] = new char[9]; for(int i=0;i<9;i+...
Main.java:17: error: incompatible types: char[] cannot be converted to char C[j*2][i] = scan.next().toCharArray(); ^ 1 error
s407037936
p01225
Java
import java.util.Scanner; import java.util.Arrays; class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][]; char C[][] = new char[T][]; for(int j=0;j<T;j++){ N[j] = new int[9]; C[j] = new char[9]; for(int i=0;i<9;i+...
Main.java:18: error: incompatible types: char[] cannot be converted to char C[j*2][i] = str.toCharArray(); ^ 1 error
s753425942
p01225
Java
import java.util.Scanner; import java.util.Arrays; class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][]; char C[][] = new char[T][]; for(int j=0;j<T;j++){ N[j] = new int[9]; C[j] = new char[9]; for(int i=0;i<9;i+...
Main.java:18: error: incompatible types: char[] cannot be converted to char C[j*2][i] = str.toCharArray(); ^ 1 error
s675238266
p01225
Java
import java.util.Scanner; import java.util.Arrays; class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][]; char C[][] = new char[T][]; for(int j=0;j<T;j++){ N[j] = new int[9]; C[j] = new char[9]; for(int i=0;i<9;i+...
Main.java:18: error: incompatible types: char[] cannot be converted to char char inpc=str.toCharArray(); ^ 1 error
s794070720
p01225
Java
import java.util.Scanner; import java.util.Arrays; class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int T = scan.nextInt(); int N[][] = new int[T][]; char C[][] = new char[T][]; for(int j=0;j<T;j++){ N[j] = new int[9]; C[j] = new char[9]; for(int i=0;i<9;i+...
Main.java:42: error: variable pea might not have been initialized pea++; ^ Main.java:46: error: variable pea might not have been initialized if(pea>=3){ ^ 2 errors
s552270429
p01225
Java
import java.awt.print.Printable; import java.util.Arrays; import java.util.Scanner; import javax.sound.midi.SysexMessage; public class Cards { public int num; public int color; } public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); i...
Main.java:62: error: not a statement nums[nc_count2]==cards[k]; ^ 1 error
s468139418
p01225
Java
import java.awt.print.Printable; import java.util.Arrays; import java.util.Scanner; import javax.sound.midi.SysexMessage; public class Cards { public int num; public int color; } public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); i...
Main.java:7: error: class Cards is public, should be declared in a file named Cards.java public class Cards { ^ Main.java:62: error: incompatible types: Cards cannot be converted to int nums[nc_count2]=cards[k]; ^ Main.java:79: ...
s649434731
p01225
Java
import java.awt.print.Printable; import java.util.Arrays; import java.util.Scanner; import javax.sound.midi.SysexMessage; class Cards { public int num; public int color; } public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = ...
Main.java:62: error: incompatible types: Cards cannot be converted to int nums[nc_count2]=cards[k]; ^ Main.java:79: error: cannot find symbol sames[semecount]=nums[k]; ...
s997818661
p01225
Java
import java.io.*; public class Rummy { public static void main (String[] args) throws IOException { BufferedReader input = new BufferedReader (new InputStreamReader (System.in)); String setTotalStr = input.readLine(); int setTotal = Integer.parseInt(setTotalStr); int cardTotal = 9; String[][] c...
Main.java:3: error: class Rummy is public, should be declared in a file named Rummy.java public class Rummy { ^ 1 error
s300151844
p01225
Java
import java.io.*; public class Main { public static void main (String[] args) { BufferedReader input = new BufferedReader (new InputStreamReader (System.in)); String setTotalStr = input.readLine(); int setTotal = Integer.parseInt(setTotalStr); int cardTotal = 9; String[][] cardInfoNumStr = new ...
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown String setTotalStr = input.readLine(); ^ Main.java:23: error: unreported exception IOException; must be caught or declared to be thrown cardInfoNumStr[set] = input.readLine().split(" "...
s439906696
p01225
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt(); int[] deck = new int[9]; for (int i = 0; i < t; i++) { int isOK = 1; for (int j = 0; j < 9; j++) { deck[j] = in.nextInt(); } int colorSum = 0; fo...
Main.java:30: error: cannot find symbol Arrays.sort(deck); ^ symbol: variable Arrays location: class Main 1 error
s143734746
p01225
C++
#include <algorithm> #include <iostream> #include <vector> using namespace std; bool same(int a, int b, int c){ if(a==b && a==c){ return true; }else{ return false; } } bool renban(int a, int b, int c){ if(a+2==c && b+1==c ){ return true; }else{ return false; } } int main(){ int T; int n[9]; vect...
a.cc: In function 'int main()': a.cc:45:52: error: expected ';' before 'if' 45 | if(color == "R") n[k] += 20 | ^ | ; 46 | if(color == "G") n[k] += 40; ...
s683731550
p01225
C++
#include <iostream> #include <string> using namespace std; int T, card[9]; bool is_same_number(int a, int b, int c) { return (a==b && b==c) && c==a; } bool is_sequence (int a, int b, int c) { return (a+2==b+1 && b+1==c) && c==a+2; } bool is_good_set(int a, int b, int c) { return is_same_number(a, b, c) || is_s...
a.cc: In function 'int win()': a.cc:25:3: error: 'sort' was not declared in this scope; did you mean 'short'? 25 | sort(card,card+9); | ^~~~ | short a.cc:29:12: error: 'next_permutation' was not declared in this scope 29 | } while (next_permutation (card, card+9)); | ^~~~~~~~~...
s638431765
p01225
C++
#include <iostream> #include <string> using namespace std; int T, card[9]; bool is_same_number(int a, int b, int c) { return (a==b && b==c) && c==a; } bool is_sequence (int a, int b, int c) { return (a+2==b+1 && b+1==c) && c==a+2; } bool is_good_set(int a, int b, int c) { return is_same_number(a, b, c) || is_s...
a.cc: In function 'int win()': a.cc:25:3: error: 'sort' was not declared in this scope; did you mean 'short'? 25 | sort(card,card+9); | ^~~~ | short a.cc:29:12: error: 'next_permutation' was not declared in this scope 29 | } while (next_permutation (card, card+9)); | ^~~~~~~~~...
s786544274
p01225
C++
#include <iostream> #include <string> using namespace std; int T, card[9]; bool is_same_number(int a, int b, int c) { return (a==b && b==c) && c==a; } bool is_sequence (int a, int b, int c) { return (a+2==b+1 && b+1==c) && c==a+2; } bool is_good_set(int a, int b, int c) { return is_same_number(a, b, c) || is_s...
a.cc: In function 'int win()': a.cc:25:3: error: 'sort' was not declared in this scope; did you mean 'short'? 25 | sort(card,card+9); | ^~~~ | short a.cc:29:12: error: 'next_permutation' was not declared in this scope 29 | } while (next_permutation (card, card+9)); | ^~~~~~~~~...
s782920518
p01225
C++
#include <iostream> #include <string> using namespace std; int T, card[9]; bool is_same_number(int a, int b, int c) { return (a==b && b==c) && c==a; } bool is_sequence (int a, int b, int c) { return (a+2==b+1 && b+1==c) && c==a+2; } bool is_good_set(int a, int b, int c) { return is_same_number(a, b, c) || is_s...
a.cc: In function 'int win()': a.cc:25:3: error: 'sort' was not declared in this scope; did you mean 'short'? 25 | sort(card,card+9); | ^~~~ | short a.cc:29:12: error: 'next_permutation' was not declared in this scope 29 | } while (next_permutation (card, card+9)); | ^~~~~~~~~...
s371181781
p01225
C++
#include <iostream> #include <string> using namespace std; int T,card[16]; bool is_good_set(int a,int b,int c){ return is_same_number(a,b,c)||is_sequence(a,b,c); } bool is_same_number(int a,int b,int c){ if(a==b&&b==c)return true; return false; } bool is_sequence(int a,int b,int c){ if(a+2==b+1&&b+1==c)return tr...
a.cc: In function 'bool is_good_set(int, int, int)': a.cc:9:16: error: 'is_same_number' was not declared in this scope 9 | return is_same_number(a,b,c)||is_sequence(a,b,c); | ^~~~~~~~~~~~~~ a.cc:9:39: error: 'is_sequence' was not declared in this scope 9 | return is_same_num...
s597017888
p01225
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int T,card[16]; bool is_good_set(int a,int b,int c){ return is_same_number(a,b,c)||is_sequence(a,b,c); } bool is_same_number(int a,int b,int c){ if(a==b&&b==c)return true; return false; } bool is_sequence(int a,int b,int c){ if(a+2==...
a.cc: In function 'bool is_good_set(int, int, int)': a.cc:10:16: error: 'is_same_number' was not declared in this scope 10 | return is_same_number(a,b,c)||is_sequence(a,b,c); | ^~~~~~~~~~~~~~ a.cc:10:39: error: 'is_sequence' was not declared in this scope 10 | return is_same_n...
s170397144
p01225
C++
#include <cstdio> #include <algorithm> #include <string> using namespace std; int T, card[9]; bool is_set(int a, int b, int c){ return is_same_number(a, b, c) || is_sequence(a, b, c); } bool is_same_number(int a, int b, int c){ return a == b && b == c; } bool is_sequence(int a, int b, int c){ return a+2 == b+...
a.cc: In function 'bool is_set(int, int, int)': a.cc:9:10: error: 'is_same_number' was not declared in this scope 9 | return is_same_number(a, b, c) || is_sequence(a, b, c); | ^~~~~~~~~~~~~~ a.cc:9:37: error: 'is_sequence' was not declared in this scope 9 | return is_same_number(a, b, c) || i...
s805032761
p01225
C++
// Rummy #include <iostream> #include <algorithm> #include <string> using namespace std; int T, card[16]; bool is_good_set(int a, int b, int c){ return is_same_number(a,b,c) || is_sequence(a,b,c); } bool is_same_number(int a, int b, int c){ if (a == b && b == c) return true; else return false; } bool is_s...
a.cc: In function 'bool is_good_set(int, int, int)': a.cc:8:10: error: 'is_same_number' was not declared in this scope 8 | return is_same_number(a,b,c) || is_sequence(a,b,c); | ^~~~~~~~~~~~~~ a.cc:8:35: error: 'is_sequence' was not declared in this scope 8 | return is_same_number(a,b,c) || is...
s077179195
p01225
C++
#include <iostream> #include <string> using namespace std; int T, card[16]; int win(); int main() { cin >> T; for (int t=0; t<T; ++t) { for (int i=0; i<9; ++i) { cin >> card[i]; } string color; for (int i=0; i<9; ++i) { cin >> color; if (color == "G") card[i] += 10; else if ...
a.cc: In function 'int win()': a.cc:46:3: error: 'sort' was not declared in this scope; did you mean 'short'? 46 | sort(card, card+9); | ^~~~ | short a.cc:50:12: error: 'next_permutation' was not declared in this scope 50 | } while (next_permutation(card, card+9)); | ^~~~~~~~~...
s739902087
p01225
C++
#include <iostream> #include <string> using namespace std; int T, card[16]; int win(); int main() { cin >> T; for (int t=0; t<T; ++t) { for (int i=0; i<9; ++i) { cin >> card[i]; } string color; for (int i=0; i<9; ++i) { cin >> color; if (color == "G") card[i] += 10; else if (...
a.cc: In function 'int win()': a.cc:45:3: error: 'sort' was not declared in this scope; did you mean 'short'? 45 | sort(card, card+9); | ^~~~ | short a.cc:49:12: error: 'next_permutation' was not declared in this scope 49 | } while (next_permutation(card, card+9)); | ^~~~~~~~~...
s268799637
p01225
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int T, card[16]; int main(){ cin >> T; for (int t = 0; t < T; ++t){ for (int i = 0; i < 9; i++){ cin >> card[i]; } string color; for (int i = 0; i < 9; i++){ cin >> color; if (color == "G") card[i] += 10; else if (color =...
a.cc: In function 'int main()': a.cc:19:17: error: 'win' was not declared in this scope 19 | cout << win() << endl; | ^~~ a.cc: In function 'bool is_good_set(int, int, int)': a.cc:23:16: error: 'is_same_number' was not declared in this scope 23 | return is_same_number(a, b, c...
s551700208
p01225
C++
#include<stdio.h> #include<algorithm> using namespace std; int main(){ int n; cin >> n; for (int i = 0; i < n; i++){ int n[9]; char c[9]; int R[9]; int G[9]; int B[9]; int r = 0, g = 0, b = 0; //????????? for (int j = 0; j < 9; j++){ c[j] = 0; n[j] = 0; R[j] = 10; G[j] = 10; B[j]...
a.cc: In function 'int main()': a.cc:12:9: error: 'cin' was not declared in this scope 12 | cin >> n; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<algorithm> +++ |+#include <iostream> 3 | a.c...
s254582327
p01225
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int T, card[16]; bool is_good_set(int a, int b, int c){ return is_same_number(a, b, c) || is_sequence(a, b, c); } bool is_same_number(int a, int b, int c){ if (a == b && b == c) return true; else return false; } bool is_sequence(int ...
a.cc: In function 'bool is_good_set(int, int, int)': a.cc:9:16: error: 'is_same_number' was not declared in this scope 9 | return is_same_number(a, b, c) || is_sequence(a, b, c); | ^~~~~~~~~~~~~~ a.cc:9:43: error: 'is_sequence' was not declared in this scope 9 | return is_sa...
s612752368
p01225
C++
#include <iostream> using namespace std; void show(int* cards); int main() { int n; cin >> n; int cards[9]; for(int i=1; i<=n; i++){ /* input */ for(int k=0; k<9; k++){ cin >> cards[k]; } for(int k=0; k<9; k++){ char col; cin >> col; switch (col) { case 'R': bre...
a.cc: In function 'int main()': a.cc:27:5: error: 'sort' was not declared in this scope; did you mean 'short'? 27 | sort(&cards[0], &cards[10]); | ^~~~ | short
s407798281
p01225
C++
#include <iostream> using namespace std; int main() { int n; cin >> n; int cards[9]; for(int i=1; i<=n; i++){ /* input */ for(int k=0; k<9; k++){ cin >> cards[k]; } for(int k=0; k<9; k++){ char col; cin >> col; switch (col) { case 'R': break; case 'G': ca...
a.cc: In function 'int main()': a.cc:25:5: error: 'sort' was not declared in this scope; did you mean 'short'? 25 | sort(&cards[0], &cards[10]); | ^~~~ | short
s354746537
p01225
C++
#include <iostream> using namespace std; int main() { int n; cin >> n; int cards[9]; for(int i=1; i<=n; i++){ /* input */ for(int k=0; k<9; k++){ cin >> cards[k]; } for(int k=0; k<9; k++){ char col; cin >> col; switch (col) { case 'R': break; case 'G': ca...
a.cc: In function 'int main()': a.cc:25:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 25 | std::sort(&cards[0], &cards[10]); | ^~~~ | qsort
s159696996
p01225
C++
using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; namespace Main { class Program { /// <summary> /// ????????°???????????¨????????????????????? /// </summary> /// <param name="args"></param> static void Main(string[] args) ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.I...
s502901023
p01225
C++
using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { /// <summary> /// ????????°???????????¨????????????????????? /// </summary> /// <param name="args"></param> static void Main(str...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.I...
s497075834
p01225
C++
using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; namespace ConsoleApplication1 { class Main { /// <summary> /// ????????°???????????¨????????????????????? /// </summary> /// <param name="args"></param> static void Main(string...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.I...
s221435724
p01225
C++
using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; namespace Main { class Main { /// <summary> /// ????????°???????????¨????????????????????? /// </summary> /// <param name="args"></param> static void Main(string[] args) ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.I...
s470468571
p01225
C++
namespace ConsoleApplication1 { class Program { /// <summary> /// ????????°???????????¨????????????????????? /// </summary> /// <param name="args"></param> static void Main(string[] args) { int SET_CARDS = 9; int count = int.Parse(Consol...
a.cc:11:26: error: 'string' has not been declared 11 | static void Main(string[] args) | ^~~~~~ a.cc:11:35: error: expected ',' or '...' before 'args' 11 | static void Main(string[] args) | ^~~~ a.cc:44:16: error: expected ':' ...
s394468546
p01225
C++
using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; namespace rummy { class Program { /// <summary> /// ????????°???????????¨????????????????????? /// </summary> /// <param name="args"></param> static void Main(string[] args) ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.I...
s091325703
p01225
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Rummy { class Program { /// <summary> /// ????????°????????¨????????????????????? /// </summary> /// <param name="args"></param> static void Main...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s794760866
p01225
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; /** * <pre> *AOJ Rummy?????????????????????????????????????????????????????° * </pre> * * @author ?????? * @category AOJRummy * @version 1.8_45 * @since 1.8_45 */ public class Main{ pub...
a.cc:3:1: error: 'import' does not name a type 3 | import java.io.BufferedReader; | ^~~~~~ 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.io.IOException; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fm...
s006423206
p01225
C++
#include <iostream> #include <string> using namespace std; int T, card[16]; bool is_same_number(int a, int b, int c) { if (a == b and b == c) return true; return false; } bool is_sequence(int a, int b, int c) { if(a + 1 == b and b + 1 == c) return true; return false; } bool is_good_set(int a, int b,...
a.cc: In function 'int win()': a.cc:33:5: error: 'sort' was not declared in this scope; did you mean 'short'? 33 | sort(card, card + 9); | ^~~~ | short a.cc:36:14: error: 'next_permutation' was not declared in this scope 36 | } while (next_permutation(card, card + 9)); | ...
s129991067
p01225
C++
#include<iostream> #include<string> using namespace std; int T,card[16]; int win(); bool is_good_set(int,int,int); bool is_same_number(int,int,int); bool is_sequence(int,int,int); bool is_good_set(); bool is_all_good_set(); int main(){ cin >> T; for(int t=0;t<T;t++){ for(int i=0;i<9;i++){ cin >> card[i];...
a.cc: In function 'int win()': a.cc:48:3: error: 'sort' was not declared in this scope; did you mean 'short'? 48 | sort(card,card+9); | ^~~~ | short a.cc:53:10: error: 'next_permutation' was not declared in this scope 53 | }while(next_permutation(card,card+9)); | ^~~~~~~~~~~~~~~...
s979361381
p01225
C++
public class Main{ if }
a.cc:1:1: error: expected unqualified-id before 'public' 1 | public class Main{ | ^~~~~~
s211160507
p01225
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; int T, card[10]; bool is_same_number(int a, int b, int c){ if(a == b && a == c) return true; else return false; }//色数字ともに一致 bool is_sequence(int a, int b, int c){ if(a+2 == c && b+1==c) return true; else return false...
a.cc:34:44: error: extended character   is not valid in an identifier 34 | }while(next_permutation(card, card+9)); //next_permutationは全ての組み合わせを昇順に出す関数 | ^ a.cc: In function 'int win()': a.cc:34:44: error: '\U00003000' was not declared in this scope 34 | }wh...
s164561663
p01225
C++
clude <iostream> #include <string> #include <algorithm> using namespace std; int T, card[16]; bool is_same_number(int a, int b, int c){ return a == b && b == c; } bool is_sequence(int a, int b, int c){ return a+2 == b+1 && b+1 == c; } bool is_good_set(int a, int b, int c){ return is_same_number(a, b, c) || is_...
a.cc:1:1: error: 'clude' does not name a type 1 | clude <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/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 6...
s163163580
p01225
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int T, card[16]; bool is_same_number(int a, int b, int c){ return a == b && b == c; } bool is_sequence(int a, int b, int c){ return a+2 == b+1 && b+1 == c; } bool is_good_set(int a, int b, int c){ return is_same_number(a, b, c) || ...
a.cc: In function 'int main()': a.cc:42:18: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 42 | if(color == 'G') card[i] += 10; | ~~~~~ ^~ ~~~ | | | | | char | ...
s946590475
p01225
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int T, card[16]; bool is_same_number(int a, int b, int c){ return a == b && b == c; } bool is_sequence(int a, int b, int c){ return a+2 == b+1 && b+1 == c; } bool is_good_set(int a, int b, int c){ return is_same_number(a, b, c) || ...
a.cc: In function 'int main()': a.cc:42:18: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 42 | if(color == 'G') card[i] += 20; | ~~~~~ ^~ ~~~ | | | | | char | ...
s593631192
p01225
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int T, card[16]; bool is_same_number(int a, int b, int c){ return a == b && b == c; } bool is_sequence(int a, int b, int c){ return a+2 == b+1 && b+1 == c; } bool is_good_set(int a, int b, int c){ return is_same_number(a, b, c) || ...
a.cc: In function 'int main()': a.cc:42:18: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 42 | if(color == 'G') card[i] += 20; | ~~~~~ ^~ ~~~ | | | | | char | ...
s267800124
p01225
C++
int n; int n_cd[3][9]; int n_cl[3]; int n_set; int check(); void rm_sets(); int rm_id_sets(int, int); int rm_seq_sets(int); void dbg(){ int i,j; for(i = 0; i < 3; i++){ printf("------n_cl[%d]: %d\n", i, n_cl[i]); for(j = 0; j < 9; j++){ printf("n_cd[%d][%d]: %d\n", i, j, n_cd[i][j]); } } } int main(){ i...
a.cc: In function 'void dbg()': a.cc:14:17: error: 'printf' was not declared in this scope 14 | printf("------n_cl[%d]: %d\n", i, n_cl[i]); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include ...
s385670626
p01225
C++
#include <iostream> int main(){int n,i,j,p[9],h[32];char c;for(std::cin>>n;n>0;n--){for(i=0;i<30;i++)h[i]=0;for(i=0;i<9;i++)cin>>p[i];for(i=0;i<9;i++){std::cin>>c;if(c==71)p[i]+=10;if(c==66)p[i]+=20;}for(i=0;i<9;i++)h[p[i]]++;for(i=0;i<30;i++)while(h[i]%3)for(j=0;j<3;j++)h[i+j]--;for(i=0;i<30&&h[i]>=0;i++);std::cout<<i...
a.cc: In function 'int main()': a.cc:2:105: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 2 | int main(){int n,i,j,p[9],h[32];char c;for(std::cin>>n;n>0;n--){for(i=0;i<30;i++)h[i]=0;for(i=0;i<9;i++)cin>>p[i];for(i=0;i<9;i++){std::cin>>c;if(c==71)p[i]+=10;if(c==66)p[i]+=20;}for(i=0;i<9;i++)h[...
s773926792
p01225
C++
#include <iostream> main(){int n,i,j,p[9],h[32];char c;for(std::cin>>n;n>0;n--){for(i=0;i<30;i++)h[i]=0;for(i=0;i<9;i++)std::cin>>p[i];for(i=0;i<9;i++){std::cin>>c;if(c==71)p[i]+=10;if(c==66)p[i]+=20;}for(i=0;i<9;i++)h[p[i]]++;for(i=0;i<30;i++)while(h[i]%3)for(j=0;j<3;j++)h[i+j]--;for(i=0;i<30&&h[i]>=0;i++);std::cout<<...
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){int n,i,j,p[9],h[32];char c;for(std::cin>>n;n>0;n--){for(i=0;i<30;i++)h[i]=0;for(i=0;i<9;i++)std::cin>>p[i];for(i=0;i<9;i++){std::cin>>c;if(c==71)p[i]+=10;if(c==66)p[i]+=20;}for(i=0;i<9;i++)h[p[i]]++;for(i=0;i<30;i++)wh...
s675642301
p01225
C++
#include <iostream> using namespace std;main(){int n,i,j,p[9];char c;for(cin>>n;n;n--){int h[32]={0};for(i=0;i<9;cin>>p[i++]);for(i=0;i<9;i++){cin>>c;if(c==71)p[i]+=10;if(c==66)p[i]+=20;}for(i=0;i<9;h[p[i++]]++);for(i=0;i<30;i++)while(h[i]%3)for(j=0;j<3;j++)h[i+j]--;for(i=0;i<30&&h[i]>=0;i++);puts(i-30?0:1);}}
a.cc:2:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | using namespace std;main(){int n,i,j,p[9];char c;for(cin>>n;n;n--){int h[32]={0};for(i=0;i<9;cin>>p[i++]);for(i=0;i<9;i++){cin>>c;if(c==71)p[i]+=10;if(c==66)p[i]+=20;}for(i=0;i<9;h[p[i++]]++);for(i=0;i<30;i++)while(h[i]%3)for...
s229471216
p01225
C++
#include <iostream> #include <algorithm> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) bool used[9]; int T,n[9],c...
a.cc: In function 'int main()': a.cc:25:17: error: 'memset' was not declared in this scope 25 | memset(c,0,sizeof(c)); | ^~~~~~ a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 11 | #include <stack> +++ |+#i...
s321626076
p01225
C++
#include<iostream> #include<algorithm> #include<deque> #include<vector> #include<map> using namespace std; int main(){ int T; deque<int> R,B,G; int inx[10]; char iny; map<int,int> Ri,Bi,Gi; cin >> T; while(T-- > 0){ R.clear();B.clear();G.clear(); Ri.clear();Bi.clear();Gi.clear(); for(int i...
a.cc: In function 'int main()': a.cc:82:20: error: 'breal' was not declared in this scope 82 | if(B.size() < 3)breal; | ^~~~~
s328902939
p01225
C++
#include <iostream> #include <string> using namespace std; int T,card[10]; string str; bool check1(int a,int b,int c){ if(a == b && b == c) return true; return false; } bool check2(int a,int b,int c){ if(a+2 == b+1 && b+1 == c) return true; return false; } bool check3(int a,int b,int c){ return ...
a.cc: In function 'int judge()': a.cc:28:5: error: 'sort' was not declared in this scope; did you mean 'short'? 28 | sort(card,card+9); | ^~~~ | short a.cc:32:12: error: 'next_permutation' was not declared in this scope 32 | }while(next_permutation(card,card+9)); | ^~~...
s180575552
p01225
C++
#include <iostream> #include <vector> using namespace std; void solve() { int T; cin >> T; for(int i = 0; i < T; ++i) { vector< vector<int> > data(3, 10); vector<int> num(9); for(int i = 0; i < 9; ++i) { cin >> num[i]; } vector<char> color(9); for(int i = 0; i < 9; ++i) { cin >> color[i]; ...
a.cc: In function 'void solve()': a.cc:12:49: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int, int)' 12 | vector< vector<int> > data(3, 10); | ^ In file included from /usr/include/c++/14/vector:66, ...
s399791726
p01225
C++
a#include<iostream> #include<string> using namespace std; int T, card[16]; bool is_same_number(int a, int b, int c){ return a == b && b == c; } bool is_sequence(int a, int b, int c){ return a+2 == b+1 && b+1 == c; } bool is_good_set(int a, int b, int c){ return is_same_number(a, b, c) || is_sequence(a, b, c); } bool...
a.cc:1:2: error: stray '#' in program 1 | a#include<iostream> | ^ a.cc:1:1: error: 'a' does not name a type 1 | a#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/c+...
s143195075
p01225
C++
#include<iostream> #include<string> using namespace std; int T, card[16]; bool is_same_number(int a, int b, int c){ return a == b && b == c; } bool is_sequence(int a, int b, int c){ return a+2 == b+1 && b+1 == c; } bool is_good_set(int a, int b, int c){ return is_same_number(a, b, c) || is_sequence(a, b, c); } bool ...
a.cc: In function 'int win()': a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(card, card+9); | ^~~~ | short a.cc:23:16: error: 'next_permutation' was not declared in this scope 23 | }while(next_permutation(card, card+9)); ...
s218636048
p01225
C++
import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.util.Collections.*; import static java.lang.Math.*; public class Main { int INF = 1 << 28; //long INF = 1L << 62; double EPS = 1e-10; int[] c, n; boolean[] used; void run() { Scanner sc = new Scanner(System.in); in...
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: ...
s315178221
p01226
Java
class Main{ /** * プログラムエントリポイント * @param args */ public static void main (String[] args){ Scanner sc = new Scanner(System.in); //データセット回数を入力 int setCountData = sc.nextInt(); //入力されたデータセット回数分繰り返す for( int i = 0 ; i < setCountData ; i++ ){ //繰り返す回数ごとに配列を作成して2次元配列の長さを入力 char[][] aryBattleAr...
Main.java:9: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:9: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s974096932
p01226
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.HashMap; import static java.lang.Integer.parseInt; /** * <pre> * ?????????????????? * </pre> * * @author ?????????????????§??? * @version 1.8_45 * @since 1.8_45 */ public cl...
Main.java:196: error: unnamed classes are a preview feature and are disabled by default. void last_tankLocate() { ^ (use --enable-preview to enable unnamed classes) Main.java:201: error: class, interface, enum, or record expected }// Tank????????????????????? ^ 2 errors
s903195808
p01226
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.HashMap; /** * <pre> * ?????????????????? * </pre> * * @author ?????????????????§??? * @version 1.8_45 * @since 1.8_45 */ public class main { public static void main(String...
Main.java:18: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s751429161
p01226
Java
package battletown; import java.util.HashMap; import java.util.Scanner; /** * <pre> * ?????????????????? * </pre> * * @author ?????????????????§??? * @version 1.8_45 * @since 1.8_45 */ public class battleTown3 { /* * ????????°???????????¨????????????????????? */ public static void main(String[] args) { ...
Main.java:15: error: class battleTown3 is public, should be declared in a file named battleTown3.java public class battleTown3 { ^ 1 error
s929524183
p01226
Java
import java.util.Scanner; public class BattleTown { public static void main (String args[]){ //??\??????????????????????????????Scanner???????????§??????????????? Scanner sc = new Scanner(System.in); int T = sc.nextInt(); int i = 0; for(i = 0; i < T; i++){ int H = sc.nextInt(); int W = sc.nextInt(...
Main.java:4: error: class BattleTown is public, should be declared in a file named BattleTown.java public class BattleTown { ^ 1 error
s216483356
p01226
Java
import java.util.Scanner; public class Main { // マップ // 戦車 class Tank { char[][] map; int x, y; // 座標 char dir; // 向いてる方角 int bx=-1, by=-1; // 砲弾の座標 public Tank(int x, int y, int dir, char[][] map) { this.x = x; this.y = y; this.map = map; if(dir == 0) this.dir = 'L'; else if...
Main.java:226: error: cannot find symbol Tank t = new BattleTown().new Tank(tankPos[0], tankPos[1], tankPos[2], map); ^ symbol: class BattleTown location: class Main 1 error
s254041477
p01226
Java
import java.util.Scanner; public class BattleTown { // マップ // 戦車 class Tank { char[][] map; int x, y; // 座標 char dir; // 向いてる方角 int bx=-1, by=-1; // 砲弾の座標 public Tank(int x, int y, int dir, char[][] map) { this.x = x; this.y = y; this.map = map; if(dir == 0) this.dir = 'L'; e...
Main.java:3: error: class BattleTown is public, should be declared in a file named BattleTown.java public class BattleTown { ^ Main.java:208: error: cannot access Main Main b = new Main(); ^ bad source file: ./Main.java file does not contain class Main Please remove or make sure it appears in the...
s498822809
p01226
Java
package BattleTown; public class BattleTown { public static void main(String args[]){ } } class tank { // 戦車の位置 private String[][] position = null; // 戦車の向き private String situation = null; // セッター public void setPosition(String[][] p) { position = p; } public void setSituation(String s) { situ...
Main.java:59: error: <identifier> expected if(map[p.][p.-1].equals("*") || map[p.][p.-1].equals("#")){ ^ Main.java:59: error: <identifier> expected if(map[p.][p.-1].equals("*") || map[p.][p.-1].equals("#")){ ^ Main.java:59: error: <identifier> expected if(map[p.][p.-1].equals("...
s749279276
p01226
Java
package BattleTown; import java.util.ArrayList; import java.util.Scanner; public class BattleTown { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int input_length = 0; // マップの高さ int height = 0; // マップの幅 int width = 0; // 各完成マップを入れる配列 ArrayList<map> map_list = new Arra...
Main.java:6: error: class BattleTown is public, should be declared in a file named BattleTown.java public class BattleTown { ^ 1 error
s193435018
p01226
Java
import java.util.ArrayList; import java.util.Scanner; public class Main{ public static void main(String[] args) { try { Scanner sc = new Scanner(System.in); int input_length = 0; // マップの高さ int height = 0; // マップの幅 int width = 0; // 各完成マップを入れる配列 ArrayList<map> map_list = new ArrayList<map>(...
Main.java:16: error: cannot find symbol ArrayList<map> map_list = new ArrayList<map>(); ^ symbol: class map location: class Main Main.java:16: error: cannot find symbol ArrayList<map> map_list = new ArrayList<map>(); ^ symbol: class map location:...
s380401599
p01226
Java
package BattleTown; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Scanner; // enum Situation{ /// <summary> /// 上 /// </summary> Up, /// <summary> /// 下 /// </summary> Down, /// <summary> /// 左 /// </summary> Left, /// ...
Main.java:207: error: constant string expression required case tank_situation.get("Left"): ^ 1 error
s273196863
p01226
Java
import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Scanner; enum Situation { /// <summary> /// 上 /// </summary> Up, /// <summary> /// 下 /// </summary> Down, /// <summary> /// 左 /// </summary> Left, /// <summary> /// 右 ...
Main.java:203: error: constant string expression required case tank_situation.get("Left"): ^ Main.java:222: error: constant string expression required case tank_situation.get("Right"): ^ Main.java:245: error: constant string expression required case tank_situation...
s097616999
p01226
C
#include <cstdio> #include <iostream> #include <utility> #include <string> #define rep(i,n) for(int i=0; i<(n); i++) #define dm(x) cerr << #x << " = " << x << endl; using namespace std; char map[20][21]; int H,W,N; struct po{ int x; int y; po operator+(po &p){ po t={x+p.x, y+p.y}; return t; } char &...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s437246294
p01226
C
#include<stdio.h> #include<string.h> int main(void){ int i,n,j,k,h,w,N,a=0,b=0; char map[22][22],mapf[20][20],command[105]; scanf("%d",&n); for(i=0;i<n;i++){ //初期化 for(j=0;j<22;j++){ for(k=0;k<22;k++){ map[j][k]='#'; } } scanf("%d %d",&h,&w); //初期化 for(j=0;j<20;j++...
main.c: In function 'main': main.c:166:15: error: stray '\343' in program 166 | if(j!=N-1)<U+3000>printf("\n"); | ^~~~~~~~
s887502011
p01226
C++
#include <bits/stdc++.h> using namespace std; string mp[20],str; int dir[256],h,w,m; char ch[4]={'^','>','v','<'}; int dx[]={0,1,0,-1},dy[]={-1,0,1,0}; int get_d(char a){ if(a=='U') return 0; if(a=='R') return 1; if(a=='D') return 2; if(a=='L') return 3; return -1; } void shoot(int x,int y,int d){ while(1...
a.cc: In function 'int main()': a.cc:62:17: error: expected ';' before '}' token 62 | if(f)break | ^ | ; 63 | } | ~
s100129864
p01226
C++
#include<iostream> #include<string> #define N 32 #define PLANE '.' #define BLOCK '*' #define STEEL '#' #define WATER '-' const int di[] = {-1,0,1,0}; const int dj[] = {0,1,0,-1}; const char *tank_dir = "^>v<"; int conv[256]={0,}; using namespace std; bool isinside(int i, int j, int h, int w){ return 0<=i&&i<h&&0<=...
a.cc: In function 'void simulate(char (*)[32], int, int, const std::string&)': a.cc:55:10: error: jump to case label 55 | case 'S': | ^~~ a.cc:46:11: note: crosses initialization of 'int nj' 46 | int nj = tj+dj[conv[v[s]]]; | ^~ a.cc:45:11: note: crosses initialization...
s388016963
p01227
Java
#include<bits/stdc++.h> int t, n, k; int x[100010]; int d[100010]; int main(){ cin >> t; while(t){ t--; cin >> n >> k; for(int i=0;i<n;i++){ cin << x[i]; } int ans = x[n-1] - x[n]; for(int i=1;i<n;i++){ d[i-1] = x[i] - x[i-1]; } sort(d,d+n-1); if(n>=k){ ans = 0; }else{ for(int i=0...
Main.java:1: error: illegal character: '#' #include<bits/stdc++.h> ^ Main.java:1: error: class, interface, enum, or record expected #include<bits/stdc++.h> ^ Main.java:4: error: class, interface, enum, or record expected int x[100010]; ^ Main.java:5: error: class, interface, enum, or record expected int d[10001...
s386909589
p01227
Java
#include <iostream> #include <algorithm> using namespace std; int t, n, k; int x[100010]; int d[100010]; int main(){ cin >> t; while(t){ t--; cin >> n >> k; for(int i=0;i<n;i++){ cin >> x[i]; } int ans = x[n-1] - x[0]; for(int i=1;i<n;i++){ d[i-1] = x[i] - x[i-1]; } sort(d,d+n-1); if(n<=k){ ...
Main.java:1: error: illegal character: '#' #include <iostream> ^ Main.java:2: error: illegal character: '#' #include <algorithm> ^ Main.java:5: error: class, interface, enum, or record expected int t, n, k; ^ Main.java:6: error: class, interface, enum, or record expected int x[100010]; ^ Main.java:7: error: class, inte...
s308867953
p01227
Java
import java.io.*; import java.util.*; public class CantryRoad { public static void main(String args[]) throws IOException{ Scanner scr = new Scanner(System.in); int t = Integer.parseInt(scr.nextLine()); for(int step=0; step<t; step++){ //System.out.println(" step:" + step); //try{ String[] str = s...
Main.java:4: error: class CantryRoad is public, should be declared in a file named CantryRoad.java public class CantryRoad { ^ 1 error
s678887994
p01227
Java
package cantryRoad; import java.util.*; public class CantryRoad { //private static ArrayList<Integer> xs; private static int[] xs; public static void main(String args[]){ Scanner scr = new Scanner(System.in); int t = Integer.parseInt(scr.nextLine()); for(int step=0; step<t; step++){ //try{ Stri...
Main.java:5: error: class CantryRoad is public, should be declared in a file named CantryRoad.java public class CantryRoad { ^ 1 error
s931193021
p01227
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.util.PriorityQueue; public class CountryRoad{ static final InputStream in=System.in; static final ...
Main.java:9: error: class CountryRoad is public, should be declared in a file named CountryRoad.java public class CountryRoad{ ^ Main.java:15: error: cannot find symbol int t=ir.nextInt(); ^ symbol: variable ir location: class CountryRoad Main.java:17: error: cannot find symbol int n=ir.nextIn...