Submission #961598

#TimeUsernameProblemLanguageResultExecution timeMemory
961598Gr1senComparing Plants (IOI20_plants)C++17
0 / 100
0 ms348 KiB
#include "plants.h" #include<iostream> #include<vector> #include<algorithm> using namespace std; #define vi vector<int> #define vvi vector<vi> vi R; void init(int k, std::vector<int> r) { R = r; } int compare_plants(int x, int y) { int a = R[x]; bool q = 0; for (int i = x+1; i != y; i = (i+1)%R.size()) { if (R[i] != a) {q = 1; break;} } if (!q) return (a ? -1 : 1); a = R[y+1]; for (int i = y+1; i != x; i = (i+1)%R.size()) { if (R[i] != a) {q = 1; break;} } if (!q) return (a ? 1 : -1); 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...