题目示例有问题,第一行那个1不该出现

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
//A-L有12枚银币
bool coin[12];//true真币,false假币
string s[3][3];//记录结果
//select =-1,表示假币轻,=+1表示假币重
int weight(string s, int select,char coin) {
	int sum = 0;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == coin) {
			sum += select;
		}
	}
	return sum;
}
//真币 返回true
bool is_true_coin(int num,int select) {
	char coin = 'A' + num;
	for (int i = 0; i < 3; i++) {//每一次的结果进行分析
		
		int w1 = weight(s[i][0], select, coin);//左侧天平
		int w2 = weight(s[i][1], select, coin);//右侧天平

		if (w1 == w2) {
			if (s[i][2] != "even")return true;
		}
		else if (w1 > w2) {
			if(s[i][2] != "up")return true;
		}
		else {
			if (s[i][2] != "down")return true;
		}
	}
	return false;
}
int main() {
	//cout << weight("ABBBBCD", 1, 'B') << endl;
	//cout << (int)('L' - 'A' + 1) << endl;
	
	for (int i = 0; i < 3; i++) {
		cin >> s[i][0] >> s[i][1] >> s[i][2];
	}
	
	for (int i = 0; i < 12; i++) {
		if (!is_true_coin(i, -1)) {
			cout << (char)('A' + i) << " is the counterfeit coin and it is light." << endl;
			return 0;
		}
		if (!is_true_coin(i, 1)) {
			cout << (char)('A' + i) << " is the counterfeit coin and it is heavy." << endl;
			return 0;
		}
	}
	return 0;
# }