liyuanfang

查看题解 查看答案
题目描述
Time Limit: 1000 ms
Memory Limit: 256 mb

请先登录再刷题,不会做的题目右上可以查看题解和答案~

输入输出格式
输入描述:
The first line outputs two numbers, n (n < = 2e5), which means there are n cities and Q (5e5) with tables with Q operations, followed by Q lines. , A a b stands for putting city a and city b in a province, B a b stands for putting city a to city b (a, a + 1,... b-1, b) in a province. C a b stands for judging city a and city b is in a province.if city a and city b is in a province.
输出描述:
For each question of type 3 print "YES" or "NO" (without the quotes), depending on whether the corresponding people work in the same department.
输入输出样例
输入样例#:
8 3
C 2 5
A 2 5
C 2 5
输出样例#:
复制
NO
YES
重置

提交代码后在此处可查看状态