Submission #897536

# Submission time Handle Problem Language Result Execution time Memory
897536 2024-01-03T11:16:36 Z bleahbleah Security Guard (JOI23_guard) C++17
0 / 100
8 ms 1628 KB
#include <bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
using namespace std;

using ll = long long;
using ld = long double;

//#define int ll
#define sz(x) ((int)(x).size())

using pii = pair<int,int>;
using tii = tuple<int,int,int>;

vector<int> S;

signed main() {
  cin.tie(0) -> sync_with_stdio(0);
  int n, m, q;
  cin >> n >> m >> q;
  S.resize(n);
  
  for(auto &x : S) cin >> x;
  
  cout << accumulate(all(S), 0LL) - max(S[0], S.back()) << '\n';
  
  
}

# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 8 ms 1628 KB Output is correct
3 Correct 8 ms 1624 KB Output is correct
4 Incorrect 8 ms 1620 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 8 ms 1628 KB Output is correct
3 Correct 8 ms 1624 KB Output is correct
4 Incorrect 8 ms 1620 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 8 ms 1628 KB Output is correct
3 Correct 8 ms 1624 KB Output is correct
4 Incorrect 8 ms 1620 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 8 ms 1628 KB Output is correct
3 Correct 8 ms 1624 KB Output is correct
4 Incorrect 8 ms 1620 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 352 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 352 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 8 ms 1628 KB Output is correct
3 Correct 8 ms 1624 KB Output is correct
4 Incorrect 8 ms 1620 KB Output isn't correct
5 Halted 0 ms 0 KB -