Submission #345536

# Submission time Handle Problem Language Result Execution time Memory
345536 2021-01-07T14:39:09 Z Nursik Feast (NOI19_feast) C++14
4 / 100
51 ms 4588 KB
#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 time Memory Grader output
1 Correct 45 ms 4336 KB Output is correct
2 Correct 38 ms 4324 KB Output is correct
3 Correct 35 ms 4460 KB Output is correct
4 Correct 38 ms 4332 KB Output is correct
5 Correct 40 ms 4332 KB Output is correct
6 Correct 36 ms 4332 KB Output is correct
7 Correct 37 ms 4332 KB Output is correct
8 Correct 43 ms 4332 KB Output is correct
9 Correct 38 ms 4332 KB Output is correct
10 Correct 51 ms 4380 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 2668 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 50 ms 4588 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 412 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 412 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 412 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 45 ms 4336 KB Output is correct
2 Correct 38 ms 4324 KB Output is correct
3 Correct 35 ms 4460 KB Output is correct
4 Correct 38 ms 4332 KB Output is correct
5 Correct 40 ms 4332 KB Output is correct
6 Correct 36 ms 4332 KB Output is correct
7 Correct 37 ms 4332 KB Output is correct
8 Correct 43 ms 4332 KB Output is correct
9 Correct 38 ms 4332 KB Output is correct
10 Correct 51 ms 4380 KB Output is correct
11 Incorrect 28 ms 2668 KB Output isn't correct
12 Halted 0 ms 0 KB -