<commit_before>// Author: <NAME> <<EMAIL>>

#include <stdio.h>

int main(void) {
	int t;
	scanf("%d", &t);
	int a;
	for (a = 0; a < t; a++) {
		int n, m;
		scanf("%d %d", &n, &m);
		int ans = 0;
		int i;
		int flag = 0;
		int ones = 0;
		for (i = 0; i < m; i++) {
			int j;
			scanf("%d", &j);
			if (j == 1)
				ones ++;
		}
		int not_ones = m - ones;
		while (m != 1) {
			ans ++;
			if (ones > 0) {
				if (m > 1){
					m -= 2;
					ones --;
				}
				else {
					m--;
					ones--;
				}
			}
			else {
				m -= 1;
			}
		}
		printf("%d\n", ans);
	}
}<commit_msg>Apparently entire logic is wrong. (10 pts)<commit_after>// Author: <NAME> <<EMAIL>>
#include <stdio.h>

int main(void) {
	int t;
	scanf("%d", &t);
	int a;
	for (a = 0; a < t; a++) {
		long long int n, m;
		scanf("%lld %lld", &n, &m);
		long long int ans = 0;
		long long int i, j;
		int ones = 0;
		for (i = 0; i < m; i++) {
			scanf("%lld", &j);
			if (j == 1)
				ones ++;
		}
		long long int not_ones = m - ones;
		while (m > 1) {
			ans++;
			if (ones > 0) {
				if (m > 1){
					m -= 2;
					ones--;
				}
				else {
					m--;
					ones--;
				}
			}
			else {
				m--;
			}
		}
		printf("%lld\n", ans);
	}
}
{'fraction_non_alphanumeric': 0.22900763358778625, 'fraction_numerical': 0.018659881255301103, 'mean_word_length': 1.6576576576576576, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3586747', 'n_tokens_mistral': 691, 'n_tokens_neox': 543, 'n_words': 163}