Submission #345536

#TimeUsernameProblemLanguageResultExecution timeMemory
345536NursikFeast (NOI19_feast)C++14
4 / 100
51 ms4588 KiB
#include <bits/stdc++.h> #define f first #define s second #define ll long long #define pb push_back #define all(v) v.begin(),v.end() #define ld long double using namespace std; void data() { #ifdef NURS freopen("main.in", "r", stdin); freopen("main.out", "w", stdout); #endif } void win() { ios_base::sync_with_stdio(0), cin.tie(0),cout.tie(0); } int block = 400; const ld eps = 1e-6; const int N = 1e6 + 500; const int mod = 1e9 + 7; const ll hh = 100010683; const ll hh2 = 150005819; int n, k; int a[N]; ll s; int main() { data(); win(); cin >> n >> k; bool was = 0; for (int i = 1; i <= n; i++) { cin >> a[i]; was = was | (a[i] < 0); s += a[i]; } //first subtask if (was == 0) { cout << s << '\n'; return 0; } if (k == 1) { for (int i = 1; i <= n; 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...