| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1369689 | Charizard2021 | Room Temperature (JOI24_ho_t1) | C++20 | 121 ms | 4324 KiB |
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n, t;
cin >> n >> t;
vector<long long> a(1 + n);
for(int i = 1; i <= n; i++){
cin >> a[i];
a[i] %= t;
}
sort(a.begin() + 1, a.end());
long long res = 0;
for(int i = 1; i < n; i++){
res = max(res, a[i + 1] - a[i]);
}
res = max(res, a[1] - a[n] + t);
res = t - res;
cout << (res + 1)/2 << "\n";
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
