#include <iostream>
#include <stdio.h>
#include <iomanip>
#include <algorithm>
using namespace std;
int main()
{
int n;
while (cin >> n)
{
int a[1001];
char b[1001];
for (int i = 0; i < n; i++)
{
char ch[10];
cin >> a[i] >> ch;
b[i] = ch[0];
}
int k = 0;
for (int i = 0; i < n - 1; i++)
{
if (b[i] == 'b'&&a[i] > a[n - 1])continue;
if (b[i] == 's'&&a[i] < a[n - 1])continue;
k++; break;
}//判断是否正确
char ch[10];
cin >> ch;
if (ch[0] == 'f')k++;
if (!k)
cout << "22\n";
else
cout << "11\n";
}
return 0;
}
swustoj 0259
最新推荐文章于 2021-05-21 16:56:56 发布