QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#560494#3588. Hamilton - The MusicalYarema#Compile Error//C++20861b2024-09-12 15:59:092024-09-12 15:59:10

Judging History

你现在查看的是最新测评结果

  • [2024-09-12 15:59:10]
  • 评测
  • [2024-09-12 15:59:09]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second

typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef double db;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n;
	cin >> n;
	int mask = 0;
	vector<string> s(n);
	FOR (i, 0, n)
	{
		cin >> s[i];
		mask |= 1 << (s[i][0] - 'A');
	}
	FOR (i, 0, n)
	{
		int msk = 0;
		FOR (j, 0, SZ(s[i]))
			msk |= 1 << (s[i][j] - 'A');
		if ((mask & msk) == msk)
		{
			cout << "Y\n";
			return 0;
		}
	}
	
	cout << "N\n";
	return 0;
}


123

详细

answer.code:52:1: error: expected unqualified-id before numeric constant
   52 | 123
      | ^~~