Submission #44262346
Source Code Expand
#ifdef ONPC
#define _GLIBCXX_DEBUG
#else
#pragma GCC optimize("O3")
#pragma unroll
#endif
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
std::cout << setprecision(15) << fixed;
#ifdef ONPC
freopen("../input.txt", "r", stdin);
#endif
int n;
cin >> n;
int a ;
cin >> a;
int mx = (a - 1);
for( int i =0 ;i <n - 1; ++i) {
int b;
cin >> b;
mx = max( b, mx);
}
cout << mx - a + 1 << "\n";
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - To Be Saikyo |
| User | Paliukh |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 658 Byte |
| Status | AC |
| Exec Time | 6 ms |
| Memory | 3536 KiB |
Compile Error
./Main.cpp:5: warning: ignoring #pragma unroll [-Wunknown-pragmas]
5 | #pragma unroll
|
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 02_handmade_00.txt, 02_handmade_01.txt, 02_handmade_02.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 6 ms | 3412 KiB |
| 00_sample_01.txt | AC | 2 ms | 3484 KiB |
| 00_sample_02.txt | AC | 3 ms | 3488 KiB |
| 01_random_00.txt | AC | 2 ms | 3472 KiB |
| 01_random_01.txt | AC | 2 ms | 3536 KiB |
| 01_random_02.txt | AC | 4 ms | 3504 KiB |
| 01_random_03.txt | AC | 2 ms | 3412 KiB |
| 01_random_04.txt | AC | 2 ms | 3476 KiB |
| 01_random_05.txt | AC | 2 ms | 3408 KiB |
| 01_random_06.txt | AC | 2 ms | 3452 KiB |
| 01_random_07.txt | AC | 2 ms | 3476 KiB |
| 01_random_08.txt | AC | 2 ms | 3472 KiB |
| 02_handmade_00.txt | AC | 2 ms | 3532 KiB |
| 02_handmade_01.txt | AC | 3 ms | 3504 KiB |
| 02_handmade_02.txt | AC | 3 ms | 3468 KiB |