제출 #431058

#제출 시각아이디문제언어결과실행 시간메모리
431058MOUF_MAHMALAT식물 비교 (IOI20_plants)C++14
0 / 100
1 ms256 KiB
#include "plants.h" #include<bits/stdc++.h> using namespace std; typedef int ll; vector<ll>v; ll k,a[200009],n; void init(int K, vector<int> r) { v=r,n=v.size(); for(ll i=0; i<n; i++) { if(v[i]) a[(i+1)%n]=a[i]-1; else a[(i+1)%n]=a[i]+1; } } int compare_plants(int x, int y) { if(a[x]==a[y]) return 0; if(a[x]>a[y]) return 1; return -1; }
#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...