제출 #427666

#제출 시각아이디문제언어결과실행 시간메모리
427666lakshith_식물 비교 (IOI20_plants)C++14
0 / 100
1 ms204 KiB
#include "plants.h" #include <bits/stdc++.h> using namespace std; vector<int> r; int n; void init(int k, std::vector<int> R) { assert(k==2); r=R; n = R.size(); return; } int compare_plants(int x, int y) { if(x>y)swap(x,y); int one=0,zero=0; for(int i=x;i<y;i++){ if(r[i]==1)one++; else zero++; } if(zero==0)return 1; else if(one==0)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...