Submission #17465803
Source Code Expand
Copy
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; double arr[n]; for(int i = 0; i < n; i++) { cin >> arr[i]; if(arr[i] < 0) arr[i] = -arr[i]; } double m = 0, e = 0, c = 0; for(int i = 0; i < n; i++) { m += arr[i]; e += (arr[i] * arr[i]); c = max(c, arr[i]); } cout << m << '\n'; cout << setprecision(30) << pow(e, 0.5) << '\n'; cout << c; }
Submission Info
Submission Time | |
---|---|
Task | B - Various distances |
User | AI_SAR |
Language | C++ (GCC 9.2.1) |
Score | 0 |
Code Size | 490 Byte |
Status | WA |
Exec Time | 38 ms |
Memory | 5008 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | hand_01.txt, hand_02.txt, hand_03.txt, hand_10.txt, hand_11.txt, hand_12.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
hand_01.txt | AC | 16 ms | 4824 KB |
hand_02.txt | AC | 22 ms | 4824 KB |
hand_03.txt | AC | 24 ms | 4824 KB |
hand_10.txt | AC | 2 ms | 4032 KB |
hand_11.txt | AC | 2 ms | 4140 KB |
hand_12.txt | AC | 22 ms | 4876 KB |
random_01.txt | WA | 24 ms | 4872 KB |
random_02.txt | WA | 7 ms | 4120 KB |
random_03.txt | WA | 35 ms | 4880 KB |
random_04.txt | WA | 22 ms | 4644 KB |
random_05.txt | WA | 24 ms | 4884 KB |
random_06.txt | WA | 8 ms | 4208 KB |
random_07.txt | WA | 38 ms | 5008 KB |
random_08.txt | WA | 18 ms | 4568 KB |
random_09.txt | WA | 30 ms | 4936 KB |
random_10.txt | WA | 4 ms | 4120 KB |
sample_01.txt | AC | 2 ms | 4092 KB |
sample_02.txt | AC | 4 ms | 4084 KB |