Submission #239045

#TimeUsernameProblemLanguageResultExecution timeMemory
239045NONAMEVrtić (COCI18_vrtic)C++17
0 / 160
5 ms384 KiB
#include <iostream> #include <vector> #include <queue> #include <fstream> #include <algorithm> using namespace std; using ll = long long; const int N = 2e5 + 10; const ll oo = 1e18; int n, a[N]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n; for (int i = 0; i < n; ++i) { int x; cin >> x; } for (int i = 0; i < n; ++i) cin >> a[i]; sort(a, a + n); cout << a[n - 1] - a[0] << "\n"; for (int i = 0; i < n; ++i) cout << a[i] << ' '; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...