submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s293157723 | p02258 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(void)
{
int n;
cin >> n;
vector<int> mon;
for (int i = 0; i < n; i++)
{
int x;
cin >> x;
mon.push_back(x);
}
vector<int> mi(n);
mi[0] = mon[0];
for (int i = 1; i < n; i++)
{
mi[i] = (min(mi[i - 1], mon[i]));
... | a.cc: In function 'int main()':
a.cc:35:20: error: 'INT32_MIN' was not declared in this scope
35 | int best = INT32_MIN;
| ^~~~~~~~~
|
s426338487 | p02258 | C++ | #include <stdio.h>
int main() {
int n;
int a[1000000] = {};
int min;
int max = -10000000000;
scanf("%d", &n);
for(int i = 0; i < n; i++)
scanf("%d", &a[i])
min = a[0];
for(int j = 1; i < n-1; j++) {
if(max < a[j] - min) {
max = a[j] - min;
}
if(min > a[j]) {
min = a[j];
}
}
printf("%d", m... | a.cc: In function 'int main()':
a.cc:7:19: warning: overflow in conversion from 'long int' to 'int' changes value from '-10000000000' to '-1410065408' [-Woverflow]
7 | int max = -10000000000;
| ^~~~~~~~~~~~
a.cc:11:35: error: expected ';' before 'min'
11 | scanf("%... |
s733489372 | p02258 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
int n;
cin >> n;
double a[2000000];
double i,max,min;
max = -1000000000000;
for (i = 0; i < n; i++)
{
scanf("%lf", &a[i]);
}
min = a[0];
for (i = 1; i < n; i++)... | a.cc: In function 'int main()':
a.cc:21:32: error: invalid types 'double [2000000][double]' for array subscript
21 | scanf("%lf", &a[i]);
| ^
a.cc:26:28: error: invalid types 'double [2000000][double]' for array subscript
26 | if (max < a[i] - m... |
s313458500 | p02258 | C++ | #include <stdio.h>
#include <math.h>
using namespace std;
int main() {
int n;
scanf("%d", &n);
ll minv = 1e+9;
ll ans = 0;
for (int i = 0; i < n; i++) {
ll v;
scanf("%lld", &v);
ans = max(ans, v - minv);
minv = min(minv, v);
}
printf("%lld\n", ans);
} | a.cc: In function 'int main()':
a.cc:8:3: error: 'll' was not declared in this scope
8 | ll minv = 1e+9;
| ^~
a.cc:9:5: error: expected ';' before 'ans'
9 | ll ans = 0;
| ^~~~
| ;
a.cc:11:7: error: expected ';' before 'v'
11 | ll v;
| ^~
| ;
a.cc:12... |
s986586315 | p02258 | C++ | #include<iostream>
using namespace std;
int main(){
int n,a,mini,ans=;
cin>>n>>mini;
for(int i=0;i<n-1;i++){
cin>>a;
if(a-mini>ans)ans=a-mini;
if(mini>a)mini=a;
}
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:20: error: expected primary-expression before ';' token
4 | int n,a,mini,ans=;
| ^
|
s132675241 | p02258 | C++ |
max = tmp;
}
}
}
printf("%lld\n", max);
return 0;
} | a.cc:2:17: error: 'max' does not name a type
2 | max = tmp;
| ^~~
a.cc:3:13: error: expected declaration before '}' token
3 | }
| ^
a.cc:4:9: error: expected declaration before '}' token
4 | }
| ^
a.cc:5:5: error: expe... |
s505220390 | p02258 | C++ | #include<iostream>
int main(){
int n;
std::cin >> n;
int ans = INT_MIN;
int mini;
std::cin >> mini;
for (int i = 1; i < n; ++i){
int a;
std::cin >> a;
if (a - mini>ans)ans = a - mini;
if (mini>a)mini = a;
}
std::cout << ans << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:19: error: 'INT_MIN' was not declared in this scope
6 | int ans = INT_MIN;
| ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #include<iostream>
+++ |+#include ... |
s806042290 | p02258 | C++ | include<iostream>
#include<cmath>
using namespace std;
int main(){
int R[200001],N;
int max=1;
long min=1000000000;
int i,j;
cin >> N;
for(int t=0;t<N;t++){
cin >> R[t];
if(R[t]<min){
i=t;
min=R[t];
}
}
for(int k=i;k<N;k++){
if(R[k]>max){
max=R[k];}
}... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/cmath:45,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
16... |
s917723045 | p02259 | Java | import java.util.Arrays;public class Main {
int[] random(int n) {
int[] a = new int[n];
for(int i = 0; i < n; i++) {
a[i] = (int)(Math.random() * 1000);
} return a;
}
void swap(int[] a, int i, int j) {
int temp = a[i]; a[i] = a[j]; a[j] = temp; }
void bubbleSort(int[] a) {
... | Main.java:31: error: illegal start of expression
public static void main(String[] args) {
^
1 error
|
s142468652 | p02259 | Java | import java.io.BufferReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static final int BIG_NUM= 2000000000;
public static final int MOD = 1000000007;
public static void main(String[] args) {
BufferReader br=new BufferReader(new InputStreamReader(System.in));
... | Main.java:40: error: 'catch' without 'try'
}catch (NumberFormatException e) {
^
Main.java:42: error: 'catch' without 'try'
} catch (IOException e) {
^
Main.java:12: error: 'try' without 'catch', 'finally' or resource declarations
try{
^
Main.java:46: error: reached end of file whi... |
s471265424 | p02259 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
int[] array = new int[n];
String[] input = sc.nextLine().split(" ");
for(int i = 0; i < n; i++){
... | Main.java:13: error: reached end of file while parsing
}
^
1 error
|
s828043056 | p02259 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
int[] array = new int[n];
String[] input = sc.nextLine().split(" ");
for(int i = 0; i < n; i++){
... | Main.java:14: error: reached end of file while parsing
}
^
1 error
|
s137760710 | p02259 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int count = 0;
int n = Integer.parseInt(sc.nextLine());
int[] array = new int[n];
String[] input = sc.nextLine().split(" ");
for(int i = 0; i ... | Main.java:17: error: bad operand types for binary operator '>'
if(input[j] > input[j+1]){
^
first type: String
second type: String
Main.java:18: error: incompatible types: String cannot be converted to int
int tmp = input[j];
... |
s870981795 | p02259 | Java | #include <iostream>
using namespace std;
int bubbleSort(int a[],int n){
int flag=1;
int c=0;
for(int i=0;flag;i++){
flag=0;
for(int j=n-1;j>i;j--){
if(a[j-1]>a[j]){
swap(a[j],a[j-1]);
flag=1;
c++;
}
}
}
... | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int bubbleSort(int a[],int n){
^
(use --enable-preview to enable unnamed... |
s111596697 | p02259 | Java | import java.util.Arrays;
import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int[] nums = new int[n];
for (int i = 0; i < n; i++) nums[i] = scanner.nextInt();
bu... | Main.java:5: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s902196496 | p02259 | Java | import java.util.Arrays;
import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int[] nums = new int[n];
for (int i = 0; i < n; i++) nums[i] = scanner.nextInt();
bu... | Main.java:5: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s248337358 | p02259 | Java | import java.util.Arrays;
import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int[] nums = new int[n];
for (int i = 0; i < n; i++) nums[i] = scanner.nextInt();
bu... | Main.java:5: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s358694966 | p02259 | Java | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamRe... | Main.java:15: error: cannot find symbol
StringTokenizer st=new StringTokenizer(br.readLine());
^
symbol: class StringTokenizer
location: class Main
Main.java:15: error: cannot find symbol
StringTokenizer st=new StringTokenizer(br.readLine());
^
symbol: class StringTokenizer
location: ... |
s269488308 | p02259 | Java | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.*;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedRead... | Main.java:29: error: variable i might not have been initialized
for(int i=i;i<n;i++)stb.append(Integer.toString(in[i]));
^
1 error
|
s770987725 | p02259 | Java | import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = ne... | Main.java:29: error: variable i might not have been initialized
for(int i=i;i<n;i++)stb.append(Integer.toString(in[i]));
^
1 error
|
s120560274 | p02259 | Java | import java.io.*;
import java.util.Arrays;
public class Sort{
public static void main(String[] args){
BufferedReader br
= new BufferedReader(new InputStreamReader(System.in), 1);
int n;
int[] array;
String[] tmp = null;
try{
n = Integer.parseInt(br.readLine());
tmp = br.readLine().split(" ");
... | Main.java:4: error: class Sort is public, should be declared in a file named Sort.java
public class Sort{
^
1 error
|
s168935169 | p02259 | Java | for(int j = array.length-1; j > i; j--){
if( array[j] < array[j-1]){
t = array[j];
array[j] = array[j-1];
array[j-1] = t;
cnt++;
}
}
}
for(int x : array)
System.out.print(x+" ");
System.out.println();
System.out.println(cnt);
}
} | Main.java:1: error: class, interface, enum, or record expected
for(int j = array.length-1; j > i; j--){
^
Main.java:1: error: class, interface, enum, or record expected
for(int j = array.length-1; j > i; j--){
^
Main.java:1: error: class, interface, enum, or record expect... |
s222776589 | p02259 | Java | import java.io.*;
import java.util.Arrays;
public class Sort{
public static void main(String[] args){
BufferedReader br
= new BufferedReader(new InputStreamReader(System.in), 1);
int n;
int[] array;
String[] tmp = null;
try{
n = Integer.parseInt(br.readLine());
tmp = br.readLine().split(" ");
... | Main.java:4: error: class Sort is public, should be declared in a file named Sort.java
public class Sort{
^
1 error
|
s811488913 | p02259 | Java | import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main2 {
public static void printArray(List<Integer> array) {
StringBuilder sb = new StringBuilder();
sb.append(array.get(0));
for (int j = 1; j < array.size(); j++) {
sb.append(" ").append(ar... | Main.java:6: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s667569452 | p02259 | Java | import java.io.*;
public class Main {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int count = Integer.parseInt(in.readLine());
String[] arrStr = in.readLine().split(" ");
for(int i=0; i<count; i++) { arrInt[i] = ... | Main.java:9: error: cannot find symbol
for(int i=0; i<count; i++) { arrInt[i] = Integer.parseInt(arrStr[i]); }
^
symbol: variable arrInt
location: class Main
Main.java:12: error: incompatible types: int cannot be converted to boolean
while(flag) {
^
Main.... |
s302431953 | p02259 | Java | import java.io.*;
public class Main {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int count = Integer.parseInt(in.readLine());
String[] arrStr = in.readLine().split(" ");
int[] arrInt = new int[count];
for(... | Main.java:13: error: incompatible types: int cannot be converted to boolean
while(flag) {
^
1 error
|
s497003093 | p02259 | Java | public class Main {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int count = scanner.nextInt();
int[] sortList = new int[count];
for(int i = 0; i < count; i++){
sortList[i] = scanner.nextInt();
}
int anser = bubbleSort(sortList, count);
for(int i = 0; i < count; i+... | Main.java:3: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s406006694 | p02259 | Java | public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
String[] strs = br.readLine().split(" ");
int[] inputData = new int[n];
for (int i = 0; i < n; i++) {
inputDat... | Main.java:3: error: cannot find symbol
public static void main(String[] args) throws IOException {
^
symbol: class IOException
location: class Main
Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^... |
s326502598 | p02259 | Java | import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.nextLine();
String[] datastr = sc.nextLine().split(" ");
int[] a = new int[n];
for (int i=0;... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s026097515 | p02259 | Java | import java.util.Scanner;
public class Sort{
public static int bubbleSort(int A[],int N){
int i,j,r=0,temp;
boolean flag=true;
for(i=0;flag;i++){
flag=false;
for(j=N-1;j>=i+1;j--){
if(A[j]<A[j-1]){
temp=A[j];
A[j]=A[j-1];
A[j-1]=temp;
flag=true;... | Main.java:3: error: class Sort is public, should be declared in a file named Sort.java
public class Sort{
^
1 error
|
s525147423 | p02259 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
int n = scan.nextInt();
int[] arr = new int[n];
for(int i = 0; i < n; i++){
arr[i] = scan.nextInt();
}
int count = 0;
boolean flag = 1;
int i = 0;
while(flag)... | Main.java:13: error: incompatible types: int cannot be converted to boolean
boolean flag = 1;
^
Main.java:16: error: incompatible types: int cannot be converted to boolean
flag = 0;
^
Main.java:23: error: incompatible types: int cannot be converted to boolean
flag = 1;
^... |
s103401368 | p02259 | Java | import java.io.*
public class Main{
public static void main(String[] args){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int data [] = int[n];
int count = 0;
for(int i=0; i<n; i++){
for(int j=0; j<n-i; j++){
if(da... | Main.java:1: error: ';' expected
import java.io.*
^
Main.java:6: error: ']' expected
int data [] = int[n];
^
Main.java:6: error: ';' expected
int data [] = int[n];
^
3 errors
|
s890186957 | p02259 | Java | import java.io.* ;
public class Main{
public static void main(String[] args){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int data [] = new int[n];
int count = 0;
for(int i=0; i<n; i++){
for(int j=0; j<n-i; j++){
... | Main.java:5: error: unreported exception IOException; must be caught or declared to be thrown
int n = Integer.parseInt(br.readLine());
^
1 error
|
s599383925 | p02259 | Java | import java.io.* ;
public class Main{
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int data [] = new data [n];
int count = 0;
for(int i=0; i<n; i++){
for(int j=0;... | Main.java:6: error: cannot find symbol
int data [] = new data [n];
^
symbol: class data
location: class Main
1 error
|
s749391593 | p02259 | Java | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args) thorows IOException{
int n =0;
int [] suuji;
int count =0;
Scanner scanner = new Scanner(System.int);
int n = scanner.nexrInt();
int [] suuji = new int[n];
for(in... | Main.java:6: error: ';' expected
public static void main(String[] args) thorows IOException{
^
Main.java:11: error: <identifier> expected
Scanner scanner = new Scanner(System.int);
^
Main.java:11: error: ';' expecte... |
s607479200 | p02259 | Java | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args) throws IOException{
int n =0;
int [] suuji;
int narabi =0;
int count =0;
Scanner scanner = new Scanner(System.in);
int n = scanner.nexrInt();
int [] suuji = new int[... | Main.java:32: error: not a statement
System,out.print(narbai+ " ");
^
Main.java:32: error: ';' expected
System,out.print(narbai+ " ");
^
Main.java:37: error: class, interface, enum, or record expected
}
^
3 errors
|
s462348072 | p02259 | Java | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args) {
int count =0;
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
int [] array = new int[n];
for(int i=0; i<n-1; i++){
array[i... | Main.java:32: error: reached end of file while parsing
}
^
1 error
|
s197734131 | p02259 | Java | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args) {
int count =0;
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
int [] array = new int[n];
for(int i=0; i<n-1; i++){
array[i... | Main.java:16: error: cannot find symbol
for(int j=0; j<array.length-1; j++){
^
symbol: variable array
location: class Main
Main.java:17: error: cannot find symbol
for(int k=n-1; j<k; k--){
^
symbol: variable n
location: class Main
Main.jav... |
s111628990 | p02259 | Java | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args) {
int count =0;
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
int [] array = new int[n];
for(int i=0; i<n-1; i++){
array[i... | Main.java:27: error: cannot find symbol
System.out.print(" " + a[i]);
^
symbol: variable a
location: class Main
1 error
|
s472081431 | p02259 | Java | class Main extends MyUtil{
// public static ArrayList<ArrayList<Integer>> g;
public static Graph g;
public static void main(String[] args) throws Exception{
int n = readInt();
int[] a = readIntMap();
int count = 0;
for (int i = 0; i < n-1; i++) {
for (int j ... | Main.java:1: error: cannot find symbol
class Main extends MyUtil{
^
symbol: class MyUtil
Main.java:3: error: cannot find symbol
public static Graph g;
^
symbol: class Graph
location: class Main
Main.java:6: error: cannot find symbol
int n = readInt();
... |
s193145407 | p02259 | Java | import java.io.*;
import java.math.*;
import java.util.*;
class Main extends MyUtil{
// public static ArrayList<ArrayList<Integer>> g;
public static Graph g;
public static void main(String[] args) throws Exception{
int n = readInt();
int[] a = readIntMap();
int count = 0;
... | Main.java:5: error: cannot find symbol
class Main extends MyUtil{
^
symbol: class MyUtil
Main.java:7: error: cannot find symbol
public static Graph g;
^
symbol: class Graph
location: class Main
Main.java:10: error: cannot find symbol
int n = readInt();
... |
s478220281 | p02259 | Java | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args) {
int narabi =0;
int count =0;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int [] array = new int[n];
for(int i=0; i<n; i++){
array[i] = sc.n... | Main.java:28: error: empty character literal
System.out.print(number + '');
^
1 error
|
s059007240 | p02259 | Java |
import java.util.Scanner;
public class bubbleSort {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
int sortLong=input.nextInt();
int[] sortNumber=new int[sortLong];
for(int i=0;i<sortLong;i++)
sortNumber[i]=input.nextInt();
int number=sort(sortNumber);
for(i... | Main.java:5: error: class bubbleSort is public, should be declared in a file named bubbleSort.java
public class bubbleSort {
^
1 error
|
s848094558 | p02259 | Java |
import java.util.Scanner;
public class bubbleSort {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
int sortLong=input.nextInt();
int[] sortNumber=new int[sortLong];
for(int i=0;i<sortLong;i++)
sortNumber[i]=input.nextInt();
int number=sort(sortNumber);
for(i... | Main.java:5: error: class bubbleSort is public, should be declared in a file named bubbleSort.java
public class bubbleSort {
^
1 error
|
s540610577 | p02259 | Java | import java.util.Scanner;
public class BubbleSort {
private static Scanner sc=new Scanner(System.in);
public static void main(String[] args){
int n=sc.nextInt();
int[] a=new int[n];
for(int i=0;i<n;i++) a[i]=sc.nextInt();
boolean flag=true;
int counter=0;
while(f... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s544748038 | p02259 | Java | import java.io.*;
class Main{
public static void main(String[] args)
{
BufferedReader br=new BufferedReader(new InputStreamReader(system.in));
int n=br.readLine();
int[] arr=new int[n];
String[] ip=br.readLine().split(" ");
for(int i=0;i<n;i++)
arr[i]=Integer.parseInt(ip[i]);
int swap=0;
for(int i=0;i<n-1;i++)
for(in... | Main.java:6: error: cannot find symbol
BufferedReader br=new BufferedReader(new InputStreamReader(system.in));
^
symbol: variable system
location: class Main
Main.java:7: error: incompatible types: String cannot be converted to int
int n=br.readLine();
... |
s172935533 | p02259 | Java | import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
int nums;
int cnt = 0;
int num1[];
num1 = new int[num];
for(int i=0; i<num; i++)
num1[i] = scan.nextInt();
for(int i=0; i<num; i... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s274399768 | p02259 | Java | import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
int nums;
int cnt = 0;
int num1[];
num1 = new int[num];
for(int i=0; i<num; i++)
num1[i] = scan.nextInt();
for(int i=0; i<num; i... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s531241271 | p02259 | Java | import java.io.*;
import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args)throws IOException{
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
int nums;
int cnt = 0;
int num1[];
num1 = new int[num];
for(int i=0; i<num; i++)
num1[i] = scan.n... | Main.java:4: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s931726432 | p02259 | Java | import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc =new Scanner(System.in);
int n = sc.nextInt();
int[] nums =new int[n];
bubbleSort(nums);
}
public static void bubbleSort(int[] A){
for(int i=0;i<N;i++){
for(int j=1;j<N-i;j++){
if(A[j]<A[j-1]){
int t = A[... | Main.java:10: error: cannot find symbol
for(int i=0;i<N;i++){
^
symbol: variable N
location: class Main
Main.java:11: error: cannot find symbol
for(int j=1;j<N-i;j++){
^
symbol: variable N
location: class Main
2 errors
|
s979022063 | p02259 | Java | import java.util.*;
public class BubbleSort{
static int count = 0 ;
public static void main(String args[]){
Scanner sc =new Scanner(System.in);
int n = sc.nextInt();
int[] nums =new int[n];
for(int i=0;i<n;i++){
nums[i] = sc.nextInt();
}
bubbleSort(nums);
for(int x:nums){
System.out.print(x+" ");... | Main.java:2: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort{
^
1 error
|
s598621734 | p02259 | Java | mport java.util.*;
public class Main {
public static void main(String args[]){
Scanner sc =new Scanner(System.in);
int n = sc.nextInt();
int[] nums = new int[n];
for(int i=0;i<n;i++){
nums[i] = sc.nextInt();
}
BubbleSort(nums);
}
public static void BubbleSort(int[] nums){
int swap_count =0;
... | Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
|
s894785107 | p02259 | Java | import java.util.Scanner;
import java.util.*;
public class BubbleSort {
public static void main(String[] args) {
Scanner stdin = new Scanner(System.in);
int n = stdin.nextInt();
int[] num = new int[100];
int cnt = 0;
for ( int i = 0; i < n; i++ ){
num[i] = stdin.nextInt();
}
int flag = 1;
while ( fla... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s861032407 | p02259 | Java | import java.util.Scanner;
import java.util.*;
public class BubbleSort {
public static void main(String[] args) {
Scanner stdin = new Scanner(System.in);
int n = stdin.nextInt();
int[] num = new int[100];
int cnt = 0;
for ( int i = 0; i < n; i++ ){
num[i] = stdin.nextInt();
}
int flag = 1;
while ( fla... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s645403753 | p02259 | Java | mport java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] nums = new int[n];
for(int arrayIndex = 0; arrayIndex < n; arrayIndex++) {
nums[arrayIndex] = sc.nextInt();
}
boolean flag = true;
int swapCount = 0;... | Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
|
s914847007 | p02259 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.Arrays;
class Main{
public static void main(String[] args)throws Exception{
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int[] numbers = new int[n];
int couont = 0;
int temp = ... | Main.java:15: error: cannot find symbol
while(frag == 1){
^
symbol: variable frag
location: class Main
Main.java:16: error: cannot find symbol
frag = 0;
^
symbol: variable frag
location: class Main
Main.java:18: error: incompatible types: int cannot be converted to boolean
if(numbers[i] ... |
s441781020 | p02259 | Java | import java.util.List;
class Main {
public static void main(String[] args) {
Input stdIn = new Input();
int n = stdIn.getValue();
List<Integer> values = stdIn.getLine();
bubbleSort(values, n);
stdIn.close();
}
public static void bubbleSort(List<Integer> values, int n) {
int count = 0;
for (in... | Main.java:7: error: cannot find symbol
Input stdIn = new Input();
^
symbol: class Input
location: class Main
Main.java:7: error: cannot find symbol
Input stdIn = new Input();
^
symbol: class Input
location: class Main
2 errors
|
s006140098 | p02259 | Java | import java.util.List;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public Main {
public static void main(String[] args) {
Input stdIn = new Input();
int n = stdIn.getValue();
List<Integer> values = stdIn.getL... | Main.java:9: error: class, interface, enum, or record expected
public Main {
^
Main.java:11: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:47: error: class, interfac... |
s100416296 | p02259 | Java | import java.util.Scanner;
public class Main {
// define variables & initialize
private static int cnt = 0; // how many bubbleSort is used
// sort method :: sort given array using insertion Sort
public static void sort(int[] _A, int _n) {
int flg = 1;
while (flg != 0) {
flg = 0;
for (int i = _n - 1; i ... | Main.java:53: error: cannot find symbol
_bubbleSort.sort(A, n);
^
symbol: variable _bubbleSort
location: class Main
Main.java:54: error: cannot find symbol
_bubbleSort.print(A);
^
symbol: variable _bubbleSort
location: class Main
Main.java:55: error: cannot find symbol
System.out.println(_bubbleSo... |
s997096012 | p02259 | Java | import java.util.Scanner;
public class Main {
// define variables & initialize
private static int cnt = 0; // how many bubbleSort is used
// sort method :: sort given array using insertion Sort
public static void sort(int[] _A, int _n) {
int flg = 1;
while (flg != 0) {
flg = 0;
for (int i = _n - 1; i ... | Main.java:55: error: cannot find symbol
System.out.println(_bubbleSort.get());
^
symbol: variable _bubbleSort
location: class Main
1 error
|
s019025299 | p02259 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner;
int num = sc.nextInt();
int[] array = new int[num];
for(int i = 0; i < num; i++){
array[i] = sc.nextInt();
}
int count = 0;
boolean flag... | Main.java:5: error: '(' or '[' expected
Scanner sc = new Scanner;
^
1 error
|
s467776893 | p02259 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc= new Scanner (System.in);
final int n = Integer.parseInt(sc.nextLine());
String[] s = sc.nextLine().split();
int[] num = new num[n];
int cnt=0;
for(int i=0;i<n;i++){
num[i]=Integer.parseInt(s[i]);
}
... | Main.java:9: error: no suitable method found for split(no arguments)
String[] s = sc.nextLine().split();
^
method String.split(String,int) is not applicable
(actual and formal argument lists differ in length)
method String.split(String,int,boolean) is not applicable
(ac... |
s268030148 | p02259 | Java | import java.io.*;
import java.util.Scanner;
public class BubbleSort{
public static void main(String[] args){
int N;
int num[];
String line;
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
try{
line=reader.readLine();
N=In... | Main.java:4: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort{
^
1 error
|
s074447835 | p02259 | Java | import java.io.*;
import java.util.Scanner;
public class BubbleSort{
public static void main(String[] args){
int N;
int num[];
String line;
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
try{
line=reader.readLine();
N=In... | Main.java:4: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort{
^
1 error
|
s519359712 | p02259 | Java | import java.io.*;
import java.util.Scanner;
public class BubbleSort{
public static void main(String[] args){
int N;
int num[];
String line;
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
try{
line=reader.readLine();
N=In... | Main.java:4: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort{
^
1 error
|
s755641075 | p02259 | Java | import java.util.Scanner;
public class practice{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int N=sc.nextInt();
int []array=new int[N];
for(int i=0;i<N;i++)array[i]=sc.nextInt();
int num=0;
for(int i=N;i>=1;i--){
for(int j=... | Main.java:2: error: class practice is public, should be declared in a file named practice.java
public class practice{
^
1 error
|
s382062083 | p02259 | Java | import java.io.*;
import java.util.Scanner;
public class BubbleSort{
public static void main(String[] args){
int N;
int num[];
String line;
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
try{
line=reader.readLine();
N=In... | Main.java:4: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort{
^
1 error
|
s126182791 | p02259 | Java | import java.util.Scanner;
public class practice{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int N=sc.nextInt();
int []array=new int[N];
for(int i=0;i<N;i++)array[i]=sc.nextInt();
int num=0;
for(int i=N;i>=1;i--){
for(int j=... | Main.java:2: error: class practice is public, should be declared in a file named practice.java
public class practice{
^
1 error
|
s004345187 | p02259 | Java | import java.util.Scanner;
public class BubbleSort{
public static void main(String[] args){
int N;
int num[];
String line;
Scanner scan=new Scanner(System.in);
line=scan.next();
N=Integer.parseInt(line);
if(N<1||100<N){
return;
}
... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort{
^
1 error
|
s240344858 | p02259 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int A[] = new int[N];
for(int i = 0; i < N; i++)
A[i] = sc.nextInt();
int count = 0;
int flag = 1;
... | Main.java:35: error: reached end of file while parsing
}
^
1 error
|
s431708902 | p02259 | Java | import java.io.*;
import java.util.List;
import java.util.StringTokenizer;
public class Graph {
int[] arr;
int size;
int swaps;
public static void main(String[] args)
{
Graph g = new Graph();
g.readArray();
g.bubbleSort();
g.printArray();
System.out.... | Main.java:5: error: class Graph is public, should be declared in a file named Graph.java
public class Graph {
^
1 error
|
s162451490 | p02259 | Java | import java.io.*;
import java.util.List;
import java.util.StringTokenizer;
public class Graph {
int[] arr;
int size;
int swaps;
public static void main(String[] args)
{
Graph g = new Graph();
g.readArray();
g.bubbleSort();
g.printArray();
System.out.... | Main.java:5: error: class Graph is public, should be declared in a file named Graph.java
public class Graph {
^
1 error
|
s274987481 | p02259 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
for(int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
int b = 1;
int count = 0;
boolean sort = true;
while(true) {
... | Main.java:31: error: package Sytem does not exist
Sytem.out.print(a[i] + " ");
^
1 error
|
s667346924 | p02259 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
for(int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
int b = 1;
int count = 0;
boolean sort = true;
while(true) {
... | Main.java:27: error: unreachable statement
for(int i = 0; i < n; i++) {
^
1 error
|
s110034617 | p02259 | Java | import java.util.*;
public class Launcher {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
for(int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
int b = 1;
int count = 0;
boolean sort = true;
while(sort... | Main.java:3: error: class Launcher is public, should be declared in a file named Launcher.java
public class Launcher {
^
1 error
|
s292753069 | p02259 | Java |
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
static int cnt = 0;
static PrintWriter out =new PrintWriter(System.out);
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int array[] = new int[n];
for(int i=0;i... | Main.java:27: error: cannot find symbol
for(int i=0;i<a.length();i++) {
^
symbol: method length()
location: variable a of type int[]
1 error
|
s031937492 | p02259 | Java | package icpc;
import java.io.PrintWriter;
import java.util.Scanner;
public class icpc {
static int cnt = 0;
static PrintWriter out =new PrintWriter(System.out);
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int array[] = new int[n];
... | Main.java:6: error: class icpc is public, should be declared in a file named icpc.java
public class icpc {
^
1 error
|
s147935096 | p02259 | Java | #include<stdio.h>
int main(){
int A[100], n, i, j, t, sw = 0;
scanf("%d", &n);
for ( i = 0; i < n; i++ ) scanf("%d", &A[i]);
for ( i = 0; i < n; i++ ){
for ( j = n-1; j >= i+1; j-- ){
if ( A[j] < A[j-1] ){
t = A[j]; A[j] = A[j-1]; A[j-1] = t;
sw++;
}
}
}
for ( i = 0; i < n; i++ ){
... | Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
^
Main.java:6: error: class, interface, enum, or record expected
scanf("%d", &n);
^
Main.java:7: error: class, interface, enum, or record expected
for ( i = 0; i ... |
s180262484 | p02259 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Scanner;
import java.util.ArrayDeque;
import java.util.Deque;
public class pr_2_A_bubble_sort {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputSt... | Main.java:9: error: class pr_2_A_bubble_sort is public, should be declared in a file named pr_2_A_bubble_sort.java
public class pr_2_A_bubble_sort {
^
1 error
|
s123291713 | p02259 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Scanner;
import java.util.ArrayDeque;
import java.util.Deque;
public class pr_2_A_bubble_sort {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputSt... | Main.java:9: error: class pr_2_A_bubble_sort is public, should be declared in a file named pr_2_A_bubble_sort.java
public class pr_2_A_bubble_sort {
^
1 error
|
s922782064 | p02259 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Scanner;
import java.util.ArrayDeque;
import java.util.Deque;
public class pr_2_A_bubble_sort {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputSt... | Main.java:9: error: class pr_2_A_bubble_sort is public, should be declared in a file named pr_2_A_bubble_sort.java
public class pr_2_A_bubble_sort {
^
1 error
|
s418594577 | p02259 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Scanner;
import java.util.ArrayDeque;
import java.util.Deque;
public class _Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(Sy... | Main.java:9: error: class _Main is public, should be declared in a file named _Main.java
public class _Main {
^
1 error
|
s202640935 | p02259 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Scanner;
import java.util.ArrayDeque;
import java.util.Deque;
public class main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(Sys... | Main.java:9: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s075977333 | p02259 | Java | package ex2;
import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s085810814 | p02259 | Java | import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i+... | Main.java:2: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s405834206 | p02259 | Java | import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i+... | Main.java:2: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s795858485 | p02259 | Java | package ex2;
import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s667583717 | p02259 | Java | public class Solution{
public static void main(String[] ar){
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i++){
for(j=0;j<N-(i+1);j++){
if(A[j] > A[j+1]){
tm... | Main.java:1: error: class Solution is public, should be declared in a file named Solution.java
public class Solution{
^
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Solution
Main.java:4: error: cannot find symbol
Scanner sc = new ... |
s813785430 | p02259 | Java | import java.util.Scanner;
public class Solution{
public static void main(String[] ar){
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i++){
for(j=0;j<N-(i+1);j++){
... | Main.java:2: error: class Solution is public, should be declared in a file named Solution.java
public class Solution{
^
1 error
|
s884802101 | p02259 | Java | import java.util.*;
public class Solution{
public static void main(String[] ar){
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i++){
for(j=0;j<N-(i+1);j++){
if(A[j... | Main.java:2: error: class Solution is public, should be declared in a file named Solution.java
public class Solution{
^
1 error
|
s702147018 | p02259 | Java | import java.util.*;
public class Solution{
public static void main(String[] ar){
}
}
| Main.java:2: error: class Solution is public, should be declared in a file named Solution.java
public class Solution{
^
1 error
|
s059067839 | p02259 | Java | import java.util.*;
public static void main(String[] ar){
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i++){
for(j=0;j<N-(i+1);j++){
if(A[j] > A[j+1]){
tmp ... | Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] ar){
^
(use --enable-preview to enable unnamed classes)
1 error
|
s430452712 | p02259 | Java | import java.util.*;
public static class Solution{
public static void main(String[] ar){
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i++){
for(j=0;j<N-(i+1);j++){
... | Main.java:2: error: class Solution is public, should be declared in a file named Solution.java
public static class Solution{
^
1 error
|
s585465750 | p02259 | Java | import java.util.*;
public static class Solution {
public static void main(String[] ar){
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i++){
for(j=0;j<N-(i+1);j++){
... | Main.java:2: error: class Solution is public, should be declared in a file named Solution.java
public static class Solution {
^
1 error
|
s235936942 | p02259 | Java | import java.util.*;
public class Solution {
public static void main(String[] ar){
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i++){
for(j=0;j<N-(i+1);j++){
if(A[... | Main.java:2: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
^
1 error
|
s640257877 | p02259 | Java | package ex2;
import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s302821359 | p02259 | Java | package ex2;
import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public class BubbleSort {
^
1 error
|
s796804120 | p02259 | Java | package ex2;
import java.util.Scanner;
public static class BubbleSort {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0... | Main.java:3: error: class BubbleSort is public, should be declared in a file named BubbleSort.java
public static class BubbleSort {
^
1 error
|
s303836491 | p02259 | Java | import java.util.Scanner;
public class BubbleSort {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i+... | Main.java:35: error: class, interface, enum, or record expected
A[j+1] = tmp;
^
Main.java:36: error: class, interface, enum, or record expected
cnt++;
^
Main.java:37: error: class, interface, enum, or record expected
}
^
Main.java:41: error: class, interface, enum, or record expected
for(i... |
s643814462 | p02259 | Java | #include <stdio.h>
int main(){
int n, a[100], i, count=0, flag=1, b;
scanf("%d", &n);
for(i=0; i<n; i++){
scanf("%d", &a[i]);
}
while(flag==1){
flag=0;
for(i=n-1; i>0; i--){
if(a[i]<a[i-1]){
b=a[i];
a[i]=a[i-1];
a[i-1]=b;
count++;
flag=1;
}
}
}
for(i=0; i<n-1; i++){
... | Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:5: error: class, interface, enum, or record expected
scanf("%d", &n);
^
Main.java:6: error: class, interface, enum, or record expected
for(i=0; i<n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.