Submission #411129

#TimeUsernameProblemLanguageResultExecution timeMemory
411129eagle30Comparing Plants (IOI20_plants)C++14
0 / 100
1 ms332 KiB
#include "plants.h" #include<bits/stdc++.h> using namespace std; int pref[1000000], n; void init(int k, vector<int> r) { n=r.size(); pref[0]=r[0]; for(int i=1; i<n; i++){ pref[i]=pref[i-1]+r[i]; } return; } int compare_plants(int x, int y) { int u=pref[y-1]-pref[x-1]; if(u==y-x) return 1; else if(u==0) return -1; else return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...