Submission #1077940

#TimeUsernameProblemLanguageResultExecution timeMemory
1077940anangoComparing Plants (IOI20_plants)C++17
0 / 100
1 ms440 KiB
#include "plants.h" #include <bits/stdc++.h> using namespace std; int K; int n; vector<int> b; void init(int k, std::vector<int> r) { K=k; b=r; n=r.size(); return; } int compare_plants(int x, int y) { if (K!=2) { return 0; } if ((x+1)%n==y) { if (b[x]==1) { return -1; } return 1; } if ((y+1)%n==x) { if (b[y]==1) { return 1; } return -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...