| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1364838 | kawhiet | Room Temperature (JOI24_ho_t1) | C++20 | 0 ms | 344 KiB |
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dbg(...) 47
#endif
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, t;
cin >> n >> t;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
a[i] %= t;
}
sort(a.begin(), a.end());
int ans = t;
for (int i = 0; i < n - 1; i++) {
ans = min(ans, abs(a[i] - (a[i + 1] - t)));
}
cout << ans << '\n';
return 0;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
