0_0_35885858_1458\Main.java:1: 错误: 需要class, interface或enum
Given a unsorted array with integers, find the median of it.
^
0_0_35885858_1458\Main.java:13: 错误: 非法的类型开始
public:
^
0_0_35885858_1458\Main.java:13: 错误: 需要';'
public:
^
0_0_35885858_1458\Main.java:18: 错误: 方法声明无效; 需要返回类型
int median(vector<int> &nums) {
^
0_0_35885858_1458\Main.java:18: 错误: 需要<标识符>
int median(vector<int> &nums) {
^
0_0_35885858_1458\Main.java:18: 错误: 需要';'
int median(vector<int> &nums) {
^
0_0_35885858_1458\Main.java:18: 错误: 非法的类型开始
int median(vector<int> &nums) {
^
0_0_35885858_1458\Main.java:18: 错误: 需要<标识符>
int median(vector<int> &nums) {
^
0_0_35885858_1458\Main.java:18: 错误: 需要';'
int median(vector<int> &nums) {
^
0_0_35885858_1458\Main.java:20: 错误: 需要<标识符>
int sz = nums.size();
^
0_0_35885858_1458\Main.java:21: 错误: 非法的类型开始
if(sz == 0)
^
0_0_35885858_1458\Main.java:21: 错误: 需要<标识符>
if(sz == 0)
^
0_0_35885858_1458\Main.java:21: 错误: 需要';'
if(sz == 0)
^
0_0_35885858_1458\Main.java:21: 错误: 非法的类型开始
if(sz == 0)
^
0_0_35885858_1458\Main.java:21: 错误: 需要<标识符>
if(sz == 0)
^
0_0_35885858_1458\Main.java:22: 错误: 需要';'
return -1;
^
0_0_35885858_1458\Main.java:22: 错误: 非法的类型开始
return -1;
^
0_0_35885858_1458\Main.java:22: 错误: 需要<标识符>
return -1;
^
0_0_35885858_1458\Main.java:22: 错误: 需要';'
return -1;
^
0_0_35885858_1458\Main.java:23: 错误: 方法声明无效; 需要返回类型
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 需要<标识符>
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 非法的类型开始
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 需要<标识符>
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 需要';'
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 非法的类型开始
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 需要<标识符>
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 需要';'
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 非法的类型开始
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 需要<标识符>
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 需要';'
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 非法的类型开始
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 需要<标识符>
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:23: 错误: 需要';'
return medianHelper(nums, 0, sz-1, (sz+1)/2);
^
0_0_35885858_1458\Main.java:26: 错误: 需要class, interface或enum
int medianHelper(vector<int> &nums, int lo, int hi, int k){
^
0_0_35885858_1458\Main.java:28: 错误: 需要class, interface或enum
int j = hi - 1;
^
0_0_35885858_1458\Main.java:29: 错误: 需要class, interface或enum
int mid = nums[lo + (k-1)];
^
0_0_35885858_1458\Main.java:30: 错误: 需要class, interface或enum
swap(nums[lo + (k-1)], nums[hi]);
^
0_0_35885858_1458\Main.java:31: 错误: 需要class, interface或enum
while(i<=j){
^
0_0_35885858_1458\Main.java:34: 错误: 需要class, interface或enum
else
^
0_0_35885858_1458\Main.java:36: 错误: 需要class, interface或enum
}
^
0_0_35885858_1458\Main.java:39: 错误: 需要class, interface或enum
int less = i - lo + 1;
^
0_0_35885858_1458\Main.java:40: 错误: 需要class, interface或enum
if(less == k)
^
0_0_35885858_1458\Main.java:42: 错误: 需要class, interface或enum
if(less > k)
^
0_0_35885858_1458\Main.java:44: 错误: 需要class, interface或enum
else{
^
0_0_35885858_1458\Main.java:46: 错误: 需要class, interface或enum
}
^
45 个错误
|