Submission #831375

#TimeUsernameProblemLanguageResultExecution timeMemory
831375Dremix10Comparing Plants (IOI20_plants)C++17
0 / 100
1 ms300 KiB
#include "plants.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pi; typedef pair<ll,ll> pl; #define F first #define S second #define all(x) (x).begin(),(x).end() const int N = 3e5+5; const int MOD = 1e9+7; const ll INF = 1e18+5; #ifdef dremix #define p2(x,y) cerr<<#x<<", "<<#y<<" = "<<x<<", "<<y<<endl; #else #define p2(x,y) {} #endif vector<int> r; int n; void init(int k, vector<int> R) { r = R; n = R.size(); return; } int compare_plants(int x, int y) { int ret = 1; if(x==0 && y==n-1){ if(r[y] == 0)ret = -1; } else if(x + 1 == y){ if(r[x] == 1)ret = -1; } else{ ret = 0; } return ret; }
#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...