submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s284469232
p02260
C++
int main(){ int n,i,j,k=0,kaunt=0,minj;//k=hozon int A[N]; scanf("%d",&n); for(i =0;i<n;i++)scanf("%d",&A[i]); for(i=0;i<n;i++){ minj = i; for(j=i;j<=n-1;j++){ if(A[j]<A[minj])minj=j; } k=A[i]; A[i]=A[minj]; A[minj]=k; kaunt++; if(minj==i)kaunt--; } trace(A,n)...
a.cc: In function 'int main()': a.cc:3:9: error: 'N' was not declared in this scope 3 | int A[N]; | ^ a.cc:5:3: error: 'scanf' was not declared in this scope 5 | scanf("%d",&n); | ^~~~~ a.cc:6:32: error: 'A' was not declared in this scope 6 | for(i =0;i<n;i++)scanf("%d",&A[i]); ...
s591199072
p02260
C++
int selectSort(int A[], int N){ int i,j,t,sw =0,minj; for (i=0;i<N-1;i++){ minj =i; for (j=i; j<N; j++){ if(A[j]<A[minj]) minj = j; } t = A[i];A[i]=A[minj];A[minj]=t; if(i != minj ) sw++; } return sw; } int main(){ int A[100],N,i,sw; scanf("%d", &N); for (i=0; i<N;i++) scanf("...
a.cc: In function 'int main()': a.cc:16:3: error: 'scanf' was not declared in this scope 16 | scanf("%d", &N); | ^~~~~ a.cc:22:14: error: 'printf' was not declared in this scope 22 | if (i>0) printf(" "); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is p...
s131927134
p02260
C++
#include <iostream> using namespace std; int bubbleSort(int A[],int N) { int sw = 0; bool flag = 1; while(int i=0; flag; i++) { flag = 0; for(int j=N-1;j>=i+1;j--) { if(A[j]<A[j-1]) { swap(A[j],A[j-1]); flag = 1; sw++; } } } return sw; } int main(void) { int A[100], N, sw; cin >> N; f...
a.cc: In function 'int bubbleSort(int*, int)': a.cc:7:22: error: expected ')' before ';' token 7 | while(int i=0; flag; i++) { | ~ ^ | ) a.cc:7:30: error: 'i' was not declared in this scope 7 | while(int i=0; flag; i++) { | ...
s742289979
p02260
C++
/** * ??????????????? ?????????????????????????¨??????????????????§?????????????°????????????????????????????????????´???????????¢?????´???????????§?????? 1 selectionSort(A, N) // N??????????´??????????0-?????????????????????A 2 for i ??? 0 ?????? N-1 ?????§ 3 minj = i 4 for j ??? i ?????? N-1 ?????§ 5 ...
a.cc: In function 'void printVector(const std::vector<short unsigned int>&)': a.cc:72:18: error: 'ostream_iterator' is not a member of 'std' 72 | std::ostream_iterator<unsigned short>(oss, " ")); | ^~~~~~~~~~~~~~~~ a.cc:49:1: note: 'std::ostream_iterator' is defined in header '<ite...
s703735779
p02260
C++
#include<iostream> #include<algorithm> static const int N = 10000; using namespace std; int a[N]; int main() { int n; cin >> n; for (int i =0;i<n;i++){ cin >> a[i]; } int cnt=0; int minj = 0; for (int i=0;i<n;i++){ int minj = i; for (int j=i;j<n;j++){ if (a[j] < a[minj]){ ...
a.cc: In function 'int main()': a.cc:38:2: error: expected '}' at end of input 38 | } | ^ a.cc:8:12: note: to match this '{' 8 | int main() { | ^
s649480641
p02260
C++
#include <stdio.h> #include <iostream> #include <utility> using namespace std; int sort(int a[], int n); int main(void) { int n, a[100]; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; int num = sort(a, n); for (int i = 0; i < n; i++) { cout << a[i]; if (i < n - 1) cout << " "; else cout << endl; ...
a.cc: In function 'int sort(int*, int)': a.cc:36:24: error: 'j' was not declared in this scope 36 | swap(a[j], a[minj]); | ^
s462805650
p02260
C++
#include<iostream> using namespace std; int main(){ int N; cin>>N; int A[N]; for(int i=0;i<N;i++) cin>>A[i]; int minj; int sw=0; for(int i=0;i<N;i++){ minj=i; int 6 temp=A[i]; for(int j=i;j<N;j++){ if(A[j]<A[minj]){ swap(A[minj],A[j]); ;} if(temp!=A[i]) sw++; } ...
a.cc: In function 'int main()': a.cc:15:8: error: expected unqualified-id before numeric constant 15 | int 6 | ^ a.cc:21:10: error: 'temp' was not declared in this scope; did you mean 'tm'? 21 | if(temp!=A[i]) sw++; | ^~~~ | tm
s699015521
p02260
C++
#include<stdio.h> int selectionSort(int A[],int N){ int i,j,t,sw=0,minj; for(i=0;i<N-1;i++){ minj=i; for(j=i;j<N;j++){ if(A[j]<A[minj]){ minj=j; } t=A[i];A[i]=A[minj];A[minj]=t; if(i!=minj)sw++; } return sw; } int main(){ int A[100],N,i,sw; scanf("%d",&N); for(i=0;i<N;i++) scanf("%d",&A[i]); sw=selectionSort(A,N); fo...
a.cc: In function 'int selectionSort(int*, int)': a.cc:17:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 17 | int main(){ | ^~ a.cc:17:9: note: remove parentheses to default-initialize a variable 17 | int main(){ | ^~ | -- a.cc...
s692054015
p02260
C++
#include<stdio.h> int selectionSort(int A[],int N){ int i,j,t,sw=0,minj; for(i=0;i<N-1;i++){ minj=i; for(j=i;j<N;j++){ if(A[j]<A[minj]){ minj=j; } t=A[i];A[i]=A[minj];A[minj]=t; if(i!=minj)sw++; } return sw; } int main(){ int A[100],N,i,sw; scanf("%d",&N); for(i=0;i<N;i++) scanf("%d",&A[i]); sw=selectionSort(A,N); fo...
a.cc: In function 'int selectionSort(int*, int)': a.cc:17:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 17 | int main(){ | ^~ a.cc:17:9: note: remove parentheses to default-initialize a variable 17 | int main(){ | ^~ | -- a.cc...
s358719204
p02260
C++
""" 1 selectionSort(A, N) // N??????????´??????????0-?????????????????????A 2 for i ??? 0 ?????? N-1 ?????§ 3 minj = i 4 for j ??? i ?????? N-1 ?????§ 5 if A[j] < A[minj] 6 minj = j 7 A[i] ??¨ A[minj] ????????? """ def sort(A,N): count=0 for i in range(N-1): minj=i f...
a.cc:1:3: warning: missing terminating " character 1 | """ | ^ a.cc:1:3: error: missing terminating " character a.cc:3:33: error: extended character § is not valid in an identifier 3 | 2 for i ??? 0 ?????? N-1 ?????§ | ^ a.cc:5:35: error: extended character § is n...
s581578692
p02260
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,ans; cin>>n; vector<int> a(n); for(int i=0;i<n;i++) cin>>a[i]; //n?????\??? for(int i=0;i<n;i++){ int m=i; for(int j=i+1;j<n;j++){ if(a[j]<a[m]) m=j; } if(m!=i) ans++ sw...
a.cc: In function 'int main()': a.cc:17:23: error: expected ';' before 'swap' 17 | if(m!=i) ans++ | ^ | ; 18 | swap(a[m],a[i]); | ~~~~
s590042031
p02260
C++
#include<iostream> using namespace std; int main(){ int b=0,n,i,minj,swap; int a[100]; cin>>n; for(i=0;i<n;i++){ cin>>a[i]; } if(n>1){ for(i=0;i<n-1;i++){ minj=i+1; for(j=i+1;j<n;j++){ if(a[minj]>a[j]){ ...
a.cc: In function 'int main()': a.cc:14:17: error: 'j' was not declared in this scope 14 | for(j=i+1;j<n;j++){ | ^
s019808915
p02260
C++
include<iostream> using namespace std; int main(){ int b=0,n,i,minj,j,swap; int a[100]; cin>>n; for(i=0;i<n;i++){ cin>>a[i]; } if(n>1){ for(i=0;i<n-1;i++){ minj=i+1; for(j=i+1;j<n;j++){ if(a[minj]>a[j]){ ...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin>>n; | ^~~ a.cc:33:9: error: 'cout' was not declared in this scope 33 | cout<<a[0]<<endl; | ^~...
s114968971
p02260
C++
#include<stdio.h> int selectionSort(int A[],int N){ int i,j,t,sw=0,minj; for(i=0;i<N-1;i++){ minj=i; for(j=i;j<N;j++){ if(A[j]<A[minj])minj=j; } t=A[i];A[i]=A[minj];A[min]=t; if(i!=minj)sw++; } return sw; } int main(){ int A[100],N,i,sw; scanf("%d",&N); for(i=0;i<N;i++){ i...
a.cc: In function 'int selectionSort(int*, int)': a.cc:10:27: error: 'min' was not declared in this scope; did you mean 'minj'? 10 | t=A[i];A[i]=A[minj];A[min]=t; | ^~~ | minj
s692977966
p02260
C++
#include<bits/stdc++.h> int selectionSort(int A[],int N){ int i,j,t,sw=0,minj; for(i=0;i<N-1;i++){ minj=i; for(j=i;j<N;j++){ if(A[j]<A[minj])minj=j; } t=A[i];A[i]=A[minj];A[min]=t; if(i!=minj)sw++; } return sw; } int main(){ int A[100],N,i,sw; scanf("%d",&N); for(i=0;i<N;i++){...
a.cc: In function 'int selectionSort(int*, int)': a.cc:10:27: error: 'min' was not declared in this scope; did you mean 'std::min'? 10 | t=A[i];A[i]=A[minj];A[min]=t; | ^~~ | std::min In file included from /usr/include/c++/14/algorithm:61, ...
s806302161
p02260
C++
#include<bits/stdc++.h> using namespace std; int selectionSort(int A[],int N){ int i,j,t,sw=0,minj; for(i=0;i<N-1;i++){ minj=i; for(j=i;j<N;j++){ if(A[j]<A[minj])minj=j; } t=A[i];A[i]=A[minj];A[min]=t; if(i!=minj)sw++; } return sw; } int main(){ int A[100],N,i,sw; scanf("%d",&N);...
a.cc: In function 'int selectionSort(int*, int)': a.cc:10:26: error: invalid types 'int*[<unresolved overloaded function type>]' for array subscript 10 | t=A[i];A[i]=A[minj];A[min]=t; | ^
s453249809
p02260
C++
#include<stdio.h> int selectionSort(int A[],int N){ int i,j,t,sw=0,minj; for(i=0;i<N-1;i++){ minj=i; for(j=i;j<N;j++){ if(A[j]<A[minj])minj=j; } t=A[i];A[i]=A[minj];A[minj]=t; if(i!=minj)sw++; } return sw; } int main(){ int A[100],N,i,sw; scanf("%d",&N); for(i=0;i<N;i++)scanf(...
a.cc: In function 'int main()': a.cc:20:35: error: expected ')' before ';' token 20 | for(i=0;i<N;i++)scanf("%d",&A[i];); | ~ ^ | ) a.cc:20:36: error: expected primary-expression before ')' token 20 | for(i=0;i<N;i++)scanf("%d",&A[i...
s441272810
p02260
C++
#include<iostream> using namespace std; int selectionSort (int A[], int n) { int i, j, v, count = 0, minj; for (i = 0; i < n) { minj = i; for (j = i; j < n; j++) { if (A[j] < A[minj]) { minj = j; } } if (i != minj) { ...
a.cc: In function 'int selectionSort(int*, int)': a.cc:9:22: error: expected ';' before ')' token 9 | for (i = 0; i < n) { | ^ | ;
s071261989
p02260
C++
int SelectionSort(int a[],int n) { int times=0,minj,j; for(int i=0;i<n;i++) { minj=i; for(j=i;j<n;j++) if(a[j]<a[minj]) minj=j; if(minj!=i) { swap(a[minj],a[i]); times++; } } return times; } int main() { int a[100]; int n; cin>>n; for(int i=0;i<n;i++) cin>>a[i]; i...
a.cc: In function 'int SelectionSort(int*, int)': a.cc:12:25: error: 'swap' was not declared in this scope 12 | swap(a[minj],a[i]); | ^~~~ a.cc: In function 'int main()': a.cc:22:5: error: 'cin' was not declared in this scope 22 | cin>>n; | ^~~ a...
s748427369
p02260
C++
#include <stdlib.h> #include <stdio.h> int main(){ int m,y,x,n,i,j,k,a[100]; m=0; scanf("%d,%n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } for(i=0;i<n;i++){ for(j=i;j<n;j++){ x=a[j]; for(k=i;k<n;k++){ if(x>a[k]){ y=x; x=a[k]; a[k]=y; m++; ...
a.cc:7:7: warning: missing terminating " character 7 | scanf("%d,%n); | ^ a.cc:7:7: error: missing terminating " character 7 | scanf("%d,%n); | ^~~~~~~~ a.cc:27:11: warning: missing terminating " character 27 | printf("%d\n%d\n,a[n-1],m); | ^ a.cc:27:11: error: miss...
s705870206
p02260
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; vector<int> v; for(int i=0; i<N; i++){ int a; cin >> a; v.push_back(a); } int cnt = 0; for(int i = 0; i <= N-1; i++){ int minV = i; for(int j = i; j <= N-1; j++){ if(v[j] < v[mi...
a.cc: In function 'int main()': a.cc:18:26: error: expected ';' before 'swap' 18 | if(v[i] > v[minV] | ^ | ; 19 | swap(v[i], v[minV]); | ~~~~ a.cc:20:17: error: expected ')' before ';' token 20 | ...
s245157023
p02260
C++
selectionSort(A, N){ int i, minj, j, t, c = 0; for(i = 0; i < N; i++){ ...
a.cc:1:14: error: expected constructor, destructor, or type conversion before '(' token 1 | selectionSort(A, N){ | ^
s525215011
p02260
C++
void selectionSort(A, N){ int i, minj, j, t, c = 0; for(i = 0; i < N; i++){ ...
a.cc:1:6: error: variable or field 'selectionSort' declared void 1 | void selectionSort(A, N){ | ^~~~~~~~~~~~~ a.cc:1:20: error: 'A' was not declared in this scope 1 | void selectionSort(A, N){ | ^ a.cc:1:23: error: 'N' was not declared in this scope 1 | void selectionSor...
s076876781
p02260
C++
Previous12345???NextFilterReset Username 1504054_nahid Prob Result Time (ms) Mem (MB) Lang Submit Time 1504054_nahid A Accepted 68 1.7 C++ 26 days ago 1504054_nahid A Wrong Answer C++ 26 days ago 1504054_nahid E Wrong Answer C++ 27 days ago 1504054_nahid E Compilation error C++ 27 days ago 1504054_nahid G Accept...
a.cc:90:11: error: "|" is not a valid filename 90 | #11410813 | 1504054_nahid's solution for [Aizu-ALDS1_2_B] [Problem J] | ^ a.cc:1:1: error: 'Previous12345' does not name a type 1 | Previous12345???NextFilterReset | ^~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase...
s246945993
p02260
C++
#include<streamio> #include<algorithm> int selectionSort(int A[], int N) { int sw = 0; for ( int i = 0; i < N; i++){ minj = i; for ( int j = i; j < N - 1; j++){ if (A[j] < A[minj]) { minj = j; } } swap(A[minj], A[i]); sw++; } return sw; } int main() { int sw, N, A[100...
a.cc:1:9: fatal error: streamio: No such file or directory 1 | #include<streamio> | ^~~~~~~~~~ compilation terminated.
s479971220
p02260
C++
#include<iostream> #include<algorithm> int selectionSort(int A[], int N) { int sw = 0; for ( int i = 0; i < N; i++){ minj = i; for ( int j = i; j < N - 1; j++){ if (A[j] < A[minj]) { minj = j; } } swap(A[minj], A[i]); sw++; } return sw; } int main() { int sw, N, A[1...
a.cc: In function 'int selectionSort(int*, int)': a.cc:7:5: error: 'minj' was not declared in this scope 7 | minj = i; | ^~~~ a.cc:13:5: error: 'swap' was not declared in this scope 13 | swap(A[minj], A[i]); | ^~~~ a.cc:13:5: note: suggested alternatives: In file included from /usr/in...
s270432369
p02260
C++
#include<streamio> #include<algorithm> int selectionSort(int A[], int N) { int sw = 0; for ( int i = 0; i < N; i++){ minj = i; for ( int j = i; j < N - 1; j++){ if (A[j] < A[minj]) { minj = j; } } std::swap(A[minj], A[i]); sw++; } return sw; } int main() { int sw, N...
a.cc:1:9: fatal error: streamio: No such file or directory 1 | #include<streamio> | ^~~~~~~~~~ compilation terminated.
s624079565
p02260
C++
#include<streamio> #include<algorithm> using namespace std; int selectionSort(int A[], int N) { int sw = 0; for ( int i = 0; i < N; i++){ minj = i; for ( int j = i; j < N - 1; j++){ if (A[j] < A[minj]) { minj = j; } } swap(A[minj], A[i]); sw++; } return sw; } int m...
a.cc:1:9: fatal error: streamio: No such file or directory 1 | #include<streamio> | ^~~~~~~~~~ compilation terminated.
s703192725
p02260
C++
#include<iostream> using namespace std; int selectionSort(int A[], int N) { int sw = 0; for ( int i = 0; i < N; i++){ minj = i; for ( int j = i; j < N - 1; j++){ if (A[j] < A[minj]) { minj = j; } } swap(A[minj], A[i]); sw++; } return sw; } int main() { int sw,...
a.cc: In function 'int selectionSort(int*, int)': a.cc:8:5: error: 'minj' was not declared in this scope 8 | minj = i; | ^~~~
s582851110
p02260
C++
#include <iostream> int main() { const int ARRAY_SIZE = 100; int a[ARRAY_SIZE]; int n; int count = 0; std::cin >> n; for (int i = 0;i < n;i++) { std::cin >> a[i]; } for (int i = 0;i < n;i++) { int min_index = i; for (int j = i + 1;j < n;j++) { if (a[j] < a[min_index]) { min_...
a.cc:33:5: error: stray '`' in program 33 | Try `python -h' for more information. | ^ a.cc:33:15: warning: missing terminating ' character 33 | Try `python -h' for more information. | ^ a.cc:33:15: error: missing terminating ' character 33 | Try `python -h' for more information. ...
s755612014
p02260
C++
#include<iostream> #include<algorithm> using namespace std; void selectionSort() { int A[100]; int N; cin >> N; for (int i = 0; i < N; i++) { cin >> A[i]; } int ans = 0; for (int i = 0; i < N; i++) { int m = i; for (int j = i + 1; j < N; j++) { ...
a.cc: In function 'void selectionSort()': a.cc:30:24: error: expected ';' before 'ans' 30 | A[m] = temp | ^ | ; 31 | ans++; | ~~~
s807809933
p02260
C++
#include<iostream> #include<algorithm> //using namespace std; void selectionSort() { int A[100]; int N; cin >> N; for (int i = 0; i < N; i++) { cin >> A[i]; } int ans = 0; for (int i = 0; i < N; i++) { int m = i; for (int j = i + 1; j < N; j++) { ...
a.cc: In function 'void selectionSort()': a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8 | cin >> N; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; //...
s897334260
p02260
C++
void SelectionSort(int A[], int n) { int min, i, j; for (i = 0; i < n-1; i++) { min = i; for (j = i + 1; j < n; j++) if (A[min] > A[j]) min = j; if (min != i) swap(A[min], A[i]); } }
a.cc: In function 'void SelectionSort(int*, int)': a.cc:10:25: error: 'swap' was not declared in this scope 10 | swap(A[min], A[i]); | ^~~~
s278602903
p02260
C++
void SelectionSort(int A[], int n) { int min, i, j; for (i = 0; i < n-1; i++) { min = i; for (j = i + 1; j < n; j++) if (A[min] > A[j]) min = j; if (min != i) swap(A[min], A[i]); } }
a.cc: In function 'void SelectionSort(int*, int)': a.cc:10:25: error: 'swap' was not declared in this scope 10 | swap(A[min], A[i]); | ^~~~
s298024778
p02260
C++
#include <stdio.h> #define rep(i, n) for(int i = 0; i < n; ++i) #define repi(i, n, a) for(int i = a; i < n; ++i) int main(void) { int n, i, j, ans = 0; scanf("%d", &n); int a[n]; rep(i, n) scanf("%d", &a[i]); int flag = 1; rep(i, n) { int minj = i, t; repi(j, n, i) if(a[j] < a[minj] minj = j; t...
a.cc: In function 'int main()': a.cc:13:36: error: expected ';' before 'minj' 13 | repi(j, n, i) if(a[j] < a[minj] minj = j; | ^~~~~ | ; a.cc:14:42: error: expected ')' before ';' token 14 | t = a[i], a[i] = a[minj], a[minj]...
s493167727
p02260
C++
#include <iostream> using namespace std; const int MAX = 100; int main() { int n, mini, temp, count=0; int A[MAX]; cin >> n; for(int i = 0; i < n; i++) { cin >> A[i]; } for(int i = 0; i < n; i++) { mini = i; for(int j = i+1; i < n; j++) { if(A[mini] > A[j]) mini = i; } if(i != mini) { ...
a.cc: In function 'int main()': a.cc:35:36: error: expected ';' before '}' token 35 | cout << A[i] << ' ' | ^ | ; 36 | } | ~ a.cc:38:24: error: invalid operands of typ...
s266380604
p02260
C++
#include <iostream> using namespace std; const int MAX = 100; int main() { int n, mini, temp, count=0; int A[MAX]; cin >> n; for(int i = 0; i < n; i++) { cin >> A[i]; } for(int i = 0; i < n; i++) { mini = i; for(int j = i+1; i < n; j++) { if(A[mini] > A[j]) mini = i; } if(i != mini) { ...
a.cc: In function 'int main()': a.cc:38:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 38 | count << count << endl; | ~~~~~~~~~~~~~~~^~~~~~~
s669692655
p02260
C++
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String args[]) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String ns = br.readLine(); int n = Integer.parseInt(ns); String as = br.readLine(); Stri...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.InputStreamReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available wit...
s634141829
p02260
C++
import java.util.Scanner; public class Main { public static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int i, j, k; int n = sc.nextInt(); int a[] = new int[n]; for(i = 0; i < n; i++){ a[i] = sc.nextInt(); } selectionsort(n, a); } public static void selectionso...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s098071774
p02260
C++
#include<stdio.h> int selectionSort(int A[], int N){ int minj; int sw = 0; for ( i = 0; i < N; i++) { minj = i; for ( j = i; j < N; j++) { if (A[j] < A[minj]) { minj = j; } sw++; return sw; } int main(){ int A[100], N, i, sw; scanf("%d", &N); for ( i = 0; i < N; i++) sca...
a.cc: In function 'int selectionSort(int*, int)': a.cc:6:9: error: 'i' was not declared in this scope 6 | for ( i = 0; i < N; i++) { | ^ a.cc:8:11: error: 'j' was not declared in this scope 8 | for ( j = i; j < N; j++) { | ^ a.cc:16:9: warning: empty parentheses were disambig...
s798264018
p02260
C++
#include<stdio.h> int selectionSort(int A[], int N){ int minj; int sw = 0; for ( i = 0; i < N; i++) { minj = i; for ( j = i; j < N; j++) { if (A[j] < A[minj]) { minj = j; } sw++; return sw; } int main(){ int A[100], N, i, sw; scanf("%d", &N); for ( i = 0; i < N; i++) sca...
a.cc: In function 'int selectionSort(int*, int)': a.cc:6:9: error: 'i' was not declared in this scope 6 | for ( i = 0; i < N; i++) { | ^ a.cc:8:11: error: 'j' was not declared in this scope 8 | for ( j = i; j < N; j++) { | ^ a.cc:16:9: warning: empty parentheses were disambig...
s531059278
p02260
C++
#include<stdio.h> int selectionSort(int A[], int N){ int minj; int sw = 0; for ( i = 0; i < N; i++) { minj = i; for ( j = i; j < N; j++) { if (A[j] < A[minj]) { minj = j; } } sw++; } return sw; } int main(){ int A[100], N, i, sw; scanf("%d", &N); for ( i = 0; i < N...
a.cc: In function 'int selectionSort(int*, int)': a.cc:6:9: error: 'i' was not declared in this scope 6 | for ( i = 0; i < N; i++) { | ^ a.cc:8:11: error: 'j' was not declared in this scope 8 | for ( j = i; j < N; j++) { | ^
s610668290
p02260
C++
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define EACH(i, c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define SORT(c) sort((c).begin(), (c).end()) #define CLR(a) memset((a), 0, sizeof(...
a.cc: In function 'int selection_Sort(int*, int)': a.cc:41:9: error: expected unqualified-id before '=' token 41 | int = 0; | ^ a.cc:49:9: error: 't' was not declared in this scope 49 | t = a[i]; | ^ a.cc: In function 'int main()': a.cc:79:29: error: 'v' was not declared in...
s692712513
p02260
C++
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define EACH(i, c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define SORT(c) sort((c).begin(), (c).end()) #define CLR(a) memset((a), 0, sizeof(...
a.cc:25:1: error: ISO C++ forbids declaration of 'printVec' with no type [-fpermissive] 25 | printVec(vector<int> v, int n) | ^~~~~~~~ a.cc: In function 'int printVec(std::vector<int>, int)': a.cc:33:1: warning: no return statement in function returning non-void [-Wreturn-type] 33 | } | ^ a.cc: At glo...
s842283405
p02260
C++
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define EACH(i, c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define SORT(c) sort((c).begin(), (c).end()) #define CLR(a) memset((a), 0, sizeof(...
a.cc: In function 'int main()': a.cc:61:12: error: 'n' was not declared in this scope; did you mean 'yn'? 61 | cin >> n; | ^ | yn
s619351184
p02260
C++
#include "stdafx.h" /***選択ソート***/ #include <stdio.h> int selectionSort(int A[],int N) { int counter = 0; for (int i = 0;i < N;i++) { int minj = i; for (int j = i;j < N;j++) { if (A[j] < A[minj]) minj = j; } if (!(i == minj)) { int dumy = A[i]; A[i] = A[minj]; A[minj] = dumy; counter++; } ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s775327905
p02260
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s667988423
p02260
C++
#include <stdio.h> int selectionSort(int *A, int N) { int count=0; for (int i=0; i<N; i++) { int minj = i; for (int j=i; j<N-1; j++) { if (A[j] < A[minj]) { minj = j; count++; } } int tmp = A[i]; A[i] = A[minj]; ...
a.cc: In function 'int main()': a.cc:37:5: error: 'outpurArray' was not declared in this scope; did you mean 'outputArray'? 37 | outpurArray(a, n); | ^~~~~~~~~~~ | outputArray
s048425684
p02260
C++
#include <stdio.h> int selectionSort(int *A, int N) { int count=0; for (int i=0; i<N; i++) { minj = i; for (int j=i; j<N; j++) { if (A[j] < A[minj]) { minj = j; } } int tmp = A[i]; A[i] = A[minj]; A[minj] = tmp; ...
a.cc: In function 'int selectionSort(int*, int)': a.cc:7:9: error: 'minj' was not declared in this scope 7 | minj = i; | ^~~~ a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type] 18 | } | ^
s045201878
p02260
C++
#include<stdio.h> int main(){ int A[100], n, i, j, t, sw = 0, mini; scanf("%d", &n); for ( i = 0; i < n; i++ ) scanf("%d", &A[i]); for ( i = 0; i < n; i++ ){ mini = i; for ( j = i; j < n; j++ ){ if ( A[j] < A[mini] ) mini = j; } t = A[i]; A[i] = A[mini]; A[mini] = t; if ( i != mini ...
a.cc: In function 'int main()': a.cc:23:18: error: 'sws' was not declared in this scope; did you mean 'sw'? 23 | printf("%d\n", sws); | ^~~ | sw
s090760349
p02260
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s932890042
p02260
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int a[100]={0},i,j,kaisu=0,num,mini; cin >>num; for(i=0;i<num;i++){ cin >>a[i]; } for(i=0 ; i<num-1;i++){ mini=i; for(j=i+1;j<num;j++){//num-1 if(a[j]<a[mini]){ mini=j; } } if(mini...
a.cc: In function 'int main()': a.cc:46:25: error: expected '}' at end of input 46 | cout<<kaisu<<endl; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s085007868
p02260
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int a[100]={0},i,j,kaisu=0,num,mini; cin >>num; for(i=0;i<num;i++){ cin >>a[i]; } for(i=0 ; i<num-1;i++){ mini=i; for(j=i+1;j<num;j++){//num-1 if(a[j]<a[mini]){ mini=j; } } if(mini...
a.cc: In function 'int main()': a.cc:46:25: error: expected '}' at end of input 46 | cout<<kaisu<<endl; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s241735051
p02260
C++
#include <bits/stdc++.h> using namespace std; void solve(int a[],int num) { int mini=0,tmp=0; for(int i=0;i<num;i++) { mini = i; for(int j=i;j<num;j++) if(a[j]<a[mini]) { mini=j; swap(a[i],a[mini]); tmp++; ...
a.cc: In function 'void solve(int*, int)': a.cc:5:14: error: unable to find numeric literal operator 'operator""\U0000ff0ctmp' 5 | int mini=0,tmp=0; | ^~~~~~ a.cc:14:17: error: 'tmp' was not declared in this scope; did you mean 'tm'? 14 | tmp++; | ^~~ ...
s003429934
p02260
C++
#include<stdio.h> int main(){ int N=0,i=0,j=0,count=0; int A[10000]; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d",&A[i]); } count=selsort(A,N); if(N>1){ for(i=0;i<N;i++){ if(i<N-1){ printf("%d ",A[i]); } if(i==N-1){ printf("%d",A[i]); } } printf("\n"); printf(...
a.cc: In function 'int main()': a.cc:9:9: error: 'selsort' was not declared in this scope; did you mean 'short'? 9 | count=selsort(A,N); | ^~~~~~~ | short
s617416549
p02260
C++
import java.util.Scanner; public class Main { public static void main (String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int minj = 0; int A[] = new int[N]; int count = 0; int tmp = 0; for(int i=0; i<N; i++){ A[i] = sc.nextInt(); } for(int i=0; i<N; i++){ minj ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s346296227
p02260
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s869310512
p02260
C++
import java.io.*; import java.util.*; class Main{ public static void main(String[] args) throws Exception{ int i=0,j=0; int tmp; int[] A; int Count_Sort = 0; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String N_str = br.readLine(); String A_str = br.readLine(); int N = In...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:11:...
s078549794
p02260
C++
#include<iostream> using namespace std; int selectionSort(int p[],int n){ int sw=0; int min=0; for(int i=0;i<n-1;++i){ min=i; for(int j=i+1;j<n;++j){ if(p[j]<p[min]) min=j; } if(min!=i){int t=p[i];p[i]=p[min];p[min]=t;sw++} } return 0; } int...
a.cc: In function 'int selectionSort(int*, int)': a.cc:12:56: error: expected ';' before '}' token 12 | if(min!=i){int t=p[i];p[i]=p[min];p[min]=t;sw++} | ^ | ;
s424923685
p02260
C++
#include<iostream> using namespace std; int selectionSort(int p[],int n){ int sw=0; int min=0; for(int i=0;i<n-1;++i){ min=i; for(int j=i+1;j<n;++j){ if(p[j]<p[min]) min=j; } if(min!=i){int t=p[i];p[i]=p[min];p[min]=t;sw++} } return sw; } in...
a.cc: In function 'int selectionSort(int*, int)': a.cc:12:56: error: expected ';' before '}' token 12 | if(min!=i){int t=p[i];p[i]=p[min];p[min]=t;sw++} | ^ | ;
s523791499
p02260
C++
#include<iostream> using namespace std; int selectionSort(int p[],int n){ int sw=0; int min=0; for(int i=0;i<n-1;++i){ min=i; for(int j=i+1;j<n;++j){ if(p[j]<p[min]) min=j; } if(min!=i){int t=p[i];p[i]=p[min];p[min]=t;sw++} } return sw; } in...
a.cc: In function 'int selectionSort(int*, int)': a.cc:12:56: error: expected ';' before '}' token 12 | if(min!=i){int t=p[i];p[i]=p[min];p[min]=t;sw++} | ^ | ;
s536669852
p02260
C++
#include<iostream> using namespace std; int selectionSort(int p[],int n){ int sw=0; int min=0; for(int i=0;i<n-1;++i){ min=i; for(int j=i+1;j<n;++j){ if(p[j]<p[min]) min=j; } if(min!=i){int t=p[i];p[i]=p[min];p[min]=t;sw++;} } return sw; } i...
a.cc: In function 'int main()': a.cc:26:11: error: 'sw' was not declared in this scope 26 | cout<<sw<<endl; | ^~
s225499156
p02260
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s488550872
p02260
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s555804623
p02261
Java
import java.util.*; public class Main { public static void main(String[] args) { int total; Scanner inp = new Scanner(System.in); total = inp.nextInt(); String[] b = new String[total]; String[] c = new String[total]; for (int k = 0; k < total; k++) { S...
Main.java:82: error: <identifier> expected System.out.println("\n"); ^ Main.java:82: error: illegal start of type System.out.println("\n"); ^ 2 errors
s337924388
p02261
Java
import java.util.*; public class StableSort { static class Card{ final String key; final int value; Card(String k, int v){ key = k; value = v; } @Override public String toString() { return key + value; } } privat...
Main.java:3: error: class StableSort is public, should be declared in a file named StableSort.java public class StableSort { ^ 1 error
s681723902
p02261
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); Card[] c1 = new Card[N]; for (int i = 0; i < N; i++) { c1[i] = new Card(); } for (int i = 0; i < N; i++) { String strC = sc.next(); char[] chrC = strC.toCharArray(); c1[i].se...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s970015039
p02261
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); Card[] c1 = new Card[N]; for (int i = 0; i < N; i++) { c1[i] = new Card(); } for (int i = 0; i < N; i++) { String strC = sc.next(); char[] chrC = strC.toCharArray(); c1[i].se...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s885569671
p02261
Java
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.Scanner; public class Main{ static PrintWriter out=new PrintWriter(System.out); static FastScanner sc=new FastScanner(); static Scanner std...
Main.java:12: error: ';' expected static Scanner stdIn=new Scanner(System.in) ^ 1 error
s917694444
p02261
Java
import java.io.*; import java.util.StringTokenizer; public class Test { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); StringTokenizer st = new StringToke...
Main.java:4: error: class Test is public, should be declared in a file named Test.java public class Test { ^ 1 error
s105818479
p02261
Java
import java.io.*; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); StringTokenizer st = new StringToke...
Main.java:83: error: reached end of file while parsing } ^ 1 error
s663005358
p02261
Java
import java.util.Scanner; public class Main { public static void main(String args[]) { String[] inputs = input(); String[] inputs = mockup(); String[] inputs4S = inputs.clone(); int swapCount = bubbleSort(inputs); output(inputs); System.out.println("stable"); ...
Main.java:8: error: variable inputs is already defined in method main(String[]) String[] inputs = mockup(); ^ 1 error
s872284461
p02261
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class ALDS1_2_C { public static void main(String[] args) throws Exception { BufferedReader breader = getReader(); int n = getInt(breader); String[] num = getAry(breader); int c = cardComp(num[0],num[1]); boolean stable = true; //dup...
Main.java:4: error: class ALDS1_2_C is public, should be declared in a file named ALDS1_2_C.java public class ALDS1_2_C { ^ 1 error
s336502129
p02261
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[] inArr = in.readLine().split(" "); String[] bArr = Sort.bubbleSort(inArr); ...
Main.java:1: error: ';' expected import java.io.* ^ 1 error
s090942394
p02261
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[] inArr = in.readLine().split(" "); String[] bArr = Sort.bubbleSort(inArr); ...
Main.java:28: error: class Sort is public, should be declared in a file named Sort.java public class Sort { ^ 1 error
s956640056
p02261
Java
import java.util.Arrays; import java.util.Scanner; import java.util.stream.Collectors; /** * @see <a href='http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?lang=jp&id='>??????</a> */ public class Main { private static Scanner in = new Scanner(); private static final String STABLE = "Stable"; private static f...
Main.java:9: error: no suitable constructor found for Scanner(no arguments) private static Scanner in = new Scanner(); ^ constructor Scanner.Scanner(Readable,Pattern) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Readable) i...
s357471283
p02261
Java
import java.util.Arrays; import java.util.Scanner; import java.util.stream.Collectors; /** * @see <a href='http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?lang=jp&id='>??????</a> */ public class Main { private static Scanner in = new Scanner(); private static final String STABLE = "Stable"; private static f...
Main.java:9: error: no suitable constructor found for Scanner(no arguments) private static Scanner in = new Scanner(); ^ constructor Scanner.Scanner(Readable,Pattern) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Readable) i...
s127694571
p02261
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main{ public static void main(String[] args)throws NumberFormatException,IOException{ int n,i,j,minj; InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); ...
Main.java:73: error: cannot find symbol if(!arr[i].equals(arr1[i])) bln = false; ^ symbol: variable bln location: class Main Main.java:76: error: cannot find symbol if(bln)System.out.println("Stable"); ^ symbol: variable bln location: class Main 2 errors
s356888347
p02261
Java
import java.util.Scanner; public class alds12c { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); String s; char[] ch; char[][] C = new char[2][n]; char[][] C2 = new char[2][n]; for(int i = 0; i < n; i++){ s = scan.next(); ch = s.to...
Main.java:3: error: class alds12c is public, should be declared in a file named alds12c.java public class alds12c { ^ 1 error
s340593539
p02261
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); int N; public static void main(String[] args){ N = scan.nextInt(); String[] cards = new String[N]; String[] copys = new String[N]; String[] ins = new String[N]; for(int i = 0; i < N; i++){ cards[i] = sc...
Main.java:9: error: non-static variable N cannot be referenced from a static context N = scan.nextInt(); ^ Main.java:10: error: non-static variable N cannot be referenced from a static context String[] cards = new String[N]; ^ Main.java:11: error: non-static variable N cannot be refe...
s506702810
p02261
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int N; public static void main(String[] args){ N = scan.nextInt(); String[] cards = new String[N]; String[] copys = new String[N]; String[] ins = new String[N]; for(int i = 0; i < N; i++){ cards[...
Main.java:22: error: cannot find symbol String sj = card[j].substring(1); ^ symbol: variable card location: class Main Main.java:24: error: cannot find symbol int vj = Interger.parseInt(sj); ^ symbol: variable Interger location: class Main Main.java:29: error: cannot fin...
s706059341
p02261
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int N; public static void main(String[] args){ N = scan.nextInt(); String[] cards = new String[N]; String[] copys = new String[N]; String[] ins = new String[N]; for(int i = 0; i < N; i++){ cards[...
Main.java:24: error: cannot find symbol int vj = Interger.parseInt(sj); ^ symbol: variable Interger location: class Main 1 error
s148091626
p02261
Java
public static void main(String[] args) { Scanner sc = new Scanner(System.in); sc.useDelimiter(System.getProperty("line.separator")); int n = sc.nextInt(); String data = sc.next(); //String???Int???????????? String[] datas = data.split(" "); Card[] cardsBubble = bubbleSort(...
Main.java:1: 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) 1 error
s907460815
p02261
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int N; //static?????´??°???public static???main?????????????????§???????????????????????? public static void main(String[] args){ N = scan.nextInt(); String[] cards = new String[N]; String[] copys = new...
Main.java:36: error: cannot find symbol System.out.printf("%s\n", Arrays.equals(ins, carsd)? "Stable" : "Not stable"); ^ symbol: variable carsd location: class Main 1 error
s228866848
p02261
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int N; //static?????´??°???public static???main?????????????????§???????????????????????? public static void main(String[] args){ N = scan.nextInt(); String[] cards = new String[N]; String[] copys = new...
Main.java:31: error: ';' expected int nwork = nary[j] ^ Main.java:41: error: ')' expected if(nary[i] > nary[i+1]{ ^ 2 errors
s415215385
p02261
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int N; //static?????´??°???public static???main?????????????????§???????????????????????? public static void main(String[] args){ N = scan.nextInt(); String[] cards = new String[N]; String[] copys = new...
Main.java:33: error: incompatible types: String cannot be converted to int nary[j-1] = work; ^ Main.java:39: error: cannot find symbol for(int i = 0; i < n-1; i++){ ^ symbol: variable n location: class Main Main.java:40: error: cannot find symbol if(cardComp(cards[i...
s971578451
p02261
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int N; //static?????´??°???public static???main?????????????????§???????????????????????? public static void main(String[] args){ N = scan.nextInt(); String[] cards = new String[N]; String[] copys = new...
Main.java:40: error: cannot find symbol if(cardComp(cards[i], card[i+1]) == 0){ ^ symbol: variable card location: class Main 1 error
s823340110
p02261
Java
package aoj; import java.util.*; public class StableSort { public static void main(String[] args){ Scanner input=new Scanner(System.in); int circle=input.nextInt(); char[][] arr=new char[circle][2]; char[][] arr1=new char[circle][2]; String[] afterArr=new String[circle]; String[] afterArr1=new String[circ...
Main.java:4: error: class StableSort is public, should be declared in a file named StableSort.java public class StableSort { ^ 1 error
s132693914
p02261
Java
import java.util.*; public class StableSort { public static void main(String[] args){ Scanner input=new Scanner(System.in); int circle=input.nextInt(); char[][] arr=new char[circle][2]; char[][] arr1=new char[circle][2]; String[] afterArr=new String[circle]; String[] afterArr1=new String[circle]; for(int...
Main.java:2: error: class StableSort is public, should be declared in a file named StableSort.java public class StableSort { ^ 1 error
s805262507
p02261
Java
import java.util.ArrayList; import java.util.List; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.List; class Main { public static void main(String[] args) { InputOutput stdIO = new InputOutput();...
Main.java:24: error: cannot find symbol ALDS1_2_C_Stable_Sort my = new ALDS1_2_C_Stable_Sort(); ^ symbol: class ALDS1_2_C_Stable_Sort location: class Main Main.java:24: error: cannot find symbol ALDS1_2_C_Stable_Sort my = new ALDS1_2_C_Stable_Sort(); ^ symbol: class ALDS...
s147971530
p02261
Java
import java.io.InputStreamReader; import java.util.Arrays; import java.io.BufferedReader; import java.io.IOException; public class Main { public static void main(String args[] ) throws IOException { BufferedReader br = new BufferedReader(new InputStream(System.in)); int N = Integer.parseInt(br.readLine()); ...
Main.java:8: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStream(System.in)); ^ symbol: class InputStream location: class Main 1 error
s693287536
p02261
Java
import java.util.*; public class Stable { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); Card[] a1 = new Card[N]; Card[] a2 = new Card[N]; for (int i = 0; i < N; i++) { Card c = new Card(sc.next()); ...
Main.java:3: error: class Stable is public, should be declared in a file named Stable.java public class Stable { ^ 1 error
s368007471
p02261
Java
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here Scanner scanner=new Scanner(System.in); int n=scanner.nextInt(); Card[] cards=new Card[n]; fo...
Main.java:109: error: reached end of file while parsing } ^ 1 error
s897458775
p02261
Java
import java.io.UnsupportedEncodingException; import java.util.Arrays; import java.util.Scanner; class Main { //enum宣言 public static enum cardMarkNum { //マークをアスキーコードで紐づけ S(83), H(72), C(67), D(68); private final int mark; private cardMarkNum(final int mark) { this.mark = mark; } ...
Main.java:89: error: cannot find symbol output(out, num); ^ symbol: method output(int[],int) location: class Main Main.java:134: error: cannot find symbol output(out, num); ^ symbol: method output(int[],int) location: class Main 2 errors
s546213801
p02261
Java
import java.io.UnsupportedEncodingException; import java.util.Arrays; import java.util.Scanner; class Main { //enum宣言 public static enum cardMarkNum { //マークをアスキーコードで紐づけ S(83), H(72), C(67), D(68); private final int mark; private cardMarkNum(final int mark) { this.mark = mark; } ...
Main.java:89: error: cannot find symbol output(out, num); ^ symbol: method output(int[],int) location: class Main Main.java:134: error: cannot find symbol output(out, num); ^ symbol: method output(int[],int) location: class Main 2 errors
s519802948
p02261
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.Scanner; import java.util.Deque; import java.util.ArrayDeque; public class pr_2_C_is_stable_sort { public static <E> void print_array(E[] arr){ int i=0; for(E element: arr){ System.out.print(element)...
Main.java:8: error: class pr_2_C_is_stable_sort is public, should be declared in a file named pr_2_C_is_stable_sort.java public class pr_2_C_is_stable_sort { ^ 1 error
s545359882
p02261
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[] inArr = in.readLine().split(" "); String[] bArr = Sort.bubbleSort(inArr); ...
Main.java:32: error: ';' expected for(int j = bArr.length-1; j > i, j--) { ^ 1 error
s640900105
p02261
Java
import java.util.Arrays; public class ALDS1_2_C { // field // method public static void main(String[] args) { //System.out.print("> "); java.util.Scanner scan = new java.util.Scanner(System.in); int arraySize = scan.nextInt(); String[] input = new String[arraySize]; Cards[] cardsArray = new Cards[arr...
Main.java:3: error: class ALDS1_2_C is public, should be declared in a file named ALDS1_2_C.java public class ALDS1_2_C { ^ 1 error
s143516402
p02261
C
#include <stdio.h> typedef struct { char mark; int value; } Card; void print(Card C[], int N) { int i; for (i = 0; i < N; i++) { printf("%c%d", C[i].mark, C[i].value); if (i != N-1) printf(" "); else printf("\n"); } } void BubbleSort(Card C[], int N...
main.c: In function 'BubbleSort': main.c:26:17: error: 'tmp' undeclared (first use in this function) 26 | tmp = C[j]; | ^~~ main.c:26:17: note: each undeclared identifier is reported only once for each function it appears in
s547601450
p02261
C
#include<stdio.h> #include<stdlib.h> #define NMIN 1 #define NMAX 36 struct Number{ char mark; char value; }; void bubble(struct Number A[],int N){ int i,j; struct Number t; for(i=0;i<N;i++){ for(j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ t=A[j]; A[j]=A[j-1]; A[j-1]=t; } } } } v...
main.c:85:2: error: stray '#' in program 85 | }#include<stdio.h> | ^ main.c:85:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 85 | }#include<stdio.h> | ^ main.c:97:6: error: redefinition of 'bubble' 97 | void bubble(struct Number A[],int N){ | ^~~~...