Submission #411146

# Submission time Handle Problem Language Result Execution time Memory
411146 2021-05-24T12:28:33 Z eagle30 Comparing Plants (IOI20_plants) C++14
0 / 100
1 ms 460 KB
#include "plants.h"
#include<bits/stdc++.h>
using namespace std;
int pref[1000000], n, tot=0;
void init(int k, vector<int> r) {
	n=r.size();
	for(int i=0; i<n; i++){
		tot+=r[i];
		pref[i+1]=pref[i]+r[i];
	}
	return;
}

int compare_plants(int x, int y) {
	int u=pref[y]-pref[x];
	assert(1==0);
	if(u==y-x)
		return -1;
	else if(u==0){
		return 1;
	}
	else{
		assert(1);
		return 0;
	}
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -