Submission #204050

#TimeUsernameProblemLanguageResultExecution timeMemory
204050SegtreeBoxes with souvenirs (IOI15_boxes)C++14
10 / 100
5 ms376 KiB
#include"boxes.h" #include<iostream> #include<algorithm> #include<vector> using namespace std; typedef long long ll; #define chmin(a,b) a=min(a,b) #define chmax(a,b) a=max(a,b) #define rep(i,n) for(int i=0;i<n;i++) #define mod 1000000007 #define mad(a,b) a=(a+b)%mod ll delivery(int N,int K,int L,int P[]){ if(K==1){ ll ans=0; rep(i,N)ans+=min(P[i],L-P[i]); return ans*2; } return 0; }/* int main(){ int n,k,l,p[110]; cin>>n>>k>>l; rep(i,n){ cin>>p[i]; } cout<<delivery(n,k,l,p)<<endl; }*/
#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...