submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s991474715
p02262
C++
#include <stdio.h> #include <iostream> #include <utility> using namespace std; int shellSort(int a[], int n); int insertionSort(int a[], int n, int g); int main(void) { int n, a[100]; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; shellSort(a, n, M); return 0; } int shellSort(int a[], int n) { int m =...
a.cc: In function 'int main()': a.cc:15:25: error: 'M' was not declared in this scope 15 | shellSort(a, n, M); | ^
s687598359
p02262
C++
#include <stdio.h> #include <iostream> #include <utility> using namespace std; int shellSort(int a[], int n); int insertionSort(int a[], int n, int g); int main(void) { int n, a[100]; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; shellSort(a, n); return 0; } int shellSort(int a[], int n) { int *g = ...
a.cc: In function 'int shellSort(int*, int)': a.cc:22:29: error: lvalue required as left operand of assignment 22 | int *g = new int[n];!!!!!! | ^~~~~~ 23 | g[0] = 1; | ~~~~
s004418984
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int;: int A[1000000]; int n; vector<int> G; void inssort(int A[], int n, int g) { for (int i = g; i < n; i++) { int v = A[i]; int j = i - g; while (j = > 0 && A[j] > v) { A[j + g] =...
a.cc:9:1: error: declaration does not declare anything [-fpermissive] 9 | int;: | ^~~ a.cc:9:5: error: expected unqualified-id before ':' token 9 | int;: | ^ a.cc: In function 'void inssort(int*, int, int)': a.cc:18:28: error: expected primary-expression before '>' token 18 | ...
s827414768
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int; int A[1000000]; int n; vector<int> G; void inssort(int A[], int n, int g) { for (int i = g; i < n; i++) { int v = A[i]; int j = i - g; while (j >= 0 && A[j] > v) { A[j + g] = A...
a.cc:9:1: error: declaration does not declare anything [-fpermissive] 9 | int; | ^~~
s216296483
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int>G; void insert(int A[],int n,int g){ for(int i=g;i<n;i++){ int v=A[i]; int j=i-g; while(j>=0 && A[j]>v){ A[j+g]=A[j]; j-=g; cnt++; } A[j+g]=v; } } void...
a.cc: In function 'int main()': a.cc:43:1: error: 'c' was not declared in this scope 43 | c=0; | ^ a.cc:58:2: error: expected '}' at end of input 58 | } | ^ a.cc:39:11: note: to match this '{' 39 | int main(){ | ^
s481876339
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int>G; void insert(int A[],int n,int g){ for(int i=g;i<n;i++){ int v=A[i]; int j=i-g; while(j>=0 && A[j]>v){ A[j+g]=A[j]; j-=g; c++; } A[j+g]=v; } } void s...
a.cc: In function 'void insert(int*, int, int)': a.cc:21:1: error: 'c' was not declared in this scope 21 | c++; | ^ a.cc: In function 'int main()': a.cc:43:1: error: 'c' was not declared in this scope 43 | c=0; | ^
s545942445
p02262
C++
#Include <Iostream> #include <cstdio> #include <vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; void insertionSort(int *A, int n, int g) { for (int i=g; i<n; i++) { int v = A[i]; int j = i-g; while (j>=0 && A[j]>v) { A[j+g] = A[j]; j -= g; cnt++...
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include? 1 | #Include <Iostream> | ^~~~~~~ | include
s127235708
p02262
C++
#Include <iostream> #include <cstdio> #include <vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; void insertionSort(int *A, int n, int g) { for (int i=g; i<n; i++) { int v = A[i]; int j = i-g; while (j>=0 && A[j]>v) { A[j+g] = A[j]; j -= g; cnt++...
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include? 1 | #Include <iostream> | ^~~~~~~ | include
s961245885
p02262
C++
#include "stdafx.h" #include <stdio.h> using namespace std; void insertionSort(int*p,int n,int g,int *cnt) { for (int i = g; i < n; i++) { int v = p[i]; int j = i - g; while (j >= 0 && p[j] > v) { p[j + g] = p[j]; j -= g; *cnt++; } p[j + g] = v; } } void shellSort(int*p, int n,int *cnt) { int ...
a.cc:2:10: fatal error: stdafx.h: No such file or directory 2 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s987519937
p02262
C++
#include <stdio.h> using namespace std; void insertionSort(int*p,int n,int g,int *cnt) { for (int i = g; i < n; i++) { int v = p[i]; int j = i - g; while (j >= 0 && p[j] > v) { p[j + g] = p[j]; j -= g; *cnt++; } p[j + g] = v; } } void shellSort(int*p, int n,int *cnt) { int d = n; while (d >= ...
a.cc: In function 'int main()': a.cc:35:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 35 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s741616502
p02262
C++
#include "stdafx.h" #include <stdio.h> using namespace std; int G[1500000]; long long cnt = 0; void insertionSort(int*p, int n, int g) { for (int i = g; i < n; i++) { int v = p[i]; int j = i - g; while (j >= 0 && p[j] > v) { p[j + g] = p[j]; j -= g; cnt++; } p[j + g] = v; } } void shellSort(int*p, ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s491470044
p02262
C++
// ShellSort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdio.h> #include <vector> using namespace std; vector<int> G; int cnt = 0; void insertionSort(int*p,int n,int g) { for (int i = g; i < n; i++) { int v = p[i]; int j = i - g; while (j >= 0 && p[j] > v) { ...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s877403993
p02262
C++
// ShellSort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdio.h> #include <vector> using namespace std; vector<int> G; int cnt = 0; int pow(int j, int k) { if (k == 0) return 1; else return j*pow(j, k - 1); } void insertionSort(int*p,int n,int g) { for (int i = g;...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s759243261
p02262
C++
#include <iostream> #include <algorithm> #include <vector> typedef int TInt; typedef std::vector<TInt> TList; TList Input() { int Count; std::cin >> Count; TList List(Count); for(int i = 0; i < Count; ++i){ std::cin >> List[i]; } return List; } int insertionSort(TList& A, int g) { i...
a.cc: In function 'int insertionSort(TList&, int)': a.cc:28:20: error: expected '}' at end of input 28 | A[j+g] = v; | ^ a.cc:20:38: note: to match this '{' 20 | for(int i = g; i < A.size(); ++i){ | ^ a.cc:28:20: error: expected '}' a...
s220235421
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; void insertionSort(int A[],int n,int g){ for(int i=g;i<n;i++){ int v=A[i]; int j=i-g; while(j>=0 && A[j]>v){ A[j+g]=A[j]; ...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:22:5: error: expected primary-expression before ']' token 22 | ] | ^ a.cc:27:30: error: a function-definition is not allowed here before '{' token 27 | void shellSort(int A[],int n){ | ^ a.cc:38:9: warnin...
s946425319
p02262
C++
def insetion_sort(A, n, g, cnt) : cnt = 0 for i in range(g, n) : v = A[i] j = i - g while j >= 0 and A[j] > v : A[j+g] = A[j] j = j -g cnt += 1 A[j+g] = v return cnt def shell_sort(A, n) : c...
a.cc:46:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 46 | if __name__ == '__main__' : | ^~~~~~~~~~ a.cc:1:1: error: 'def' does not name a type 1 | def insetion_sort(A, n, g, cnt) : | ^~~
s876925549
p02262
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; using int_vec = vector<long>; void print(const int_vec& v) { int_vec::const_iterator it; for (it = v.begin(); it != v.end()-1; ++it) { cout << *it << " "; } cout << *it << endl; } int insertion_sort(int_vec& v, i...
a.cc: In function 'int shell_sort(int_vec&)': a.cc:34:24: error: 'q' was not declared in this scope 34 | for (int i = 1; i <q v.size(); i = i * 3 + 1) { | ^ a.cc:34:25: error: expected ';' before 'v' 34 | for (int i = 1; i <q v.size(); i = i * 3 + 1) { | ...
s233860789
p02262
C++
include <stdio.h> #include <stdint.h> #include <iostream> #include <fstream> #include <cassert> #include <stack> using namespace std; //#define DEBUG (1) #ifdef DEBUG #define DPRINT(...) printf("D(L%d) %s: ", __LINE__, __func__); printf(__VA_ARGS__) #else #define DPRINT(...) #endif void getGarray(int arraySize, in...
a.cc:1:1: error: 'include' does not name a type 1 | include <stdio.h> | ^~~~~~~ In file included from /usr/include/stdlib.h:514, from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/ext/string_conversions.h:43, from /usr/include/c++/14/bits/basic_str...
s257720528
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; //間隔gを指定した挿入ソート void insertionSort(int A[], int n, int g){ for ( int i = g; i < n; i+) { int v = A[i];0; i-- ) { int j = i - g; whi...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:16:29: error: expected primary-expression before ')' token 16 | for ( int i = g; i < n; i+) { | ^ a.cc:17:24: error: expected ';' before ')' token 17 | int v = A[i];0; i-- ) { | ^~ ...
s437944456
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; //間隔gを指定した挿入ソート void insertionSort(int A[], int n, int g){ for ( int i = g; i < n; i+) { int v = A[i]; int j = i - g; while( j >= 0 ...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:16:29: error: expected primary-expression before ')' token 16 | for ( int i = g; i < n; i+) { | ^
s093285871
p02262
C++
#include<stdio.h> #include<algorithm> #include<vector> #include <iostream> using namespace std; long long time; vector<int> G; int A[1000000]; void insertionSort(int A[],int n,int x) { int t; for(int i=0; i<x; i++) { for(int j=i+x; j<n; j=j+x) { int k=j; while(k-x>...
a.cc:7:11: error: 'long long int time' redeclared as different kind of entity 7 | long long time; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/bits...
s557284219
p02262
C++
import sys n = int(input()) A=[int(e)for e in sys.stdin] cnt = 0 G = [int((3**i-1)/2)for i in range(30,0,-1)] G = [v for v in G if v <= n] def insertionSort(A, n, g): global cnt for i in range(g, n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = ...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s132373071
p02262
C++
import sys n = int(input()) A = [int(e)for e in sys.stdin] cnt = 0 G = [int((2.15**i-1)/1.15)for i in range(18,0,-1)] G = [v for v in G if v <= n] def insertionSort(A, n, g): global cnt for i in range(g, n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] ...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s384437988
p02262
C++
5 5 1 4 3 2
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 | ^
s813246047
p02262
C++
#include <iostream> #include <array> #include <vector> #include <cmath> using namespace std; static void printArray(int A[], int N) { for (int i = 0; i < N; i++) { cout << A[i] << endl; } } static void inputArray(int A[], int N) { for (int i = 0; i < N; i++) { cin >> A[i]; } } static int insersionSo...
a.cc: In function 'int shellSort(std::array<int, 1000000>&, int)': a.cc:41:26: error: expected primary-expression before ';' token 41 | for (int g = 1; g < N; ;) { | ^ a.cc:41:25: error: expected ')' before ';' token 41 | for (int g = 1; g < N; ;) { | ~ ...
s702377353
p02262
C++
#include <stdio.h> #include <stdlib.h> int cnt = 0; size_t gaps[] = { 1, 4, 9, 20, 46, 103 }; static const size_t len_gaps = sizeof(gaps) / sizeof(*gaps); void insertion_sort(int* array, size_t size, size_t gap) { for(size_t i = gap; i < size; i++) { int max = array[i]; int k = i - gap; while(0 <= k && ...
a.cc: In function 'int main()': a.cc:47:22: error: invalid conversion from 'void*' to 'int*' [-fpermissive] 47 | int* array = malloc(sizeof(int) * size); | ~~~~~~^~~~~~~~~~~~~~~~~~~~ | | | void*
s681923563
p02262
C++
// // main.cpp // Algorithms and Data Structures // // Created by kawauso. // #include <iostream> #include <string> #include <vector> #include <cassert> #include <tuple> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REPEAT(i, n) FOR(i, 0, n) #define DECFOR(i, a, b) for (int i = (a); (b) < i; --i) u...
a.cc: In function 'void c_3_6()': a.cc:64:14: error: 'reverse' is not a member of 'std' 64 | std::reverse(g.begin(), g.end()); | ^~~~~~~
s309990458
p02262
C++
#include <iostream> using namespace std; int insertionSort(int A[], int n, int g) { int cnt = 0; for (int i = g; i < n; i++) { int v = A[i]; int j = i - g; while (j >= 0 && A[j] > v) { A[j + g] = A[j]; j = j - g; cnt++; } A[j + g] = v; } return cnt; } int main() { int A[1000000]; int n; cin ...
a.cc: In function 'int main()': a.cc:39:24: error: 'pow' was not declared in this scope 39 | G[i] = pow(2, m - i - 1); | ^~~
s633071792
p02262
C++
#include <iostream> using namespace std; int insertionSort(int A[], int n, int g) { int cnt = 0; for (int i = g; i < n; i++) { int v = A[i]; int j = i - g; while (j >= 0 && A[j] > v) { A[j + g] = A[j]; j = j - g; cnt++; } A[j + g] = v; } return cnt; } int main() { int A[1000000]; int n; cin ...
a.cc: In function 'int main()': a.cc:39:29: error: 'pow' is not a member of 'std' 39 | G[i] = std::pow(2, m - i - 1); | ^~~
s847401589
p02262
C++
test
a.cc:1:1: error: 'test' does not name a type 1 | test | ^~~~
s493741045
p02262
C++
#include <stdio.h> #include <iostream> int cnt = 0; void print(int N, int *A) { for (int i = 0; i < N; i++) { cout << A[i]; if (i == N - 1) { //do nothing } else { cout << endl; } } } void inserSort(int N, int *A,int B) { int v; int j; for (int i = B; i < N; i++) { v = A[i]; j = i ...
a.cc: In function 'void print(int, int*)': a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout << A[i]; | ^~~~ | std::cout In file included from a.cc:2: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared...
s752169371
p02262
C++
#include <iostream> #include <algorithm> #include <vector> long long cnt=0; int* insertionSort(int* A, int N, int g){ int tmp; for(int i=g; i<N; i++){ tmp = A[i]; int j = i-g; while (j>=0 && A[j]>tmp) { A[j+g]=A[j]; j = j - g; cnt++; } A[j+g]=tmp; } return A; } void she...
a.cc: In function 'void shellSort(int*, int)': a.cc:25:32: error: cannot convert '__complex__ int' to 'int' in assignment 25 | for (int i = 0; i < n; i = 3i+1) {
s904357038
p02262
C++
#include<iostream> using namespace std; __int64 cnt = 0; int G[20], m = 0; int num[1000000]; void insertSort(int *arr, int n, int g) { for(int i = g; i < n; i++) { int v = arr[i]; int j = i - g; while(j >= 0 && arr[j] > v) { arr[j + g] = arr[j]; j -= g; cn...
a.cc:3:1: error: '__int64' does not name a type; did you mean '__int64_t'? 3 | __int64 cnt = 0; | ^~~~~~~ | __int64_t a.cc: In function 'void insertSort(int*, int, int)': a.cc:13:13: error: 'cnt' was not declared in this scope; did you mean 'int'? 13 | cnt++; | ^~~ ...
s029259510
p02262
C++
#include "stdafx.h" #include <iostream> #include <cstdio> using namespace std; int n; int a[1000000]; long long insertionSort(int a[], int n, int g, long long cnt) { for (int i = g;i < n;i++) { int v = a[i]; int j = i - g; while (j >= 0 && v < a[j]) { a[j + g] = a[j]; j -= g; cnt++; } a[j + g] ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s820060700
p02262
C++
#include "stdafx.h" #include <iostream> #include <cstdio> using namespace std; int n; int a[1000000]; long long insertionSort(int a[], int n, int g, long long cnt) { for (int i = g;i < n;i++) { int v = a[i]; int j = i - g; while (j >= 0 && v < a[j]) { a[j + g] = a[j]; j -= g; cnt++; } a[j + g] ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s233392863
p02262
C++
from typing import List def insertion_sort(arr: List[int], n: int, g: int): cnt = 0 for i in range(g, n): v = arr[i] j = i - g while (j >= 0 and arr[j] > v): arr[j + g] = arr[j] j = j - g cnt += 1 arr[j + g] = v return cnt def shell_s...
a.cc:1:1: error: 'from' does not name a type 1 | from typing import List | ^~~~
s267573279
p02262
C++
#include<stdio.h> #include<string.h> struct NUM { int cnt; int m; int G[100]; }; int InsertionSort(int A[], int n, int g) { int i, v, j, cnt = 0; for (i = g; i < n; i++) { v = A[i]; j = i - g; while (j >= 0 && A[j] > v) { A[j + g] = A[j]; j = j - g; cnt++; } A[j + g] = v; } return cnt; } int dev3(i...
a.cc: In function 'int dev3(int)': a.cc:28:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 28 | return; | ^~~~~~
s470078951
p02262
C++
#include<bits/stdc++.h> using namespace std; int cnt; void insertionSort(vector<int> &v, const int g) { int work, k, size = v.size(); for (int i = g; i < v.size(); ++i) { work = v[i]; k = i - g; while (k >= 0 && v[k] > work) { v[k + g] = v[k]; k -= g; ++cnt; } v[k + g] = work; } } void shellSor...
a.cc: In function 'int main()': a.cc:53:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 53 | scanf_s("%d", v[i]); | ^~~~~~~ | scanf
s258918622
p02262
C++
#include<bits/stdc++.h> using namespace std; int cnt; void insertionSort(vector<int> &v, const int g) { int work, k, size = v.size(); for (int i = g; i < v.size(); ++i) { work = v[i]; k = i - g; while (k >= 0 && v[k] > work) { v[k + g] = v[k]; k -= g; ++cnt; } v[k + g] = work; } } void shellSor...
a.cc: In function 'int main()': a.cc:53:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 53 | scanf_s("%d", &v[i]); | ^~~~~~~ | scanf
s488233350
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> long long cnt; int l; int A[10000000]; int n; vector<int> G; void insertionSort(int A[], int n, int g){ for ( int i = g; i < n - 1; i++) { v = A[i]; j = i - g; while ( int j >= 0 && A[j] > v) { A[j+g] = A[j]; ...
a.cc:11:1: error: 'vector' does not name a type 11 | vector<int> G; | ^~~~~~ a.cc: In function 'void insertionSort(int*, int, int)': a.cc:15:5: error: 'v' was not declared in this scope 15 | v = A[i]; | ^ a.cc:16:5: error: 'j' was not declared in this scope 16 | j = i - g; | ^...
s697258242
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> long long cnt; int l; int A[10000000]; int n; vector<int> G; void insertionSort(int A[], int n, int g){ for ( int i = g; i < n - 1; i++) { int v = A[i]; j = i - g; while ( int j >= 0 && A[j] > v) { A[j+g] = A[...
a.cc:11:1: error: 'vector' does not name a type 11 | vector<int> G; | ^~~~~~ a.cc: In function 'void insertionSort(int*, int, int)': a.cc:16:5: error: 'j' was not declared in this scope 16 | j = i - g; | ^ a.cc:17:19: error: expected initializer before '>=' token 17 | while ( int j >= 0...
s507264775
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[10000000]; int n; vector<int> G; void insertionSort(int A[], int n, int g){ for ( int i = g; i < n - 1; i++) { int v = A[i]; j = i - g; while ( int j >= 0 && A[j] > v...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:17:5: error: 'j' was not declared in this scope 17 | j = i - g; | ^ a.cc:18:19: error: expected initializer before '>=' token 18 | while ( int j >= 0 && A[j] > v) { | ^~ a.cc:18:18: error: expected ')' before '>...
s108799069
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[10000000]; int n; vector<int> G; void insertionSort(int A[], int n, int g){ for ( int i = g; i < n - 1; i++) { int v = A[i]; int j = i - g; while ( int j >= 0 && A[j]...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:18:19: error: expected initializer before '>=' token 18 | while ( int j >= 0 && A[j] > v) { | ^~ a.cc:18:18: error: expected ')' before '>=' token 18 | while ( int j >= 0 && A[j] > v) { | ~ ^~~ ...
s641745382
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[10000000]; int n; vector<int> G; void insertionSort(int A[], int n, int g){ for ( int i = g; i < n - 1; i++) { int v = A[i]; int j = i - g; while ( j >= 0 && A[j] > v...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:26:31: error: a function-definition is not allowed here before '{' token 26 | void shellSort(int A[], int n){ | ^ a.cc:38:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 38 ...
s455996087
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[10000000]; int n; vector<int> G; void insertionSort(int A[], int n, int g){ for ( int i = g; i < n - 1; i++) { int v = A[i]; int j = i - g; while ( j >= 0 && A[j] > v...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:26:31: error: a function-definition is not allowed here before '{' token 26 | void shellSort(int A[], int n){ | ^ a.cc:38:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 38 ...
s795247889
p02262
C++
#include<iostream> #include<vector> using namespace std; long long cnt; vector<int> G; void insertionSort(vector<int>& A, g) { for (int i = g; i < A.size(); i++) { int v = A[i]; int j = i - g; while (j >= 0; && A[j] > v) { A[j + g] = A[j]; j -= g; cnt++; } A[j + g] = v; } } ...
a.cc:8:36: error: 'g' has not been declared 8 | void insertionSort(vector<int>& A, g) { | ^ a.cc: In function 'void insertionSort(std::vector<int>&, int)': a.cc:9:16: error: 'g' was not declared in this scope 9 | for (int i = g; i < A.size(); i++) { | ...
s284560401
p02262
C++
#include<iostream> #include<vector> using namespace std; long long cnt; vector<int> G; void insertionSort(vector<int>& A, int g) { for (int i = g; i < A.size(); i++) { int v = A[i]; int j = i - g; while (j >= 0; && A[j] > v) { A[j + g] = A[j]; j -= g; cnt++; } A[j + g] = v; }...
a.cc: In function 'void insertionSort(std::vector<int>&, int)': a.cc:12:18: error: expected ')' before ';' token 12 | while (j >= 0; && A[j] > v) { | ~ ^ | ) a.cc:12:24: error: expected ';' before '[' token 12 | while (j >= 0; && A[j] > v) { | ...
s045050513
p02262
C++
#include<iostream> #include<vector> using namespace std; long long cnt; vector<int> G; void insertionSort(vector<int>& A, int g) { for (int i = g; i < A.size(); i++) { int v = A[i]; int j = i - g; while (j >= 0 && A[j] > v) { A[j + g] = A[j]; j -= g; cnt++; } A[j + g] = v; } ...
a.cc: In function 'int main()': a.cc:58:22: error: expected ';' before 'for' 58 | cout << cnt << endl | ^ | ; 59 | for (int i = 0; i < A.size(); i++) { | ~~~ a.cc:59:19: error: 'i' was not declared in this scope 59 | for (int ...
s125895181
p02262
C++
// ConsoleApplication1.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<iostream> #include<algorithm> using namespace std; int cnt = 0; void insertionSort(int a[], int n, int g) { int i, j; for (i = g; i < n; i++) { j = i; int v = a[i]; while (j-g >= 0 && a[j - g] > ...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s757620645
p02262
C++
#include <stdio.h> using namespace std; int insertionSort(int *A, int n, int g, int cnt) { for (int i=g; i<N; i++) { int v = A[i]; int j = i - g; while(j>=0 && A[j]>v) { A[j+g] = A[j]; j = j - g; cnt++; } A[j+g] = v; } ...
a.cc: In function 'int insertionSort(int*, int, int, int)': a.cc:5:21: error: 'N' was not declared in this scope 5 | for (int i=g; i<N; i++) { | ^ a.cc: In function 'void shellSort(int*, int)': a.cc:23:19: error: 'sqrt' was not declared in this scope 23 | int m = (int)(sqrt(n));...
s372317733
p02262
C++
#include <stdio.h> using namespace std; int insertionSort(int *A, int n, int g, int cnt) { for (int i=g; i<n; i++) { int v = A[i]; int j = i - g; while(j>=0 && A[j]>v) { A[j+g] = A[j]; j = j - g; cnt++; } A[j+g] = v; } ...
a.cc: In function 'void shellSort(int*, int)': a.cc:23:19: error: 'sqrt' was not declared in this scope 23 | int m = (int)(sqrt(n)); | ^~~~
s748530290
p02262
C++
#include <stdio.h> using namespace std; int insertionSort(int *A, int n, int g, int cnt) { for (int i=g; i<n; i++) { int v = A[i]; int j = i - g; while(j>=0 && A[j]>v) { A[j+g] = A[j]; j = j - g; cnt++; } A[j+g] = v; } ...
a.cc: In function 'void shellSort(int*, int)': a.cc:23:18: error: 'sqrt' was not declared in this scope 23 | int m = (int)sqrt(n); | ^~~~
s999793967
p02262
C++
#include <stdio.h> #include <math.h> int insertionSort(int *A, int n, int g, long cnt) { for (int i=g; i<n; i++) { int v = A[i]; int j = i - g; while(j>=0 && A[j]>v) { A[j+g] = A[j]; j = j - g; cnt++; } A[j+g] = v; } ...
a.cc: In function 'void shellSort(int*, int)': a.cc:25:5: error: 'vector' was not declared in this scope 25 | vector<int> G; | ^~~~~~ a.cc:25:12: error: expected primary-expression before 'int' 25 | vector<int> G; | ^~~ a.cc:29:11: error: request for member 'push_back' in 'G', w...
s647446626
p02262
C++
#include <stdio.h> #include <math.h> #include <vector> int insertionSort(int *A, int n, int g, long cnt) { for (int i=g; i<n; i++) { int v = A[i]; int j = i - g; while(j>=0 && A[j]>v) { A[j+g] = A[j]; j = j - g; cnt++; } A[j+g] = ...
a.cc: In function 'void shellSort(int*, int)': a.cc:26:5: error: 'vector' was not declared in this scope 26 | vector<int> G; | ^~~~~~ a.cc:26:5: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h:428:11:...
s512736120
p02262
C++
#include <stdio.h> #include <math.h> #include <vector> using namespace std; int insertionSort(int *A, int n, int g, long cnt) { for (int i=g; i<n; i++) { int v = A[i]; int j = i - g; while(j>=0 && A[j]>v) { A[j+g] = A[j]; j = j - g; cnt++; ...
a.cc: In function 'void shellSort(int*, int)': a.cc:27:17: error: conflicting declaration 'std::vector<int> G' 27 | vector<int> G; | ^ a.cc:26:9: note: previous declaration as 'int G [m]' 26 | int G[m]; | ^ a.cc:31:11: error: request for member 'push_back' in 'G', which...
s237737646
p02262
C++
#include <stdio.h> #include <math.h> #include <vector> using namespace std; int insertionSort(int *A, int n, int g, long cnt) { for (int i=g; i<n; i++) { int v = A[i]; int j = i - g; while(j>=0 && A[j]>v) { A[j+g] = A[j]; j = j - g; cnt++; ...
a.cc: In function 'void shellSort(int*, int)': a.cc:48:32: error: expected ';' before 'i' 48 | for (int i=G.size()-1; i>=0 i--) printf(" %d", G[i]); | ^~ | ;
s216119279
p02262
C++
// // Created by yoshihito.hotta on 2018/06/11. // #include <iostream> using namespace std; int insertionSort(int *A, int n, int g, int cnt) { for (int i = g, i < n; i++) { int v = A[i]; int j = i- g; while (j >= 0 && A[i] > v) { A[j+g] = A[j]; j = j -g ; ...
a.cc: In function 'int insertionSort(int*, int, int, int)': a.cc:9:22: error: expected ';' before '<' token 9 | for (int i = g, i < n; i++) { | ^~ | ; a.cc:9:23: error: expected primary-expression before '<' token 9 | for (int i = g, i < n; i++) { ...
s582554966
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; void insertionSort(int A[], int n, int g) { for ( int i = g; i < n; i++ ) { int v = A[i]; int j = i - g; while( j >= 0 && A[j] > v ) { A[j + g...
a.cc: In function 'void shellSort(int*, int)': a.cc:34:1: error: 'insetionSort' was not declared in this scope; did you mean 'insertionSort'? 34 | insetionSort(A, n, G[i]); | ^~~~~~~~~~~~ | insertionSort
s019220352
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; void insertionSort(int A[], int n, int g) { for ( int i = g; i < n; i++ ) { int v = A[i]; int j = i - g; while( j >= 0 && A[j] > v ) { A[j + g...
a.cc: In function 'void shellSort(int*, int)': a.cc:34:1: error: 'insetionSort' was not declared in this scope; did you mean 'insertionSort'? 34 | insetionSort(A, n, G[i]); | ^~~~~~~~~~~~ | insertionSort
s682617242
p02262
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; void insertionSort(int A[], int n, int g) { for ( int i = g; i < n; i++ ) { int v = A[i]; int j = i - g; while( j >= 0 && A[j] > v ) { A[j + g...
a.cc: In function 'void shellSort(int*, int)': a.cc:34:1: error: 'insetionSort' was not declared in this scope; did you mean 'insertionSort'? 34 | insetionSort(A, n, G[i]); | ^~~~~~~~~~~~ | insertionSort
s892637554
p02262
C++
#include<iostream> #include<algorithm> #include<cstdin> using namespace std; int cnt, m; int G[100]={1}; void insertionSort(int *A, int n, int g){ for(int i=g;i<n;i++){ int v=A[i]; int j=i-g; while(j>=0&&A[j]>v){ A[j+g]=A[j]; j-=g; cnt++; } A[j+g]=v; } } void shellSort(in...
a.cc:3:9: fatal error: cstdin: No such file or directory 3 | #include<cstdin> | ^~~~~~~~ compilation terminated.
s258775962
p02262
C++
#include <iostream> #include <cmath> #include <vector> #include <algorithm> #include <cstdio> using namespace std; long long cnt; int A[1000000]; int n; int l; vector<int> G; void insertionSort(int A[], int n, int g){ for( int i=g; i<n; i++){ int v = A[i]; int j = i-g; while(j >= 0 && A[j] > v){ ...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:21:13: error: expected ';' before 'A' 21 | A[j+g] A[j]; | ^~ | ;
s822417999
p02262
C++
#include<iostream> #include<vector> using namespace std; int cnt=0; int A[1000000]; vector<int> G; void insertionSort(int A[],int n, int g){ int cnt=0; for(int i=g;i<n;++i){ v=a[i]; j=i-g; while(j>=0 && a[j]>v){ a[j+g]=a[j]; j-=g; cnt++; } ...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:12:9: error: 'v' was not declared in this scope 12 | v=a[i]; | ^ a.cc:12:11: error: 'a' was not declared in this scope 12 | v=a[i]; | ^ a.cc:13:9: error: 'j' was not declared in this scope 13 | j=...
s753339778
p02262
C++
#include<iostream> #include<vector> using namespace std; int cnt=0; int A[1000000]; vector<int> G; void insertionSort(int A[],int n, int g){ int cnt=0; int v; for(int i=g;i<n;++i){ v=a[i]; j=i-g; while(j>=0 && a[j]>v){ a[j+g]=a[j]; j-=g; cnt++; ...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:13:11: error: 'a' was not declared in this scope 13 | v=a[i]; | ^ a.cc:14:9: error: 'j' was not declared in this scope 14 | j=i-g; | ^ a.cc: At global scope: a.cc:38:3: warning: ISO C++ forbids declaration o...
s404568896
p02262
C++
#include<iostream> #include<vector> using namespace std; int cnt=0; int A[1000000]; vector<int> G; void insertionSort(int A[],int n, int g){ int cnt=0; int v; for(int i=g;i<n;++i){ v=A[i]; j=i-g; while(j>=0 && A[j]>v){ A[j+g]=A[j]; j-=g; cnt++; ...
a.cc: In function 'void insertionSort(int*, int, int)': a.cc:14:9: error: 'j' was not declared in this scope 14 | j=i-g; | ^ a.cc: At global scope: a.cc:38:3: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 38 | main(){ | ^~~~
s907880636
p02262
C++
#include<iostream> #include<csdio> #include<algorythm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; void insertionSort(int A[],int n,int g){ for(int i = g; i < n; i++){ int v = A[i]; int j = i - g; while(j>= 0 && A[j] > v...
a.cc:2:9: fatal error: csdio: No such file or directory 2 | #include<csdio> | ^~~~~~~ compilation terminated.
s089051957
p02262
C++
#include<iostream> #include<cstdio> #include<algorythm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; void insertionSort(int A[],int n,int g){ for(int i = g; i < n; i++){ int v = A[i]; int j = i - g; while(j>= 0 && A[j] > ...
a.cc:3:9: fatal error: algorythm: No such file or directory 3 | #include<algorythm> | ^~~~~~~~~~~ compilation terminated.
s435545996
p02262
C++
#include <cstdio> #include <vector> using namespace std; int cnt; void insertionSort(vector<int> &a,int g){ for(int i=g;i<a.size();i++){ int v = a[i]; int j = i - g; while(j>=0 && a[j]>v){ a[j+g] = a[j]; j = j - g; cnt++; a[j+g] = v; } } } void shellSort(vector<int> &a){ vector<int>g; cnt = 0;...
a.cc: In function 'void shellSort(std::vector<int>&)': a.cc:23:9: error: 'reverse' was not declared in this scope 23 | reverse(g.begin(),g.end()); | ^~~~~~~
s349654991
p02263
Java
import java.util.*; class Stack<E> { E[] arr; int top; int MAX; public Stack(int max) { this.MAX = max; arr = (E[]) new Object[max]; } void initialize() { top = 0; } boolean isEmpty() { return top == 0; } boolean isFull() { return top ...
Main.java:42: error: class ALDS1_3_A is public, should be declared in a file named ALDS1_3_A.java public class ALDS1_3_A { ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s613564572
p02263
Java
public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String[] input = scan.nextLine().split(" "); Deque<Integer> stack = new ArrayDeque<Integer>(); for(int i = 0; i < input.length; i++) { if(input[i].equals("+") || input[i].equals("-") || input[i].equal...
Main.java:4: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find sym...
s696183580
p02263
Java
import java.util.Scanner; import java.util.Stack; public class ReversePolishNotation { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String[] values = scanner.nextLine().split(" "); calcurate(values); } private static void calcurate(String[] va...
Main.java:4: error: class ReversePolishNotation is public, should be declared in a file named ReversePolishNotation.java public class ReversePolishNotation { ^ 1 error
s386637819
p02263
Java
import java.io.*; import java.util.*; class IntStack { private int pointer=-1; ArrayList<Integer> stack; IntStack(){ stack=new ArrayList(); } public void push(int a){ stack.add(a); pointer++; } public int pop(){ int a=stack.get(pointer); stack.remove(pointer); pointer--; return a; } public Str...
Main.java:31: error: class Main103a is public, should be declared in a file named Main103a.java public class Main103a { ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s139447713
p02263
Java
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner s = new Scanner(System.in); StackImpl e = new Stack().new StackImpl(); // while(s.hasNext()) { String[] line = s.nextLine().split(" "); for(int i=0 ; i<line.length ; i++) { if("+".equals(line[i])) { int b...
Main.java:8: error: cannot find symbol StackImpl e = new Stack().new StackImpl(); ^ symbol: class Stack location: class Main Main.java:25: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal e.push(new Integer(line[i]).intValue()); ^ 1 erro...
s886796054
p02263
Java
class Stack{ private int[] StackArray; private final int maxSize = 100; private int top; public Stack(){ StackArray = new int[maxSize]; top = -1; } public int pop(){ return StackArray[top--]; } public void push(int o){ StackArray[++top] = o; } public int peak(){ return StackArray[top]; } } publi...
Main.java:22: error: cannot find symbol public static void main(String[] args)throws IOException { ^ symbol: class IOException location: class Main Main.java:23: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^...
s379578629
p02263
Java
public class Main { public static final String plus = "+"; public static final String minus = "-"; public static final String aaa = "*"; public static void main(String[] args){ Scanner sc = new Scanner(System.in); String strInt = null; int intStr = 0; int numInt1 = 0; int numInt2 = 0; int total = 0; ...
Main.java:8: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:14: error: cannot find symbol ...
s237216739
p02263
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; class Main { public static void main(String args[]) throws IOException{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); String str ...
Main.java:45: error: reached end of file while parsing System.out.println(stack.pop()); ^ 1 error
s899028258
p02263
Java
import java.util.Scanner; import java.util.Stack; public class Main4 { public static void main(String [] args){ Stack<Integer> stack = new Stack<Integer>(); Scanner scanner = new Scanner(System.in); String string = scanner.nextLine(); String [ ] strings = string.split(" "); int size = strings.length; int...
Main.java:5: error: class Main4 is public, should be declared in a file named Main4.java public class Main4 { ^ 1 error
s260107100
p02263
Java
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()){ String input = scan.next(); String in2 = formula.poll(); ...
Main.java:31: error: cannot find symbol if(ans==(int)ans){ ^ symbol: variable ans location: class Main Main.java:31: error: cannot find symbol if(ans==(int)ans){ ^ symbol: variable ans location: class Main Main.java:32: error: cannot find symbol Sy...
s930269445
p02263
Java
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()){ String input = scan.next(); String in2 = formula.poll(); ...
Main.java:31: error: '.class' expected if(double ans==(int)ans){ ^ Main.java:31: error: not a statement if(double ans==(int)ans){ ^ Main.java:31: error: ';' expected if(double ans==(int)ans){ ^ Main.java:33: error: 'else' with...
s372799083
p02263
Java
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()){ String input = scan.next(); switch(input){ ...
Main.java:27: error: ')' expected if((ans=Double.parseDouble(formula.poll())==(int)ans){ ^ 1 error
s490412857
p02263
Java
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()){ String input = scan.next(); switch(input){ ...
Main.java:27: error: ',', ')', or '[' expected if((Double ans=Double.parseDouble(formula.poll())==(int)ans){ ^ 1 error
s192057516
p02263
Java
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()){ String input = scan.next(); switch(input){ ...
Main.java:27: error: cannot find symbol if((ans=Double.parseDouble(formula.poll()))==(int)ans){ ^ symbol: variable ans location: class Main Main.java:27: error: cannot find symbol if((ans=Double.parseDouble(formula.poll()))==(int)ans){ ...
s173583161
p02263
Java
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()){ String input = scan.next(); switch(input){ ...
Main.java:27: error: ',', ')', or '[' expected if((Double ans=Double.parseDouble(formula.poll()))==(int)ans){ ^ Main.java:27: error: illegal start of expression if((Double ans=Double.parseDouble(formula.poll()))==(int)ans){ ...
s443279187
p02263
Java
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while((String input=scan.Next())!=NULL){ switch(input){ case "+": ...
Main.java:7: error: ',', ')', or '[' expected while((String input=scan.Next())!=NULL){ ^ Main.java:7: error: illegal start of expression while((String input=scan.Next())!=NULL){ ^ Main.java:7: error: ';' expected while((String in...
s639700440
p02263
Java
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()){ String input = scan.next(); if(input.equals("+")) input = S...
Main.java:10: error: ')' expected else if(input.equals("-") input = String.valueOf(-1*Integer.ParseInt(formula.poll())+Integer.ParseInt(formula.poll())); ^ Main.java:11: error: ')' expected else if(input.equals("*") input = String.valueOf(Integer.ParseInt(for...
s650604582
p02263
Java
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()){ String input = scan.next(); if(input.equals("+")) input = S...
Main.java:10: error: ')' expected else if(input.equals("-") input = String.valueOf(-1*Integer.parseInt(formula.poll())+Integer.parseInt(formula.poll())); ^ Main.java:11: error: ')' expected else if(input.equals("*") input = String.valueOf(Integer.parseInt(for...
s784725904
p02263
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()) { String input = scan.next(); int num2,num1;...
Main.java:45: error: method push in interface Deque<E> cannot be applied to given types; System.out.printf(formula.push()); ^ required: String found: no arguments reason: actual and formal argument lists differ in length where E is a type-variable: E extends Objec...
s089866093
p02263
Java
import java.io.*; import java.util.*; public class Stack { public static void main(String[] args) { Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()) { String input = scan.next(); int num2,num1...
Main.java:4: error: class Stack is public, should be declared in a file named Stack.java public class Stack ^ 1 error
s190029517
p02263
Java
import java.util.*; public class Test { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); String next; int op1, op2; Stack<Integer> stack = new Stack<Integer>(); while(scanner.hasNext()){ next = scanner.next(); switch(next){ case "+": op1 = stack.pop(); o...
Main.java:3: error: class Test is public, should be declared in a file named Test.java public class Test { ^ 1 error
s230063554
p02263
Java
import java.util.*; import java.lang.Object; public class stack{ public static void main(String[] args) { int i,flag,temp; char c; Deque<Integer> stack = new ArrayDeque<Integer>(); Scanner sc = new Scanner(System.in); String str = sc.nextLine(); flag = 1; temp = 0; for(i=0;i<str.length()...
Main.java:9: error: class stack is public, should be declared in a file named stack.java public class stack{ ^ 1 error
s613108067
p02263
Java
import java.util.*; import java.lang.Object; public class postack{ public static void main(String[] args) { int i,flag,temp; char c; Deque<Integer> stack = new ArrayDeque<Integer>(); Scanner sc = new Scanner(System.in); String str = sc.nextLine(); flag = 0; temp = 0; for(i=0;i<str.length...
Main.java:9: error: class postack is public, should be declared in a file named postack.java public class postack{ ^ 1 error
s319954142
p02263
Java
import java.util.Scanner; import java.util.Stack; /** * Created by ??\??? on 2016/12/6. */ public class ALDS1_3_A { static boolean isNum(String s){ char[] array = s.toCharArray(); int flag = 0; if(array[0]=='-'&&s.length()>1) flag = 1; for (char c : array) { ...
Main.java:7: error: class ALDS1_3_A is public, should be declared in a file named ALDS1_3_A.java public class ALDS1_3_A { ^ 1 error
s469082326
p02263
Java
import java.util.Scanner; public class Main { static int[] str = new int[100]; static int i = 0; static void push(int k) { if (isFull()==false){ i++; str[i] = k; } else{ System.out.print("?????????????????????"); } } static int pop() { if (isEmpty()==false){ i--; return str[i+1]; } e...
Main.java:47: error: cannot find symbol public static void main(String[] args)throws IOException{ ^ symbol: class IOException location: class Main 1 error
s480114836
p02263
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class main { static StringBuilder builder = new StringBuilder(); public static void main(String[] args) throws NumberFormatException, IOException { BufferedRead...
Main.java:6: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s416140888
p02263
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[\\s]+"); private static final MAX = 101; private static int[] st = new int[MAX]: private int top; public static void main(String[] args){ initialize(); while(scan.hasNext()){ String[]...
Main.java:6: error: <identifier> expected private static final MAX = 101; ^ Main.java:7: error: ';' expected private static int[] st = new int[MAX]: ^ Main.java:23: error: ';' expected int n3 = pop() ^ Main.java:39: error: invalid...
s761828787
p02263
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[\\s]+"); private static final int MAX = 101; private static int[] st = new int[MAX]; private int top; public static void main(String[] args){ initialize(); while(scan.hasNext()){ Stri...
Main.java:14: error: cannot find symbol String[] cmd = nextLine(); ^ symbol: method nextLine() location: class Main Main.java:40: error: non-static variable top cannot be referenced from a static context top = 0; ^ Main.java:43: error: non-static variable top cannot be referenced from a s...
s836130724
p02263
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[\\s]+"); private static final int MAX = 101; private static int[] st = new int[MAX]; private static int top; public static void main(String[] args){ initialize(); while(scan.hasNext()){ ...
Main.java:14: error: incompatible types: String cannot be converted to String[] String[] cmd = scan.nextLine(); ^ 1 error
s021123078
p02263
Java
import java.util.Scanner; class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); String str = scan.nextLine(); Stack<Integer> stack = new Stack<Integer>(); int x = 0; int y = 0; int tmp = 0; for(int i = 0; i < str.length(); i++){ switch(str.charAt(i)) { ...
Main.java:7: error: cannot find symbol Stack<Integer> stack = new Stack<Integer>(); ^ symbol: class Stack location: class Main Main.java:7: error: cannot find symbol Stack<Integer> stack = new Stack<Integer>(); ^ symbol: class Stack location: class Main 2 errors
s561388715
p02263
Java
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); String[] all = line.split(" "); ArrayList<Integer> allint = new ArrayList<Integer>(); for (int i = 0; i < all.length; i+...
Main.java:54: error: invalid method declaration; return type required public Test03_1(String n) { ^ 1 error
s467670236
p02263
Java
import java.util.Scanner; public class Stack { static int top = 0; static int[] S = new int[101]; static void push(int x) { S[++top] = x; } static int pop() { top--; return S[top + 1]; } public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); String s; ...
Main.java:3: error: class Stack is public, should be declared in a file named Stack.java public class Stack { ^ 1 error