/ SeriousOJ /

Record Detail

Accepted


  

Code

// Copyright: Mushfiq R.
#include <iostream>
using namespace std;

int main()
{
	long long t, x, n=0, temp=0;
    cin >> t;
	for(int i=0; i<t; i++){
		cin >> x;
		temp += x;
		if(temp%2 == 0){
			n++;
			temp = 0;
		}
	}
	cout << n << endl;
	
	return 0;
}

Information

Submit By
Type
Pretest
Problem
P1042 Array partition
Language
C++20 (G++ 13.2.0)
Submit At
2024-03-27 16:53:40
Judged At
2024-11-11 03:37:56
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes