/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 336.0 KiB
#2 Wrong Answer 2ms 540.0 KiB
#3 Accepted 2ms 520.0 KiB
#4 Wrong Answer 2ms 328.0 KiB

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
Submission
Problem
P1042 Array partition
Contest
TLE_Headquarters - round #1
Language
C++20 (G++ 13.2.0)
Submit At
2024-03-27 16:56:18
Judged At
2024-11-11 03:37:54
Judged By
Score
15
Total Time
2ms
Peak Memory
540.0 KiB