On plagiarism of contest 187

Contest 187 Q4:

aruba1(ranks 41)
image

Cicindela(ranks 39)
image

Diff check report: https://www.diffchecker.com/BaOaKroX
Moss Similarity report: http://moss.stanford.edu/results/4/6788702440421/match0.html

Q2:

Cicindela:

class Solution {

	public boolean kLengthApart(int[] nums, int k) {
		int last = -1;
		int mi = 9999999;
		for (int i = 0; i < nums.length; i++) {
			if (nums[i] == 1) {
				if (last < 0) {
					last = i;
				} else {
					mi = Math.min(mi, i - last);
					last = i;
				}
			}
		}
		return mi >= k + 1;
	}
}

aruba1:

class Solution {
public:
    bool kLengthApart(vector<int>& nums, int k) {
        int last = -1;
        int mi = 9999999;
        for(int i = 0; i < nums.size(); i++) {
            if(nums[i] == 1) {
                if(last < 0) last = i;
                else {
                    mi = min(mi, i - last);
                 last = i;
                }
            }         
        }
        return mi >= k+1;
        
    }
};

What are the rules regarding copying code?
How does leetcode detect plagiarism?
Why leetcode did not respond to the report?
Is the report cheating button just a placebo?

Comments (56)