# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
833129 | 2023-08-22T01:53:10 Z | josanneo22 | Feast (NOI19_feast) | C++17 | 26 ms | 4436 KB |
#include <bits/stdc++.h> using namespace std; #define ld long double #define mp make_pair #define pb push_back #define pii pair<int,int> #define fi first #define se second #define all(x) x.begin(), x.end() #define ar array void solve(){ int n,k; cin>>n>>k; vector<int> a(n); for(int i=0;i<n;i++) cin>>a[i]; if(*min_element(a.begin(),a.end())>=0){ cout<<accumulate(a.begin(),a.end(),0LL)<<'\n';} } signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); clock_t tStart = clock(); int local=0,multi=0,debug=1,tt=1; if(local){ freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); } if(multi) cin>>tt; for(int i=1;i<=tt;i++){ if(debug && multi && local) cout<<"样例 "<<i<<'\n'; solve(); } fprintf(stderr, "\n>> Runtime: %.10fs\n", (double) (clock() - tStart) / CLOCKS_PER_SEC); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 23 ms | 4136 KB | Output is correct |
2 | Correct | 23 ms | 4300 KB | Output is correct |
3 | Correct | 24 ms | 4300 KB | Output is correct |
4 | Correct | 25 ms | 4308 KB | Output is correct |
5 | Correct | 25 ms | 4308 KB | Output is correct |
6 | Correct | 24 ms | 4172 KB | Output is correct |
7 | Correct | 23 ms | 4172 KB | Output is correct |
8 | Correct | 24 ms | 4304 KB | Output is correct |
9 | Correct | 24 ms | 4172 KB | Output is correct |
10 | Correct | 24 ms | 4180 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 15 ms | 2516 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 26 ms | 4436 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 23 ms | 4136 KB | Output is correct |
2 | Correct | 23 ms | 4300 KB | Output is correct |
3 | Correct | 24 ms | 4300 KB | Output is correct |
4 | Correct | 25 ms | 4308 KB | Output is correct |
5 | Correct | 25 ms | 4308 KB | Output is correct |
6 | Correct | 24 ms | 4172 KB | Output is correct |
7 | Correct | 23 ms | 4172 KB | Output is correct |
8 | Correct | 24 ms | 4304 KB | Output is correct |
9 | Correct | 24 ms | 4172 KB | Output is correct |
10 | Correct | 24 ms | 4180 KB | Output is correct |
11 | Incorrect | 15 ms | 2516 KB | Output isn't correct |
12 | Halted | 0 ms | 0 KB | - |