52 lines
928 B
C++
52 lines
928 B
C++
#include <iostream>
|
|
#include <algorithm>
|
|
#include <math.h>
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
struct Note
|
|
{
|
|
string patterns[10];
|
|
string outputs[4];
|
|
|
|
friend istream &operator>>( istream &input, Note &n ) {
|
|
for(int i = 0; i < 10; i++)
|
|
{
|
|
input >> n.patterns[i];
|
|
}
|
|
for(int i = 0; i < 4; i++)
|
|
{
|
|
input >> n.outputs[i];
|
|
}
|
|
return input;
|
|
}
|
|
};
|
|
|
|
int main()
|
|
{
|
|
Note note;
|
|
int count = 0;
|
|
while (cin >> note)
|
|
{
|
|
for(int i = 0; i < 4; i++)
|
|
{
|
|
switch(note.outputs[i].size())
|
|
{
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
case 7:
|
|
count++;
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
cout << count << endl;
|
|
|
|
return 0;
|
|
}
|