submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s829929705
p02261
C++
#include<iostream> #pragma warning(disable:4996) using namespace std; struct Card{char suit, value;}; void bubble(struct Card A[], int N){ for(int i=0; i<N; i++){ for(int j=N-1; j>=i+1; i++){ if( A[j].value < A[j-1].value ){ Card t = A[j]; A[j] = A[j-1]; A[j-1] = t; } } } } void selection(str...
a.cc: In function 'int main()': a.cc:60:34: error: expected primary-expression before ')' token 60 | if( isStable(C1, C2, N)) ){ | ^
s001610927
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; stuct Card{ char suit, value }; void BubbleSort(struct Card A[], n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1]){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } } } } ...
a.cc:5:1: error: 'stuct' does not name a type; did you mean 'struct'? 5 | stuct Card{ char suit, value }; | ^~~~~ | struct a.cc:7:34: error: 'n' has not been declared 7 | void BubbleSort(struct Card A[], n){ | ^ a.cc: In function 'void BubbleSort(Card*, int)': ...
s073791992
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; stuct Card{ char suit, value }; void BubbleSort(struct Card A[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1]){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } } } ...
a.cc:5:1: error: 'stuct' does not name a type; did you mean 'struct'? 5 | stuct Card{ char suit, value }; | ^~~~~ | struct a.cc: In function 'void BubbleSort(Card*, int)': a.cc:8:14: error: aggregate 'Card tmp' has incomplete type and cannot be defined 8 | Card tmp; | ^~~ ...
s197198380
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; struct Card{ char suit, value }; void BubbleSort(struct Card A[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1]){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } } }...
a.cc:5:25: error: expected ';' at end of member declaration 5 | struct Card{ char suit, value }; | ^~~~~ | ; a.cc: In function 'void BubbleSort(Card*, int)': a.cc:11:29: error: 'C' was not declared in this scope 11 | if (C[j...
s244026464
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; struct Card{ char suit, value }; void BubbleSort(struct Card C[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1]){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } } }...
a.cc:5:25: error: expected ';' at end of member declaration 5 | struct Card{ char suit, value }; | ^~~~~ | ; a.cc: In function 'void BubbleSort(Card*, int)': a.cc:11:40: error: no match for 'operator>' (operand types are 'char' and 'Card') 11 | ...
s689656809
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; struct Card{ char suit,int value }; void BubbleSort(struct Card C[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1]){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } }...
a.cc:5:24: error: expected unqualified-id before 'int' 5 | struct Card{ char suit,int value }; | ^~~ a.cc: In function 'void BubbleSort(Card*, int)': a.cc:11:34: error: 'struct Card' has no member named 'value' 11 | if (C[j].value > C[j - 1]){ | ...
s905095415
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; struct Card{ char suit, int value; }; void BubbleSort(struct Card C[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1]){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } ...
a.cc:5:25: error: expected unqualified-id before 'int' 5 | struct Card{ char suit, int value; }; | ^~~ a.cc: In function 'void BubbleSort(Card*, int)': a.cc:11:34: error: 'struct Card' has no member named 'value' 11 | if (C[j].value > C[j - 1]){ | ...
s229203612
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; struct Card{ char suit,value; }; void BubbleSort(struct Card C[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1]){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } } }...
a.cc: In function 'void BubbleSort(Card*, int)': a.cc:11:40: error: no match for 'operator>' (operand types are 'char' and 'Card') 11 | if (C[j].value > C[j - 1]){ | ~~~~~~~~~~ ^ ~~~~~~~~ | | | | ...
s152589994
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; struct Card{ char suit,value; }; void BubbleSort(struct Card C[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1].value){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } ...
a.cc: In function 'void SelectionSort(Card*, int)': a.cc:24:38: error: expected ';' before '}' token 24 | min=j | ^ | ; 25 | } | ~ ...
s961903143
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; struct Card{ char suit,value; }; void BubbleSort(struct Card C[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1].value){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } ...
a.cc: In function 'void SelectionSort(Card*, int)': a.cc:27:25: error: 'j' was not declared in this scope 27 | tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; | ^ a.cc: At global scope: a.cc:40:15: error: '<anonymous>' has incomplete type 40 | bool isStable(struct C1,str...
s658020868
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; struct Card{ char suit,value; }; void BubbleSort(struct Card C[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1].value){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } ...
a.cc:40:15: error: '<anonymous>' has incomplete type 40 | bool isStable(struct C1,struct C2,int n){ | ^~~~~~~~~ a.cc:40:22: note: forward declaration of 'struct C1' 40 | bool isStable(struct C1,struct C2,int n){ | ^~ a.cc:40:25: error: '<anonymous>' has incomplete ty...
s767634513
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; struct Card{ char suit,value; }; void BubbleSort(struct Card C[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1].value){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } ...
a.cc: In function 'bool isStable(C1*, C2*, int)': a.cc:42:23: error: expected unqualified-id before '[' token 42 | if (C1[i].suit != C2[i].suit)return false; | ^ a.cc: In function 'int main()': a.cc:62:22: error: cannot convert 'Card*' to 'C1*' 62 | if (isStable...
s365560349
p02261
C++
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; struct Card{ char suit,value; }; void BubbleSort(struct Card C[],int n){ Card tmp; for (int i = 0; i < n; i++){ for (int j = n - 1; j >= i; j--){ if (C[j].value > C[j - 1].value){ tmp = C[j]; C[j] = C[j - 1]; C[j - 1] = tmp; } ...
a.cc: In function 'bool isStable(C1*, C2*, int)': a.cc:42:23: error: expected unqualified-id before '[' token 42 | if (C1[i].suit != C2[i].suit){ | ^ a.cc: In function 'int main()': a.cc:64:22: error: cannot convert 'Card*' to 'C1*' 64 | if (isStable(C1, C2, n))...
s569308112
p02261
C++
???????????????????????????????????????????????????
a.cc:1:1: error: expected unqualified-id before '?' token 1 | ??????????????????????????????????????????????????? | ^
s999901608
p02261
C++
#Include <stdio.h> #include <stdbool.h> #include <string.h> typedef struct{ char c; int num; }pair; void bubblesort(pair* , int ); void selectionsort(pair* , int); //bool stable(pair*, pair* ,int ); int main(){ int e,n,i,j,temp,flag = 0; pair box[64]; pair in1[64]; pair in2[64]; char emp; scanf("%d...
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include? 1 | #Include <stdio.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:22:3: error: 'scanf' was not declared in this scope 22 | scanf("%d\n",&n); | ^~~~~ a.cc:23:3: error: 'printf' was not declared ...
s226245434
p02261
C++
#Include <stdio.h> #include <stdbool.h> #include <string.h> typedef struct{ char c; int num; }pair; void bubblesort(pair* , int ); void selectionsort(pair* , int); int main(){ int e,n,i,j,temp,flag = 0; pair box[64]; pair in1[64]; pair in2[64]; char emp; scanf("%d\n",&n); printf("n = %d\n",n); ...
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include? 1 | #Include <stdio.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:22:3: error: 'scanf' was not declared in this scope 22 | scanf("%d\n",&n); | ^~~~~ a.cc:23:3: error: 'printf' was not declared ...
s080093266
p02261
C++
#include <iostream> using namespace std; static const int MAX = 100; struct Card { char suit, value; }; void bubbleSort(struct Card A[], int N){ bool flag = true; for (int i = 0; flag; i++){ flag = false; for (int j = N - 1; j > i + 1; j--){ if (A[j].value < A[j - 1].value){ ...
a.cc: In function 'int main()': a.cc:58:59: error: request for member 'value' in 'C1', which is of non-class type 'Card [100]' 58 | for (int i = 0; i < num; i++) cin >> C1[i].suit >> C1.value; | ^~~~~ a.cc:68:30: error: expected ';' before '{' token...
s608582818
p02261
C++
#include<iostream> using namespace std; struct Card {char suit, value; }; void bubble{struct Card[A] , int N}{ for (int i = 0; i<N ;i++){ for (int j =N-1; j>= i +1; j--){ if(A[j].value <A[j-1].value){ Card t = A[j]; A[j] = A[j-1]; A[j-1] =t; } } } } void selection(struct Card A[] , in...
a.cc:5:6: error: variable or field 'bubble' declared void 5 | void bubble{struct Card[A] , int N}{ | ^~~~~~ a.cc:5:13: error: expected primary-expression before 'struct' 5 | void bubble{struct Card[A] , int N}{ | ^~~~~~ a.cc:5:13: error: expected '}' before 'struct' 5 | void bub...
s991012530
p02261
C++
#include<iostream> using namespace std; struct Card {char suit, value; }; void bubble (struct Card [A] , int N) { for (int i = 0; i<N ;i++){ for (int j =N-1; j>= i +1; j--){ if(A[j].value <A[j-1].value){ Card t = A[j]; A[j] = A[j-1]; A[j-1] =t; } } } } void selection(struct Card A[] ,...
a.cc:5:27: error: 'A' was not declared in this scope 5 | void bubble (struct Card [A] , int N) { | ^ a.cc: In function 'void bubble(...)': a.cc:8:10: error: 'A' was not declared in this scope 8 | if(A[j].value <A[j-1].value){ | ^
s279169607
p02261
C++
#include<iostream> using namespace std; struct Card {char suit, value; }; void bubble(struct Card [A] , int N) { for (int i = 0; i<N ;i++){ for (int j =N-1; j>= i +1; j--){ if(A[j].value <A[j-1].value){ Card t = A[j]; A[j] = A[j-1]; A[j-1] =t; } } } } void selection(struct Card A[] , ...
a.cc:5:26: error: 'A' was not declared in this scope 5 | void bubble(struct Card [A] , int N) { | ^ a.cc: In function 'void bubble(...)': a.cc:8:10: error: 'A' was not declared in this scope 8 | if(A[j].value <A[j-1].value){ | ^
s788491022
p02261
C++
#include<iostream> using namespace std; struct Card { char suit, value }; void bubble ( Card A[], int N ) { for ( int i = 0; i < N; i++) { for ( int j = N - 1; j >= i + 1 ; j--) { if ( A[j].value < A[j - 1].value ) { swap( A[j], A[j - 1] ) } } } } void selection( Card A[], int N) { for ( int i = 0;...
a.cc:4:26: error: expected ';' at end of member declaration 4 | struct Card { char suit, value }; | ^~~~~ | ; a.cc: In function 'void bubble(Card*, int)': a.cc:10:55: error: expected ';' before '}' token 10 | swap(...
s698184194
p02261
C++
#include<iostream> using namespace std; struct Card { char suit, value; }; void bubble( struct Card A[], int N) { for ( int i = 0; i < N; i++ ) { for (int j = N - 1; j >= i + 1; j-- ) { if (A[j].value < A[j - 1].value ) { Card t = A[j]; A[j] = A[j - 1]; A[j - 1] = t; } } } } void selection( struct Ca...
a.cc: In function 'int main()': a.cc:42:28: error: expected initializer before 'C2' 42 | Card C1[100], Card C2[100]; | ^~ a.cc:51:39: error: 'C2' was not declared in this scope; did you mean 'C1'? 51 | for ( int i = 0; i < N; i++ ) C2[i] = C1[i]; | ...
s169719460
p02261
C++
struct card{ int num; char mark; }; struct card card_i[40], card_j[40]; void BubbleSort(int n); void SelectionSort(int n); void write(int n); void stable(int n); int main(void){ int n, i, j; scanf("%d", &n); for(i = 0; i < n; i++){ scanf("%c", &card_i[i].mark); scanf("%d", &card_i[i].num); ca...
a.cc: In function 'int main()': a.cc:17:3: error: 'scanf' was not declared in this scope 17 | scanf("%d", &n); | ^~~~~ a.cc: In function 'void write(int)': a.cc:70:5: error: 'printf' was not declared in this scope 70 | printf("%c%d ", card_j[i].mark, card_j[i].num); | ^~~~~~ a.cc:1:1: note...
s341081231
p02261
C++
#include<iostReam> using namespace std; struct Card { char suit; int value; }; void bubble(struct Card A[],int N) { bool flag = 1; for ( int i = 0; flag; i++) { flag = 0; for (int j = N - 1; j > i; j--) { if (A[j].value < A[j-1].value) { swap(A[j],A[j-1]); flag = 1; } } } } void selection(...
a.cc:1:9: fatal error: iostReam: No such file or directory 1 | #include<iostReam> | ^~~~~~~~~~ compilation terminated.
s805345807
p02261
C++
#include<iostream> using namespace std; struct card{char suit,value;}; void bubble(struct card a[],int n){ for(int i=0;i<n;i++){ for(int j=n-1;j>=i;i++){ if(a[j].value<a[j-1].value){ card t=a[j];a[j]=a[j-1];a[j-1]=t; } } } } void selection(struct card a[],int n){ for(int i=0;i<n;i++){ int minj = i...
a.cc: In function 'void selection(card*, int)': a.cc:19:21: error: 'intj' was not declared in this scope; did you mean 'int'? 19 | for(intj=i;j<n;j++){ | ^~~~ | int a.cc:19:28: error: 'j' was not declared in this scope 19 | for(in...
s144514783
p02261
C++
#include <stdio.h> using namespace std; struct Card{char suit,value}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selection(struct Card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int ...
a.cc:4:23: error: expected ';' at end of member declaration 4 | struct Card{char suit,value}; | ^~~~~ | ; a.cc: In function 'void print(Card*, int)': a.cc:29:10: error: 'cout' was not declared in this scope 29 | if(i>0) cout <<" "; | ^~...
s174354421
p02261
C++
#include <stdio.h> using namespace std; struct Card{char suit,value}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selection(struct Card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int ...
a.cc:4:23: error: expected ';' at end of member declaration 4 | struct Card{char suit,value}; | ^~~~~ | ; a.cc: In function 'void print(Card*, int)': a.cc:29:10: error: 'cout' was not declared in this scope 29 | if(i>0) cout <<" "; | ^~...
s848681956
p02261
C++
#include <iostream> using namespace std; struct Card{char suit,value}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selection(struct Card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int...
a.cc:4:23: error: expected ';' at end of member declaration 4 | struct Card{char suit,value}; | ^~~~~ | ; a.cc: In function 'int main()': a.cc:59:1: error: 'else' without a previous 'if' 59 | else{ | ^~~~
s091699306
p02261
C++
#include <iostream> using namespace std; struct Card{char suit,value}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j]; A[j]=A[j-1]; A[j-1]=t; } } } } void selection(struct Card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for...
a.cc:4:23: error: expected ';' at end of member declaration 4 | struct Card{char suit,value}; | ^~~~~ | ; a.cc:59:1: error: expected unqualified-id before 'else' 59 | else{ | ^~~~ a.cc:63:1: error: expected unqualified-id before 'return' 63 | ...
s481728922
p02261
C++
#include<iostream> using namespace std; struct Card{ char suit, value; }; void bubble(struct Card A[], int N){ for(int i = 0; i < N; i++){ for(int j = N - 1; j >= i; j--){ if(A[j].value < A[j-i].value){ Card t = A[j]; A[j] = A[j - 1]; A[j - 1] = t; } } } } void selection(struct Card A[], int...
a.cc: In function 'bool isStable(Card*, Card2*, int)': a.cc:40:34: error: 'C2' was not declared in this scope; did you mean 'C1'? 40 | if(C1[i].suit != C2[i].suit)return false; | ^~ | C1 a.cc: In function 'int main()': a.cc...
s779980883
p02261
C++
include <cstdio> struct Card{ char suit, value; }; void bubble(struct Card A[], int N){ for (int i = 0; i < N; i++){ for (int j = N - 1; j > i; j--){ if (A[j].value < A[j - 1].value){ Card t = A[j]; A[j] = A[j - 1]; A[j - 1] = t; } } } } void select...
a.cc:2:1: error: 'include' does not name a type 2 | include <cstdio> | ^~~~~~~ a.cc: In function 'void bubble(Card*, int)': a.cc:9:20: error: invalid use of incomplete type 'struct Card' 9 | if (A[j].value < A[j - 1].value){ | ^ a.cc:6:20: note: forward declaration of ...
s810285495
p02261
C++
#include<iostream> using namespace std; struct Card{ char suit, value;}; void bubbleSort(struct Card A[], int N){ for (int i=0;i<N;i++){ for (int j =N-1; j>=i+1;j--){?\ if(A[j].value < A[j-1].value){ Card t =A[j];A[j] = A[j-1];A[j-1] =t; } } } } void selectionSort(struct Card A[],int ...
a.cc:24:42: error: stray '\' in program 24 | Card t=A[i];A[i]=A[minj];A[minj]=t;?\?§?\?§ | ^ a.cc:24:44: error: extended character § is not valid in an identifier 24 | Card t=A[i];A[i]=A[minj];A[minj]=t;?\?§?\?§ | ...
s759053687
p02261
C++
#include<iostream> using namespace std; struct Card{ char suit, value;}; void bubbleSort(struct Card A[], int N){ for (int i=0;i<N;i++){ for (int j =N-1; j>=i+1;j--){?\ if(A[j].value < A[j-1].value){ Card t =A[j];A[j] = A[j-1];A[j-1] =t; } } } } void selectionSort(struct Card A[],int ...
a.cc:24:42: error: stray '\' in program 24 | Card t=A[i];A[i]=A[minj];A[minj]=t;?\?§?\?§ | ^ a.cc:24:44: error: extended character § is not valid in an identifier 24 | Card t=A[i];A[i]=A[minj];A[minj]=t;?\?§?\?§ | ...
s331007393
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value;} void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selection(struct Card A[],int N){ for(int i=0;i<N;i++){ int minj=i; ...
a.cc:4:30: error: expected ';' after struct definition 4 | struct Card{char suit,value;} | ^ | ;
s209196893
p02261
C++
def ri(): return int(input()) def rli(): return list(map(int, input().split())) def rls(): return list(map(str, input().split())) def pl(a): print(" ".join(list(map(str, a)))) N = ri() a = rls() bubble = a[:] flag = True while(flag): flag = False for i in range(1, N): if(bubble[-i][1] < bubble[-i-1][...
a.cc:21:18: error: stray '#' in program 21 | print("Stable") # ?????????Stable | ^ a.cc:1:1: error: 'def' does not name a type 1 | def ri(): return int(input()) | ^~~
s731696306
p02261
C++
#include<iostream> using namespace std; struct Card{ char suit, value; } void bubble(struct Card A[], int N){ for( int i = 0; i < N; i++ ){ for( int j = N - 1; j >= i; j-- ){ if( A[j].value < A[j - 1].value ){ Card t = A[j]; A[j] = A[j - 1]; A[j - 1] = t; } } } } void selection(struct Card A...
a.cc:6:2: error: expected ';' after struct definition 6 | } | ^ | ; a.cc: In function 'void print(Card*, int)': a.cc:34:21: error: 'I' was not declared in this scope 34 | if( I > 0 ) cout << " "; | ^ a.cc:35:30: error: 'struct Card' has no member named 'sut...
s160605122
p02261
C++
#include<stdio.h> using namespace std; struct Card{char suit,value;}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selection(struct Card A[],int N){ for(int i=0;i<N;i++){ i...
a.cc: In function 'void print(Card*, int)': a.cc:28:13: error: 'cout' was not declared in this scope 28 | if(i>0) cout << " "; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<stdio.h> +++ |+#includ...
s858009566
p02261
C++
#include <iostream> #include <string> #define REP(i,n) for(int (i)=0;(i)<(n);(i)++) using namespace std; void bubble(int si[],char sc[],int N) { for(int i=0;i<N;i++) { for(int j=N-1;j>i;j--) { if(si[j]<si[j-1]) { swap(si[j],si[j-1]); swap(sc[j],sc[j-1]); } } } } vo...
a.cc: In function 'int main()': a.cc:43:3: error: 'memcpy' was not declared in this scope 43 | memcpy(sc_2,sc_1,sizeof(char)*N); | ^~~~~~ a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring>...
s345967184
p02261
C++
#include <iostream> #include <stdio.h> #include <algorithm> #include <string> using namespace std; struct Card { char suit; int value; }; void Bubblesort(struct Card A[], int N) { bool flag = 1; for (int i = 0; flag; i++) { flag = 0; for (int j = N - 1; j > i; j--) { if (A[j].val...
a.cc:45:14: error: 'C1' was not declared in this scope 45 | int isStable(C1[],C2[],N){ | ^~ a.cc:45:17: error: expected primary-expression before ']' token 45 | int isStable(C1[],C2[],N){ | ^ a.cc:45:19: error: 'C2' was not declared in this scope 45 | int isStable(C1[],...
s474965059
p02261
C++
#include <iostream> #include <stdio.h> #include <algorithm> #include <string> using namespace std; struct Card { char suit; int value; }; void Bubblesort(struct Card A[], int N) { bool flag = 1; for (int i = 0; flag; i++) { flag = 0; for (int j = N - 1; j > i; j--) { if (A[j].val...
a.cc: In function 'bool isStable(Card*, Card*, int)': a.cc:47:17: error: no match for 'operator!=' (operand types are 'Card' and 'Card') 47 | if(C1[i]!=C2[i]){ | ~~~~~^~~~~~~ | | | | Card Card In file included from /usr/include/c++/14/iosfwd:4...
s625286403
p02261
C++
#include <stdio.h> #include <iostream> #include <utility> using namespace std; void bubbleSort(TRUMP a[], int n); void selectionSort(TRUMP a[], int n); void dispTrumpList(const TRUMP trump[], int n); bool isStable(const TRUMP t1[], const TRUMP t2[], int n); typedef struct { char mark; int num; } TRUMP; int main(vo...
a.cc:6:6: error: variable or field 'bubbleSort' declared void 6 | void bubbleSort(TRUMP a[], int n); | ^~~~~~~~~~ a.cc:6:17: error: 'TRUMP' was not declared in this scope 6 | void bubbleSort(TRUMP a[], int n); | ^~~~~ a.cc:6:28: error: expected primary-expression before 'int' ...
s482317470
p02261
C++
#include <stdio.h> #include <iostream> #include <utility> using namespace std; typedef struct { char mark; int num; } TRUMP; void bubbleSort(TRUMP a[], int n); void selectionSort(TRUMP a[], int n); void dispTrumpList(const TRUMP trump[], int n); bool isStable(const TRUMP t1[], const TRUMP t2[], int n); int main(vo...
a.cc: In function 'int main()': a.cc:25:9: error: 'memcpy' was not declared in this scope 25 | memcpy(trump1, trump, sizeof(trump) * n); | ^~~~~~ a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <utility> +++ |...
s651440666
p02261
C++
#include <stdio.h> #include <iostream> #include <string.h> #include <utility> using namespace std; typedef struct { char mark; int num; } TRUMP; void bubbleSort(TRUMP a[], int n); void selectionSort(TRUMP a[], int n); void dispTrumpList(const TRUMP trump[], int n); bool isStable(const TRUMP t1[], const TRUMP t2[], ...
a.cc: In function 'int main()': a.cc:31:13: error: 'isState' was not declared in this scope; did you mean 'isStable'? 31 | if (isState(trump, trump1, n)) cout << "Stable" << endl; | ^~~~~~~ | isStable a.cc:36:13: error: 'isState' was not declared in this scope; did you mea...
s131144742
p02261
C++
#include <stdio.h> #include <iostream> #include <string.h> #include <utility> using namespace std; typedef struct { char mark; int num; } TRUMP; void bubbleSort(TRUMP a[], int n); void selectionSort(TRUMP a[], int n); void dispTrumpList(const TRUMP trump[], int n); bool isStable(const TRUMP t1[], const TRUMP t2[], ...
a.cc: In function 'bool isStable(const TRUMP*, const TRUMP*, int)': a.cc:78:25: error: array must be initialized with a brace-enclosed initializer 78 | char m1[9][4] = '\0'; | ^~~~ a.cc:81:35: error: request for member 'num' in 't1', which is of pointer type 'const TRUMP*' (mayb...
s037839193
p02261
C++
#include <stdio.h> #include <iostream> #include <string.h> #include <utility> using namespace std; typedef struct { char mark; int num; } TRUMP; void bubbleSort(TRUMP a[], int n); void selectionSort(TRUMP a[], int n); void dispTrumpList(const TRUMP trump[], int n); bool isStable(const TRUMP t1[], const TRUMP t2[], ...
a.cc: In function 'bool isStable(const TRUMP*, const TRUMP*, int)': a.cc:81:35: error: request for member 'num' in 't1', which is of pointer type 'const TRUMP*' (maybe you meant to use '->' ?) 81 | if (m1[t1.num-1][j] == '\0') { | ^~~ a.cc:82:39: error:...
s090817439
p02261
C++
#include <stdio.h> #include <iostream> #include <string.h> #include <utility> using namespace std; typedef struct { char mark; int num; } TRUMP; void bubbleSort(TRUMP a[], int n); void selectionSort(TRUMP a[], int n); void dispTrumpList(const TRUMP trump[], int n); bool isStable(const TRUMP t1[], const TRUMP t2[], ...
a.cc: In function 'bool isStable(const TRUMP*, const TRUMP*, int)': a.cc:82:57: error: request for member 'mark' in 't1', which is of pointer type 'const TRUMP*' (maybe you meant to use '->' ?) 82 | m1[t1[i].num-1][j] = t1.mark; | ...
s694706265
p02261
C++
#include<iostream> using namespace std; struct card{char suit,value;}; void bubble(struct card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ card t=A[j]; A[j]=A[j-1]; A[j-1]=t; } } } } void selection(struct cardA[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int j=i;j<N;j+...
a.cc: In function 'void selection(cardA*, int)': a.cc:21:4: error: 'A' was not declared in this scope 21 | if(A[j].value<A[minj].value)minj=j; | ^ a.cc:23:8: error: 'A' was not declared in this scope 23 | card t=A[i]; | ^ a.cc: At global scope: a.cc:29:1: error: 'voir' does not name a type; ...
s582332595
p02261
C++
#include<iostream> using namespace std; struct card{char suit,value;}; void bubble(struct card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ card t=A[j]; A[j]=A[j-1]; A[j-1]=t; } } } } void select(struct card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int j=i;j<N;j++)...
a.cc:29:1: error: 'voir' does not name a type; did you mean 'void'? 29 | voir print(struct card A[],int N){ | ^~~~ | void a.cc: In function 'int main()': a.cc:51:6: error: 'c1' was not declared in this scope; did you mean 'ch'? 51 | cin>>c1[i].suit>>c1[i].value; | ^~ | ch a.cc:54...
s650619955
p02261
C++
#include<iostream> using namespace std; struct card{char suit,value;}; void bubble(struct card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ card t=A[j]; A[j]=A[j-1]; A[j-1]=t; } } } } void select(struct card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int j=i;j<N;j++)...
a.cc: In function 'int main()': a.cc:51:6: error: 'c1' was not declared in this scope; did you mean 'ch'? 51 | cin>>c1[i].suit>>c1[i].value; | ^~ | ch a.cc:54:27: error: 'c1' was not declared in this scope; did you mean 'ch'? 54 | for(int i=0;i<N;i++)c2[i]=c1[i]; | ...
s211782786
p02261
C++
#include<iostream> using namespace std; struct card{char suit,value;}; void bubble(struct card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ card t=A[j]; A[j]=A[j-1]; A[j-1]=t; } } } } void select(struct card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int j=i;j<N;j++)...
a.cc: In function 'int main()': a.cc:51:6: error: 'c1' was not declared in this scope; did you mean 'ch'? 51 | cin>>c1[i].suit>>c1[i].value; | ^~ | ch a.cc:54:27: error: 'c1' was not declared in this scope; did you mean 'ch'? 54 | for(int i=0;i<N;i++)c2[i]=c1[i]; | ...
s441523405
p02261
C++
#include<iostream> using namespace std; struct card{char suit,value;}; void bubble(struct card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ card t=A[j]; A[j]=A[j-1]; A[j-1]=t; } } } } void select(struct card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int j=i;j<N;j++)...
a.cc: In function 'int main()': a.cc:51:6: error: 'c1' was not declared in this scope; did you mean 'ch'? 51 | cin>>c1[i].suit>>c1[i].value; | ^~ | ch a.cc:54:27: error: 'c1' was not declared in this scope; did you mean 'ch'? 54 | for(int i=0;i<N;i++)c2[i]=c1[i]; | ...
s719878145
p02261
C++
#include <stdio.h> #define N 100 struct pair{ int n; char m; }; struct pair bubble[N],sel[N]; int n; void Bubble(){ int i,j,tmp; for(i=0;i<n-1;i++){ for(j=n-1;j>i;j--){ if(bubble[j] < bubble[j-1]){ tmp=bubble[j]; bubble[j] = bubble[j-1]; bubble[j-1] = tmp; count++; } } } } void Selec...
a.cc: In function 'void Bubble()': a.cc:17:38: error: no match for 'operator<' (operand types are 'pair' and 'pair') 17 | if(bubble[j] < bubble[j-1]){ | ~~~~~~~~~ ^ ~~~~~~~~~~~ | | | | ...
s357315327
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value}; void bubble(struct Card A[], int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i+1;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selectionSort(struct Card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int j=i;j<...
a.cc:4:23: error: expected ';' at end of member declaration 4 | struct Card{char suit,value}; | ^~~~~ | ;
s092885568
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value;}; void bubble(struct Card A[], int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i+1;j--){ if(A[j].value < A[j-1].value){ Card t=A[j] ; A[j]=A[j-1] ; A[j-1]=t; } } } } void selectionSort(struct Card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int...
a.cc: In function 'bool isStable(Card*, Card, int)': a.cc:33:19: error: no match for 'operator[]' (operand types are 'Card' and 'int') 33 | if (C1[i].suit!=C2[i].suit) return false; | ^ a.cc: In function 'int main()': a.cc:47:1: error: 'selection' was not declared in this scope; did you mean ...
s711885604
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value;}; void bubble(struct Card A[], int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i+1;j--){ if(A[j].value < A[j-1].value){ Card t=A[j] ; A[j]=A[j-1] ; A[j-1]=t; } } } } void selectionSort(struct Card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int...
a.cc: In function 'bool isStable(Card*, Card, int)': a.cc:33:19: error: no match for 'operator[]' (operand types are 'Card' and 'int') 33 | if (C1[i].suit!=C2[i].suit) return false; | ^ a.cc: In function 'int main()': a.cc:51:17: error: could not convert '(Card*)(& C2)' from 'Card*' to 'Card'...
s892801309
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value;}; void bubble(struct Card A[], int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i+1;j--){ if(A[j].value < A[j-1].value){ Card t=A[j] ; A[j]=A[j-1] ; A[j-1]=t; } } } } void selectionSort(struct Card A[],int N){ for(int i=0;i<N;i++){ int minj=i; for(int...
a.cc: In function 'bool isStable(Card*, Card, int)': a.cc:33:19: error: no match for 'operator[]' (operand types are 'Card' and 'int') 33 | if (C1[i].suit!=C2[i].suit) return false; | ^ a.cc: In function 'int main()': a.cc:51:17: error: could not convert '(Card*)(& C2)' from 'Card*' to 'Card'...
s830116761
p02261
C++
def b_sort(ca) c = ca.dup s = 0 c.sort_by{|i| [i[1], s += 1]} end def s_sort(ca) c = ca.dup c.size.times do |i| m = i i.upto(c.size - 1) do |j| if c[j][1] < c[m][1] m = j end end c[m], c[i] = c[i], c[m] end c end gets a = gets.split.map do |e| e =~ /(\w)(\d+)/ [$1...
a.cc:23:10: error: stray '\' in program 23 | e =~ /(\w)(\d+)/ | ^ a.cc:23:14: error: stray '\' in program 23 | e =~ /(\w)(\d+)/ | ^ a.cc:30:6: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes 30 | puts 'Stable' | ^~~~~~~~ a.cc:32:...
s978763321
p02261
C++
#include <bits/stdc++.h> using namespace std; struct Card {char suit, value;}; void bubble(struct Card A[], int N){ for(int i=0; i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].vallue){ Card t=A[j]; A[j]=A[j-1]; A[j-1]=t; } ...
a.cc: In function 'void bubble(Card*, int)': a.cc:9:34: error: 'struct Card' has no member named 'vallue'; did you mean 'value'? 9 | if(A[j].value<A[j-1].vallue){ | ^~~~~~ | value a.cc: In function 'void print(Card*, int)': a....
s345455631
p02261
C++
#include <bits/stdc++.h> using namespace std; struct Card {char suit, value;}; void bubble(struct Card A[], int N){ for(int i=0; i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].vallue){ Card t=A[j]; A[j]=A[j-1]; A[j-1]=t; } ...
a.cc: In function 'void bubble(Card*, int)': a.cc:9:34: error: 'struct Card' has no member named 'vallue'; did you mean 'value'? 9 | if(A[j].value<A[j-1].vallue){ | ^~~~~~ | value a.cc: In function 'void print(Card*, int)': a....
s897930855
p02261
C++
#include <bits/stdc++.h> using namespace std; struct Card {char suit, value;}; void bubble(struct Card A[], int N){ for(int i=0; i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].vallue){ Card t=A[j]; A[j]=A[j-1]; A[j-1]=t; } ...
a.cc: In function 'void bubble(Card*, int)': a.cc:9:34: error: 'struct Card' has no member named 'vallue'; did you mean 'value'? 9 | if(A[j].value<A[j-1].vallue){ | ^~~~~~ | value a.cc: In function 'bool isStable(CardC1*, Card...
s927518507
p02261
C++
#include <bits/stdc++.h> using namespace std; struct Card {char suit, value;}; void bubble(struct Card A[], int N){ for(int i=0; i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j]; A[j]=A[j-1]; A[j-1]=t; } ...
a.cc: In function 'bool isStable(CardC1*, Card2*, int)': a.cc:40:12: error: 'C1' was not declared in this scope; did you mean 'y1'? 40 | if(C1[i].suit!=C2[i].suit) return false; | ^~ | y1 a.cc:40:24: error: 'C2' was not declared in this scope 40 | if(C1[i].suit!=C...
s264018723
p02261
C++
#include<iostream> using namespace std; bool selectionSort(char R[36][3], int N) { bool isStable = true; for (int i = 1; i < N; i++) { char v[3]; memcpy(v, &R[i][0], sizeof(v)); int j = i - 1; while ((j >= 0) && (R[j][1] > v[1])) { memcpy(R[j + 1], R[j], sizeof(R[0])); j--; } memcpy(R[j + 1],...
a.cc: In function 'bool selectionSort(char (*)[3], int)': a.cc:10:17: error: 'memcpy' was not declared in this scope 10 | memcpy(v, &R[i][0], sizeof(v)); | ^~~~~~ a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' ...
s068595677
p02261
C++
#include<iostream> #include<memory> using namespace std; bool selectionSort(char R[36][3], int N) { bool isStable = true; for (int i = 1; i < N; i++) { char v[3]; memcpy(v, &R[i][0], sizeof(v)); int j = i - 1; while ((j >= 0) && (R[j][1] > v[1])) { memcpy(R[j + 1], R[j], sizeof(R[0])); j--; } ...
a.cc: In function 'bool selectionSort(char (*)[3], int)': a.cc:11:17: error: 'memcpy' was not declared in this scope 11 | memcpy(v, &R[i][0], sizeof(v)); | ^~~~~~ a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' ...
s429347812
p02261
C++
#include<iostream> #include<memory.h> using namespace std; bool selectionSort(char R[36][3], int N) { bool isStable = true; for (int i = 1; i < N; i++) { char v[3]; memcpy(v, &R[i][0], sizeof(v)); int j = i - 1; while ((j >= 0) && (R[j][1] > v[1])) { memcpy(R[j + 1], R[j], sizeof(R[0])); j--; }...
a.cc: In function 'bool bubbleSort(char (*)[3], int)': a.cc:34:31: error: 'j' was not declared in this scope 34 | if (R[j - 1][1] >= R[j][1]) | ^
s818901090
p02261
C++
#include<iostream> #include<memory> using namespace std; /* bool insertSort(char R[36][3], int N) { bool isStable = true; for (int i = 1; i < N; i++) { char v[3]; memcpy(v, &R[i][0], sizeof(v)); int j = i - 1; while ((j >= 0) && (R[j][1] > v[1])) { memcpy(R[j + 1], R[j], sizeof(R[0])); j--; } ...
a.cc: In function 'bool bubbleSort(char (*)[3], int)': a.cc:39:33: error: 'memcpy' was not declared in this scope 39 | memcpy(temp, R[j], sizeof(temp)); | ^~~~~~ a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable b...
s822919740
p02261
C++
#include "bits\stdc++.h" using namespace std; struct Card { char suit; int value; }; void Print(vector<Card>& A) { for (int i = 0; i < A.size(); ++i) { if (i) cout << " "; cout << A[i].suit << A[i].value << endl; } } void SelectionSort(vector<Card>& A) { for (int i = 0; i < A.size(); ++i) { int min...
a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory 1 | #include "bits\stdc++.h" | ^~~~~~~~~~~~~~~ compilation terminated.
s181204314
p02261
C++
#include<iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int n){ for(int i=0; i<n; i++){ for(int j=n-1; j>=i; j--){ if(A[j].value < A[j-1].value) //swap(A[j].value, A[j-1].value); Card t=A[j]; A[j]=A[j-1]; A[j-1]=t;...
a.cc: In function 'void bubble(Card*, int)': a.cc:11:50: error: 't' was not declared in this scope 11 | Card t=A[j]; A[j]=A[j-1]; A[j-1]=t; | ^
s254594919
p02261
C++
#include <iostream> using namespace std; static const int MAX = 36; struct Card { char suit, int value }; void bubble (struct Card A[], int N) { bool flag = 1; for (int i = 0; flag; i++) { flag = 0; for (int j = N-1; i < j; j--) { if (A[j] < A[j-1]) { Card a = A[j-1]; A[j-1] ...
a.cc:9:3: error: expected unqualified-id before 'int' 9 | int value | ^~~ a.cc: In function 'void bubble(Card*, int)': a.cc:19:16: error: no match for 'operator<' (operand types are 'Card' and 'Card') 19 | if (A[j] < A[j-1]) { | ~~~~ ^ ~~~~~~ | | | ...
s512685750
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value;}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } ] } } void selectionSort(struct CardA[],int N){ for(int i=0;i<N;...
a.cc: In function 'void bubble(Card*, int)': a.cc:12:5: error: expected primary-expression before ']' token 12 | ] | ^ a.cc:16:41: error: a function-definition is not allowed here before '{' token 16 | void selectionSort(struct CardA[],int N){ | ^ a.cc:2...
s917409693
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value;}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selectionSort(struct CardA[],int N){ for(int i=0;i...
a.cc: In function 'void selectionSort(CardA*, int)': a.cc:20:10: error: 'A' was not declared in this scope 20 | if(A[j].value<A[minj].value)minj=j; | ^ a.cc:22:12: error: 'A' was not declared in this scope 22 | Card t=A[i];A[i]=A[minj];A[minj]=t; | ^ a.cc: In function 'bo...
s037119429
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value;}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selection(struct CardA[],int N){ for(int i=0;i<...
a.cc: In function 'void selection(CardA*, int)': a.cc:20:10: error: 'A' was not declared in this scope 20 | if(A[j].value<A[minj].value)minj=j; | ^ a.cc:22:12: error: 'A' was not declared in this scope 22 | Card t=A[i];A[i]=A[minj];A[minj]=t; | ^ a.cc: In function 'bool i...
s798999500
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value;}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selection(struct CardA[],int N){ for(int i=0;i<...
a.cc: In function 'void selection(CardA*, int)': a.cc:20:10: error: 'A' was not declared in this scope 20 | if(A[j].value<A[minj].value)minj=j; | ^ a.cc:22:12: error: 'A' was not declared in this scope 22 | Card t=A[i];A[i]=A[minj];A[minj]=t; | ^ a.cc: In function 'bool i...
s187388484
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value;}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selection(struct Card A[],int N){ for(int i=0;i...
a.cc: In function 'bool isStable(Card*, CardC2*, int)': a.cc:36:20: error: 'C2' was not declared in this scope; did you mean 'C1'? 36 | if(C1[i].suit!=C2[i].suit)return false; | ^~ | C1 a.cc: In function 'int main()': a.cc:54:18: error: expected ';' before 'print...
s759194842
p02261
C++
#include<iostream> using namespace std; struct Card{char suit,value;}; void bubble(struct Card A[],int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if(A[j].value<A[j-1].value){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selection(struct CardA[],int N){ for(int i=0;i<...
a.cc: In function 'void selection(CardA*, int)': a.cc:20:10: error: 'A' was not declared in this scope 20 | if(A[j].value<A[minj].value)minj=j; | ^ a.cc:22:12: error: 'A' was not declared in this scope 22 | Card t=A[i];A[i]=A[minj];A[minj]=t; | ^ a.cc: In function 'bool i...
s901260217
p02261
C++
#include<iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if ( A[j].value<A[j-1].value ){ Card t = A[j]; A[j] = A[j - 1]; A[j - 1] = t; } } } } void selection(struct CardA[],int N){ for ( ...
a.cc: In function 'void selection(CardA*, int)': a.cc:20:30: error: 'A' was not declared in this scope 20 | if ( A[j].value < A[minj].value) minj = j; | ^ a.cc:22:24: error: 'A' was not declared in this scope 22 | Card t=A[i];A[i]=A[minj];...
s870874017
p02261
C++
#include<iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if ( A[j].value<A[j-1].value ){ Card t = A[j]; A[j] = A[j - 1]; A[j - 1] = t; } } } } void selection(struct CardA[],int N){ for ( ...
a.cc: In function 'void selection(CardA*, int)': a.cc:20:30: error: 'A' was not declared in this scope 20 | if ( A[j].value < A[minj].value) minj = j; | ^ a.cc:22:24: error: 'A' was not declared in this scope 22 | Card t=A[i];A[i]=A[minj];...
s999926797
p02261
C++
#include<iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int N){ for(int i=0;i<N;i++){ for(int j=N-1;j>=i;j--){ if ( A[j].value<A[j-1].value ){ Card t=A[j];A[j]=A[j-1];A[j-1]=t; } } } } void selection(struct Card A[],int N){ for ( int i=0;i<N...
a.cc: In function 'int main()': a.cc:54:24: error: expected ';' before 'print' 54 | selection(C2,N) | ^ | ; 55 | 56 | print(C1,N); | ~~~~~
s591443726
p02261
C++
#include<stdio.h> int main(void) { int i = 0, j, k, n, m, l, key, minj; card a[100], b[100], c[100]; scanf("%d", &n); key = n; while ( key-- ) { scanf("%d", &a[i]); b[i] = a[i]; c[i] = a[i] i++; } /*BubbleSort*/ for ( i = 0; i <= n ; i++ ) { for ( ...
a.cc: In function 'int main()': a.cc:4:5: error: 'card' was not declared in this scope 4 | card a[100], b[100], c[100]; | ^~~~ a.cc:8:22: error: 'a' was not declared in this scope 8 | scanf("%d", &a[i]); | ^ a.cc:9:9: error: 'b' was not declared in this scope ...
s318938692
p02261
C++
#include<bits/stdc++.h> #define ll long long int #define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) #define REP(i,n) FOR(i,0,n) #define REP1(i,n) FOR(i,1,n) #define MAX 100 using namespace std; struct Card { char suit, value; }; void bubbleSort(struct Card C[], int N) { REP (int i, N) { for (int j = N - 1; j >=...
a.cc: In function 'void bubbleSort(Card*, int)': a.cc:2:22: error: two or more data types in declaration of 'i' 2 | #define ll long long int | ^~~ a.cc:3:24: note: in expansion of macro 'll' 3 | #define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) | ^~ a.cc:...
s087742386
p02261
C++
#include<bits/stdc++.h> #define ll long long int #define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) #define REP(i,n) FOR(i,0,n) #define REP1(i,n) FOR(i,1,n) #define MAX 100 using namespace std; struct Card { char suit, value; }; void bubbleSort(struct Card C[], int N) { REP(int i, N) { for (int j = N - 1; j >= ...
a.cc: In function 'void bubbleSort(Card*, int)': a.cc:2:22: error: two or more data types in declaration of 'i' 2 | #define ll long long int | ^~~ a.cc:3:24: note: in expansion of macro 'll' 3 | #define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) | ^~ a.cc:...
s124957322
p02261
C++
#include<bits/stdc++.h> #define MAX 100 using namespace std; struct Card { char suit, value; }; void bubbleSort(struct Card C[], int N) { for (int i = 0; i < N; i++) { for (int j = N - 1; j >= i + 1; j--) { if (C[j].value < C[j - 1]) { Card temp = C[j]; C[j] = C[j - 1]; C[j - 1] = ...
a.cc: In function 'void bubbleSort(Card*, int)': a.cc:10:22: error: no match for 'operator<' (operand types are 'char' and 'Card') 10 | if (C[j].value < C[j - 1]) { | ~~~~~~~~~~ ^ ~~~~~~~~ | | | | char Card In file included from /...
s589292449
p02261
C++
#include<bits/stdc++.h> #define MAX 100 using namespace std; struct Card { char suit, value; }; void bubbleSort(struct Card C[], int N) { for (int i = 0; i < N; i++) { for (int j = N - 1; j >= i + 1; j--) { if (C[j].value < C[j - 1].value) { Card temp = C[j]; C[j] = C[j - 1]; C[j -...
a.cc:34:3: error: expected primary-expression before 'for' 34 | for (int i = 0; i < N; i++) { | ^~~ a.cc:33:37: error: expected ']' before 'for' 33 | void print(struct Card C[], int N) [ | ^ | ] 34 | for (int i = 0;...
s061894778
p02261
C++
#include<bits/stdc++.h> #define ll long long int #define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) #define REP(i,n) FOR(i,0,n) #define REP1(i,n) FOR(i,1,n) #define MAX 100 using namespace std; struct Card { char suit, value; }; void bubbleSort(struct Card C[], int N) { REP(int i, N) { for (int j = N - 1; j ...
a.cc: In function 'void bubbleSort(Card*, int)': a.cc:2:22: error: two or more data types in declaration of 'i' 2 | #define ll long long int | ^~~ a.cc:3:24: note: in expansion of macro 'll' 3 | #define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) | ^~ a.cc:...
s926758859
p02261
C++
#include<iostream> using namespace std; struct Card{char suit, value;}; void bubble(struct Card A[], int N){ for(int i = 0;i < N;i++){ for (int j = N - 1;j >= i + 1;j--){ if(A[j].value < A[j-1].value){ Card t = A[j];A[j] = A[j-1];A[j-1] = t; } } } } void selection(struct Card A[], int...
a.cc: In function 'void selection(Card*, int)': a.cc:19:9: error: 'j' was not declared in this scope 19 | for(j = i;j < N;j++){ | ^ a.cc:22:16: error: 'j' was not declared in this scope 22 | Card t = A[j];A[j] = A[j-1];A[j-1] = t; | ^ a.cc: At global scope: a.cc:26:1: er...
s293457357
p02261
C++
#include<iostream> using namespace std; struct Card{char suit, value;}; void bubble(struct Card A[], int N){ for(int i = 0;i < N;i++){ for (int j = N - 1;j >= i + 1;j--){ if(A[j].value < A[j-1].value){ Card t = A[j];A[j] = A[j-1];A[j-1] = t; } } } } void selection(struct Card A[], int...
a.cc: In function 'void selection(Card*, int)': a.cc:19:9: error: 'j' was not declared in this scope 19 | for(j = i;j < N;j++){ | ^ a.cc:22:16: error: 'j' was not declared in this scope 22 | Card t = A[j];A[j] = A[j-1];A[j-1] = t; | ^ a.cc: In function 'int main()': a.cc...
s165229000
p02261
C++
#include<iostream> using namespace std; struct Card{char suit, value;}; void bubble(struct Card A[], int N){ for(int i = 0;i < N;i++){ for (int j = N - 1;j >= i + 1;j--){ if(A[j].value < A[j-1].value){ Card t = A[j];A[j] = A[j-1];A[j-1] = t; } } } } void selection(struct Card A[], int...
a.cc: In function 'void selection(Card*, int)': a.cc:22:16: error: 'j' was not declared in this scope 22 | Card t = A[j];A[j] = A[j-1];A[j-1] = t; | ^ a.cc: In function 'int main()': a.cc:48:29: error: request for member 'value' in 'C1', which is of non-class type 'Card [100]' 48 | ci...
s947755891
p02261
C++
#include<iostream> using namespace std; struct Card {char suit, vaue;}; void bubble(struct Card A[], int N) { for (int i = 0; i < N; i++) { for (int j = N-1; j >= i+1; j--) { if (A[j].value < A[j-1].value) { Card t = A[j]; A[j] = A[j-1]; A[j-1] = t; } } } } void se...
a.cc: In function 'void bubble(Card*, int)': a.cc:10:19: error: 'struct Card' has no member named 'value'; did you mean 'vaue'? 10 | if (A[j].value < A[j-1].value) { | ^~~~~ | vaue a.cc:10:34: error: 'struct Card' has no member named 'value'; did you mean 'vau...
s511521406
p02261
C++
#include<iostream> using namespace std; struct Card { char mark; int value; }; void bubbleSort (struct Card C[], int n) { int i, j; Card v; for (i = 0; i < n; i++) { for (j = n - 1; j >= i + 1; j++) { if (C[j].value < C[j - 1].value) { v = C[j]; ...
a.cc: In function 'void selectionSort(Card*, int)': a.cc:38:10: error: declaration of 'Card v' shadows a parameter 38 | Card v; | ^ a.cc:35:42: note: 'int v' previously declared here 35 | void selectionSort (struct Card C[], int v) { | ~~~~^ a.cc:40:21...
s143943011
p02261
C++
#include <iostream> using namespace std; struct Card { char suit, value; }; int main(void) { Card C1[100], C2[100]; int n; char ch; cin >> n; for (int i = 0; i < n; i++) { cin >> C1[i].suit >> C1[i].value; } for (int i = 0; i < n; i++) C2[i] = C1[i]; bubble(C1, n); selection(C2, n); ...
a.cc: In function 'int main()': a.cc:19:17: error: 'bubble' was not declared in this scope 19 | bubble(C1, n); | ^~~~~~ a.cc:20:17: error: 'selection' was not declared in this scope; did you mean 'select'? 20 | selection(C2, n); | ^~~~~~~...
s141871055
p02261
C++
#include <iostream> using namespace std; struct Card { char suit, value; }; int main(void) { Card C1[100], C2[100]; int n; char ch; cin >> n; for (int i = 0; i < n; i++) { cin >> C1[i].suit >> C1[i].value; } for (int i = 0; i < n; i++) C2[i] = C1[i]; bubble(C1, n); selection(C2, n); ...
a.cc: In function 'int main()': a.cc:19:17: error: 'bubble' was not declared in this scope 19 | bubble(C1, n); | ^~~~~~ a.cc:20:17: error: 'selection' was not declared in this scope; did you mean 'select'? 20 | selection(C2, n); | ^~~~~~~...
s547130271
p02261
C++
#include <iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int n) { for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j > i + 1; j--) { if (A[j].value < A[j-1].value) { Card t = A[j]; A[j] = A[j-1]; A[j-1] = t; } } } } void selection(s...
a.cc: In function 'void bubble(Card*, int)': a.cc:8:54: error: expected ')' before ';' token 8 | for (int j = 0; j < n - 1; j > i + 1; j--) { | ~ ^ | ) a.cc:8:56: error: 'j' was n...
s826407877
p02261
C++
#include <iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int n) { for (int i = 0; i < n; i++) { for (int j = n - 1; j >= i + 1; j--) { if (A[j].value < A[j-1].value) { Card t = A[j]; A[j] = A[j-1]; A[j-1] = t; } } } } void selection(struct...
a.cc: In function 'void print(Card*, int)': a.cc:37:17: error: 'end1' was not declared in this scope 37 | cout << end1; | ^~~~ a.cc: In function 'int main()': a.cc:64:24: error: cannot convert 'Card*' to 'const char*' 64 | printf(C1, n); | ...
s529097359
p02261
C++
#include <iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int n) { for (int i = 0; i < n; i++) { for (int j = n - 1; j >= i + 1; j--) { if (A[j].value < A[j-1].value) { Card t = A[j]; A[j] = A[j-1]; A[j-1] = t; } } } } void selection(struct...
a.cc: In function 'int main()': a.cc:70:25: error: 'out' was not declared in this scope 70 | out << "Not stable" << endl; | ^~~
s614372644
p02261
C++
#include <iostream> #include <memory> using namespace std; struct _CARD { char suit; int value; }; void bubble(struct _CARD A[], int N) { for (int i = 0; i < N; i++) { for (int j = N - 1; j >= i; j--) { if (A[j].value < A[j - 1].value) { swap(A[j], A[j - 1]); ...
a.cc: In function 'int main()': a.cc:63:5: error: 'memcpy' was not declared in this scope 63 | memcpy(c2, c1, sizeof(c2)); | ^~~~~~ a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <memory> +++ |+#include <cstring> ...
s925986747
p02261
C++
#include<stdio.h> #include<iostream> #include<string> using namespace std; struct ch { char num; char eng; }; void bubblesort(struct ch str[], int n); void selectionsort(struct ch str[], int n); int main() { int n,i,j; ch str1[100],str2[100]; cin >> n; for (i = 0; i < n; i++) { cin >> str1[i].num >> str1[i]....
a.cc: In function 'int main()': a.cc:42:39: error: no match for 'operator==' (operand types are 'ch' and 'ch') 42 | if (j == 1 || str2[i] == str1[i]) { | ~~~~~~~ ^~ ~~~~~~~ | | | | ...
s524290977
p02261
C++
#include <iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int n) { for ( int i = 0; i < n; i++ ){ for ( int j = n - 1; j >= i; j-- ){ if( A[j].value < A[j - 1].value ){ Card t = A[j]; A[j] = A[j - 1]; ...
a.cc: In function 'int main()': a.cc:63:18: error: expected ';' before 'selection' 63 | bubble(C1, n) | ^ | ; 64 | selection(C2, n); | ~~~~~~~~~
s650163324
p02261
C++
#include<iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int n) { for ( int i = 0; i < n; i++ ){ for ( int j = n - 1; j >= i; j-- ){ if( A[j].value < A[j - 1].value ){ Card t = A[j]; A[j] = A[j - 1]; ...
a.cc: In function 'int main()': a.cc:63:18: error: expected ';' before 'selection' 63 | bubble(C1, n) | ^ | ; 64 | selection(C2, n); | ~~~~~~~~~
s663595792
p02261
C++
#include<iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int n) { for ( int i = 0; i < n; i++ ){ for ( int j = n - 1; j >= i; j-- ){ if( A[j].value < A[j - 1].value ){ Card t = A[j]; A[j] = A[j - 1]; ...
a.cc: In function 'int main()': a.cc:63:18: error: expected ';' before 'selection' 63 | bubble(C1, n) | ^ | ; 64 | selection(C2, n); | ~~~~~~~~~
s177572591
p02261
C++
#include<iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int n) { for ( int i = 0; i < n; i++ ){ for ( int j = n - 1; j >= i; j-- ){ if( A[j].value < A[j - 1].value ){ Card t = A[j]; A[j] = A[j - 1]; ...
a.cc: In function 'int main()': a.cc:64:18: error: expected ';' before 'selection' 64 | bubble(C1, n) | ^ | ; 65 | selection(C2, n); | ~~~~~~~~~
s940219906
p02261
C++
#include<iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[], int n) { for ( int i = 0; i < n; i++ ){ for ( int j = n - 1; j >= i; j-- ){ if( A[j].value < A[j - 1].value ){ Card t = A[j]; A[j] = A[j - 1]; ...
a.cc: In function 'int main()': a.cc:61:18: error: expected ';' before 'selection' 61 | bubble(C1, n) | ^ | ; 62 | selection(C2, n); | ~~~~~~~~~