# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1019213 | Marco_Escandon | Room Temperature (JOI24_ho_t1) | C++11 | 1 ms | 400 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const string ny[2] = {"No", "Yes"};
int main() {
ll n,k;
cin>>n>>k;
ll cad[n];
ll bs=0;
for(int i=0; i<n; i++)
{
cin>>cad[i];
cad[i]=cad[i]%k;
if(cad[i]<k-cad[i])
cad[i]+=k;
}
sort(cad,cad+n);
cout<<(cad[n-1]-cad[0]+1)/2;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |