Submission #814698

#TimeUsernameProblemLanguageResultExecution timeMemory
814698vjudge1Comparing Plants (IOI20_plants)C++17
0 / 100
1 ms300 KiB
#include "plants.h" #include <bits/stdc++.h> //#include "grader.cpp" using namespace std; #define pb push_back #define mp make_pair typedef long long ll; typedef pair<long long, long long> pll; typedef pair<int,int> pii; typedef vector<int> vi; typedef vector<long long> vl; int N, K; vi cmp; void init(int k, vector<int> r) { N = (int)r.size(); K = k; cmp = r; } int compare_plants(int x, int y) { if(K == 2){ if(abs(x-y) > 1) return 0; if(x > y){ if(cmp[y] == 1) return -1; else return 1; } else{ if(cmp[x] == 1) return -1; else 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...